Débridez des liens premium, développez dossiers et playlists, gérez vos torrents et intégrez BestDebrid dans vos applications. Référence complète des endpoints REST du build 1.07.
L'API BestDebrid est une interface REST qui renvoie du JSON via HTTPS. La plupart des endpoints acceptent GET et POST, avec les paramètres en query string ou dans le corps de la requête.
Les tables techniques (paramètres, champs, exemples de code) sont en anglais.
URL de base
https://bestdebrid.com/api/v1
Enveloppe de réponse
Chaque endpoint renvoie un objet JSON avec un entier error (0 = succès) et un message : texte lisible en cas d'échec, ou charge utile (chaîne, tableau, objet) en cas de succès. Les endpoints plus riches ajoutent leurs propres champs à côté de error.
{
"error": 0,
"message": "OK"// additional fields depending on the endpoint
}
Authentification
Tous les endpoints sauf /, /time et /regex exigent votre clé API. Deux façons de la transmettre :
Option 1 — en-tête HTTP (recommandé)
Authorization: YOUR_API_KEY
Option 2 — query string
?auth=YOUR_API_KEY
Où trouver votre clé : connectez-vous, elle est affichée dans votre profil (section API). Régénérez-la à tout moment avec /newkey. /newkey
Gardez votre clé secrète. Ne l'exposez jamais dans du code côté client, un dépôt public ou une extension distribuée. En cas de fuite, régénérez-la immédiatement.
Votre clé API pour les essaisUtilisée par les blocs « Essayer » de cette page, jamais enregistrée.
Gestion des erreurs
Le champ error indique le résultat. Une valeur non nulle est accompagnée d'un message descriptif. Les codes sont réutilisés entre endpoints ; c'est le message qui porte le sens.
0Succès — la requête a abouti.
1Paramètre manquant ou invalide (lien vide, mauvaise clé API, mot de passe absent).
2Format d'URL invalide — le lien doit commencer par http:// ou https://.
3Lien non supporté, magnet invalide ou utilisateur non connecté.
4Les comptes gratuits ne peuvent pas débrider cet hébergeur (premium uniquement).
5Trop de torrents actifs (5 maximum) ou erreur du serveur torrent.
6Limite journalière gratuite atteinte, torrent en double ou hébergeur en maintenance.
7Taille de fichier au-dessus de la limite gratuite, ou erreur de génération du lien.
8Taille du torrent indéterminable, ou torrent au-dessus de 90 Gio.
9Quota de l'hébergeur atteint avant génération (liens journaliers sur cet hébergeur).
10Génération échouée — l'hébergeur a renvoyé une erreur.
19Limite de l'hébergeur atteinte après génération du lien.
21Abonnement premium requis pour l'accès API.
22Accès API banni sur ce compte.
55Service en maintenance, ou type de paramètre invalide (ex. isFile non numérique).
56Adresse IP invalide, délai d'attente non écoulé, ou quota journalier gratuit.
121Quota journalier de téléchargement atteint (70 liens uniques / 24 h).
122Trop de débridages en cours — réessayez dans ~1 min.
632VPN/proxy détecté (interdit pour les comptes gratuits).
Quota journalier : chaque compte est limité à 70 fichiers uniques par 24 h, web et API confondus (erreur 121). Les débridages en cours comptent aussi (erreur 122).
Racine — liste des endpoints
Renvoie un tableau JSON de chaînes décrivant chaque endpoint du build courant. Pratique pour un test de disponibilité.
GEThttps://bestdebrid.com/api/v1/
Aucune authentification requise.
Exemple de réponse
[
"time ( function : time of bestdebrid.com )",
"newkey ( function : renew api key, params [ auth=apikey, pass=password of account ] )",
"user ( function : user infos, params [ auth=apikey ] )",
"...",
"** api build [1.07] **"
]
const r = await fetch('https://bestdebrid.com/api/v1/time');
console.log((await r.json()).message);
Expressions régulières des hébergeurs
Renvoie la liste des expressions régulières (PCRE) reconnaissant les liens supportés. Permet de filtrer les URLs côté client avant d'appeler /generateLink.
GEThttps://bestdebrid.com/api/v1/regex
Aucune authentification requise.
Schéma de réponse
Champ
Type
Description
[]
string[]
Flat JSON array of PCRE patterns (PHP preg_match syntax, with delimiters). The last pattern matches base64-encoded http(s):// links.
Headers alternative: the key is also accepted as Authorization and the password as Password-X. When both headers and query params are present, headers win.
Note: on failure the envelope currently returns "error": 0 with an error message — test the body for the literal true rather than the error field.
Action irréversible : pas de bloc « Essayer » pour cet endpoint.
const res = await fetch('https://bestdebrid.com/api/v1/downloadsHistory?num=20', {
headers: { 'Authorization': 'YOUR_API_KEY' }
});
const history = await res.json();
Object.values(history).forEach(e => console.log(e.name));
Hébergeurs supportés
Liste complète des hébergeurs premium avec statut, icônes, domaines et un indicateur hostfolder signalant ceux qui supportent l'expansion de dossiers via /hostfolder.
GEThttps://bestdebrid.com/api/v1/hosts
Paramètres
Paramètre
Type
Description
authrequis
string
Your API key — as Authorization header or ?auth= query param.
Schéma de réponse (par entrée)
Champ
Type
Description
name
string
Hoster identifier (e.g. rapidgator, mega).
status
string
up or down.
picture
string
Relative path to the standard icon (img/hosters/name.png).
picture_100_100
string
Relative path to the 100×100 icon.
lastcheck
string
Timestamp of the last availability check.
downsincedate
string
Timestamp since the hoster is down (empty string if up).
hostfolder
boolean
true if the hoster supports folder/playlist expansion via /hostfolder (gofile, youtube, mega, terabox).
domains
string[]
Domain aliases handled as this hoster (e.g. rapidgator.net, rg.to).
L'endpoint principal. Prend un lien d'hébergeur (jusqu'à 5, séparés par des sauts de ligne) et renvoie des URL débridées exploitables par n'importe quel client HTTP.
POSThttps://bestdebrid.com/api/v1/generateLink
Fonctionne en GET et en POST.
Paramètres
Paramètre
Type
Description
authrequis
string
Your API key — as Authorization header or ?auth= query param.
linkrequis
string
The hoster URL (or up to 5 URLs separated by \n).
passoptionnel
string
Password protecting the file on the hoster, if any.
ipoptionnel
string
IP allowed to download the unrestricted URL. Defaults to the caller's IP. Must be a valid IPv4/IPv6.
redirectoptionnel
string
If set to yes, returns a 302 to the unrestricted URL instead of JSON.
Schéma de réponse
Champ
Type
Description
error
integer
0 on success, non-zero otherwise (see error table).
message
string
"OK" on success, human-readable otherwise.
original_link
string
Original hoster URL submitted.
servId
string
Internal ID of the generation server that processed the link.
hoster
string
Detected hoster name.
hoster-icon
string
Relative path to the hoster icon.
filename
string
Name of the file.
link
string
The unrestricted download URL.
size
string
Human-readable file size (e.g. "1.35 GiB").
Additional fields — streamable files
When the file extension matches the stream whitelist (mp4, mkv, avi, …), extra fields are added:
Champ
Type
Description
stream
string
Query-string suffix for the web stream player.
streammp4
string
Direct MP4 transcode URL (when the stream system is enabled).
Hostname normalization: aliases are rewritten before processing — rg.to → rapidgator.net, keep2share.cc → k2s.cc, fr.scribd.com → scribd.com, mixdrop.* → mixdrop.ag, TeraBox mirrors → terabox.com, and so on.
Free-user restrictions: free accounts can only unrestrict links from hosters flagged as free where at least one free server is up. VPN/proxy usage is forbidden on free accounts (error 632). A per-file size cap may also apply.
const body = new URLSearchParams({
link: 'https://rapidgator.net/file/abc123'
});
const res = await fetch('https://bestdebrid.com/api/v1/generateLink', {
method : 'POST',
headers: { 'Authorization': 'YOUR_API_KEY' },
body
});
const data = await res.json();
if (data.error === 0) console.log(data.link);
import requests
r = requests.post('https://bestdebrid.com/api/v1/generateLink',
headers={'Authorization': 'YOUR_API_KEY'},
data={'link': 'https://rapidgator.net/file/abc123'})
data = r.json()
if data['error'] == 0:
print(data['link'])
Développer un dossier / une playlist
Résout un dossier, un partage ou une playlist en une liste plate d'URL de fichiers à passer ensuite à /generateLink. Supporte Gofile, TeraBox (et ses alias), les playlists YouTube et les dossiers Mega.
POSThttps://bestdebrid.com/api/v1/hostfolder
Fonctionne en GET et en POST.
Paramètres
Paramètre
Type
Description
authrequis
string
Your API key — as Authorization header or ?auth= query param.
linkrequis
string
The folder / playlist URL.
listoptionnel
string
YouTube playlist ID — only needed if link is a YouTube URL missing list=.
diroptionnel
string
TeraBox sub-path inside the share.
pathoptionnel
string
Alias for dir.
fsidoptionnel
string
TeraBox file ID — filters a single file from the share.
fileNameoptionnel
string
TeraBox filename filter (use with fsid).
Schéma de réponse
Champ
Type
Description
error
integer
0 on success, 1 on failure.
message
string[] | string
Array of resolved URLs on success; human-readable error message on failure.
Exemples de réponses
// Gofile
{
"error": 0,
"message": [
"https://gofile.io/download/abc123?server=store1",
"https://gofile.io/download/def456?server=store2"
]
}
// Non-supported hoster — link echoed back
{
"error": 0,
"message": ["https://rapidgator.net/file/abc123"]
}
// Folder with no direct files (TeraBox)
{
"error": 1,
"message": "This link contains folders only. We can only unrestrict folders that contain actual files. Please open your link and navigate through the folders until you reach a folder that contains files."
}
Safe to pipe every URL through /hostfolder. If the URL isn't a known folder type, the endpoint echoes it back wrapped in the message array — your client can always expand → unrestrict without branching.
Limits: premium plan required · max 5 active torrents (error 5) · max 90 GiB per torrent (error 8) · duplicate within 4 days → error 6 unless nocheck=true · if the total size can't be read from the swarm within ~30 s the torrent is removed and error 8 is returned.
Exemples de code
# magnet URI
curl -X POST https://bestdebrid.com/api/v1/torrentFile \
-H 'Authorization: YOUR_API_KEY' \
--data-urlencode 'magnet=magnet:?xt=urn:btih:dc6521c4fec8641eaa5901164c8e57e16a790e05' \
--data 'isFile=0'
Détails complets d'un torrent : progression, ratio, taille, vitesse et — une fois terminé — la liste des fichiers téléchargeables plus une archive ZIP.
GEThttps://bestdebrid.com/api/v1/gettorrentFile
Paramètres
Paramètre
Type
Description
authrequis
string
Your API key — as Authorization header or ?auth= query param.
torrentidrequis
string
Torrent infohash returned by /torrentFile or /gettorrentList.
Schéma de réponse
Champ
Type
Description
error
integer
0 on success.
id
string
Torrent infohash.
message
string
"OK".
filename
string
Torrent display name.
img-progress
string
Relative path to a status icon (img/torrents/ok.gif, deb-loading.gif, wait.png, error.gif).
progress
float
Percent done (0–1).
ratio
float | string
Upload ratio; empty string when unknown.
seeders
integer
Number of connected peers.
size
integer
Total size in bytes.
sizeString
string
Human-readable size (e.g. "3.2 GB").
speed
string
Current download speed (e.g. "4.52 MB/s").
serverID
integer
Internal ID of the seedbox storing the torrent.
links
object | string
Once finished, an object with zip (URL of the full ZIP) and files (array of per-file URLs). While downloading, the literal string "Waiting...".
Retire un torrent du compte. Les fichiers sont effacés de la seedbox seulement si aucun autre utilisateur ne l'a ajouté depuis 4 jours et si son ratio est ≥ 1.
DELhttps://bestdebrid.com/api/v1/deltorrentFile
Paramètres
Paramètre
Type
Description
authrequis
string
Your API key — as Authorization header or ?auth= query param.
torrentidrequis
string
Torrent infohash to delete.
Exemple de réponse
{
"error": 0,
"message": "Torrent deleted"
}
Irreversible. The torrent entry and any generated download links will no longer be accessible from your account.
Action irréversible : pas de bloc « Essayer » pour cet endpoint.