Sblocca link premium, espandi cartelle e playlist, gestisci i torrent e integra BestDebrid nelle tue applicazioni. Riferimento completo degli endpoint REST della build 1.07.
JSON via HTTPS
Chiave API
70 link / 24 h
Build 1.07
L'API BestDebrid è un'interfaccia REST che restituisce JSON via HTTPS. La maggior parte degli endpoint accetta GET e POST, con parametri in query string o nel corpo della richiesta.
Le tabelle tecniche (parametri, campi, esempi di codice) sono in inglese.
URL di base
https://bestdebrid.com/api/v1
Struttura della risposta
Ogni endpoint restituisce un oggetto JSON con un intero error (0 = successo) e un message: testo leggibile in caso di errore, oppure il payload (stringa, array, oggetto) in caso di successo. Gli endpoint più ricchi aggiungono i propri campi accanto a error.
{
"error": 0,
"message": "OK"// additional fields depending on the endpoint
}
Autenticazione
Tutti gli endpoint tranne /, /time e /regex richiedono la tua chiave API. Due modi per inviarla:
Opzione 1 — header HTTP (consigliato)
Authorization: YOUR_API_KEY
Opzione 2 — query string
?auth=YOUR_API_KEY
Dove trovare la chiave: accedi, è mostrata nel tuo profilo (sezione API). Rigenerala in qualsiasi momento con /newkey. /newkey
Tieni segreta la chiave. Non esporla mai in codice lato client, repository pubblici o estensioni distribuite. In caso di fuga, rigenerala subito.
La tua chiave API per le proveUsata dai blocchi «Prova» di questa pagina, mai salvata.
Gestione degli errori
Il campo error indica l'esito. Un valore diverso da zero è accompagnato da un message descrittivo. I codici sono riutilizzati tra endpoint; il significato è nel messaggio.
0Successo — la richiesta è stata completata.
1Parametro mancante o non valido (link vuoto, chiave API errata, password mancante).
2Formato URL non valido — il link deve iniziare con http:// o https://.
3Link non supportato, magnet non valido o utente non connesso.
4Gli account gratuiti non possono sbloccare questo hoster (solo premium).
5Troppi torrent attivi (max 5) o errore del server torrent.
6Limite giornaliero gratuito raggiunto, torrent duplicato o hoster in manutenzione.
7Dimensione del file oltre il limite gratuito, o errore nella generazione del link.
8Dimensione del torrent non determinabile, o torrent oltre 90 GiB.
9Quota dell'hoster raggiunta prima della generazione (link giornalieri su questo hoster).
10Generazione fallita — l'hoster ha restituito un errore.
19Limite dell'hoster raggiunto dopo la generazione del link.
21Piano premium richiesto per l'accesso API.
22Accesso API bloccato su questo account.
55Servizio in manutenzione, o tipo di parametro non valido (es. isFile non numerico).
56Indirizzo IP non valido, tempo di attesa non trascorso, o quota giornaliera gratuita.
121Quota giornaliera di download raggiunta (70 link unici / 24 h).
122Troppi sblocchi in corso — riprova tra ~1 min.
632VPN/proxy rilevato (vietato per gli account gratuiti).
Quota giornaliera: ogni account è limitato a 70 file unici ogni 24 h, web e API inclusi (errore 121). Anche gli sblocchi in corso contano (errore 122).
Radice — elenco degli endpoint
Restituisce un array JSON di stringhe che descrivono ogni endpoint della build corrente. Utile per verifiche rapide.
GEThttps://bestdebrid.com/api/v1/
Nessuna autenticazione richiesta.
Esempio di risposta
[
"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);
Espressioni regolari degli hoster
Restituisce l'elenco delle espressioni regolari (PCRE) che riconoscono i link supportati. Permette di filtrare gli URL lato client prima di chiamare /generateLink.
GEThttps://bestdebrid.com/api/v1/regex
Nessuna autenticazione richiesta.
Schema della risposta
Campo
Tipo
Descrizione
[]
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.
Azione irreversibile: nessun blocco «Prova» per questo 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));
Hoster supportati
Elenco completo degli hoster premium con stato, icone, domini e un flag hostfolder che indica quali supportano l'espansione delle cartelle via /hostfolder.
GEThttps://bestdebrid.com/api/v1/hosts
Parametri
Parametro
Tipo
Descrizione
authobbligatorio
string
Your API key — as Authorization header or ?auth= query param.
Schema della risposta (per voce)
Campo
Tipo
Descrizione
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).
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'])
Espandi una cartella / playlist
Risolve una cartella, una condivisione o una playlist in URL di file da passare a /generateLink. Supporta Gofile, TeraBox (e alias), playlist YouTube e cartelle Mega.
POSThttps://bestdebrid.com/api/v1/hostfolder
Funziona sia in GET che in POST.
Parametri
Parametro
Tipo
Descrizione
authobbligatorio
string
Your API key — as Authorization header or ?auth= query param.
linkobbligatorio
string
The folder / playlist URL.
listfacoltativo
string
YouTube playlist ID — only needed if link is a YouTube URL missing list=.
dirfacoltativo
string
TeraBox sub-path inside the share.
pathfacoltativo
string
Alias for dir.
fsidfacoltativo
string
TeraBox file ID — filters a single file from the share.
fileNamefacoltativo
string
TeraBox filename filter (use with fsid).
Schema della risposta
Campo
Tipo
Descrizione
error
integer
0 on success, 1 on failure.
message
string[] | string
Array of resolved URLs on success; human-readable error message on failure.
Esempi di risposta
// 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.
Esempi di codice
# 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'
Rimuove un torrent dall'account. I file sono cancellati dalla seedbox solo se nessun altro utente lo ha aggiunto negli ultimi 4 giorni e il ratio è ≥ 1.
DELhttps://bestdebrid.com/api/v1/deltorrentFile
Parametri
Parametro
Tipo
Descrizione
authobbligatorio
string
Your API key — as Authorization header or ?auth= query param.
torrentidobbligatorio
string
Torrent infohash to delete.
Esempio di risposta
{
"error": 0,
"message": "Torrent deleted"
}
Irreversible. The torrent entry and any generated download links will no longer be accessible from your account.
Azione irreversibile: nessun blocco «Prova» per questo endpoint.