Bestdebrid

API-Dokumentation

Entsperren Sie Premium-Links, expandieren Sie Ordner und Playlists, verwalten Sie Torrents und integrieren Sie BestDebrid in Ihre Anwendungen. Vollständige Referenz der REST-Endpunkte von Build 1.07.

JSON über HTTPS API-Schlüssel 70 Links / 24 h Build 1.07
Auf dieser Seite

Einführung

Die BestDebrid-API ist eine REST-Schnittstelle, die JSON über HTTPS liefert. Die meisten Endpunkte akzeptieren GET und POST, mit Parametern im Query-String oder im Request-Body.

Die technischen Tabellen (Parameter, Felder, Codebeispiele) sind auf Englisch.

Basis-URL

https://bestdebrid.com/api/v1

Antwortstruktur

Jeder Endpunkt liefert ein JSON-Objekt mit einer Ganzzahl error (0 = Erfolg) und einer message: lesbarer Text bei Fehlern oder die Nutzdaten (String, Array, Objekt) bei Erfolg. Umfangreichere Endpunkte fügen eigene Felder neben error hinzu.

{
  "error": 0,
  "message": "OK"
  // additional fields depending on the endpoint
}

Authentifizierung

Alle Endpunkte außer /, /time und /regex benötigen Ihren API-Schlüssel. Zwei Wege, ihn zu übergeben:

Option 1 — HTTP-Header (empfohlen)

Authorization: YOUR_API_KEY

Option 2 — Query-String

?auth=YOUR_API_KEY
Wo Sie Ihren Schlüssel finden: melden Sie sich an, er steht in Ihrem Profil (Abschnitt API). Erneuern Sie ihn jederzeit mit /newkey. /newkey
Halten Sie Ihren Schlüssel geheim. Nie in clientseitigem Code, öffentlichen Repositories oder verteilten Erweiterungen offenlegen. Bei einem Leak sofort erneuern.
Ihr API-Schlüssel für die Tests Wird von den „Ausprobieren“-Blöcken dieser Seite verwendet, nie gespeichert.

Fehlerbehandlung

Das Feld error zeigt das Ergebnis an. Ein Wert ungleich null wird von einer beschreibenden message begleitet. Codes werden zwischen Endpunkten wiederverwendet; die Bedeutung steckt in der Nachricht.

0Erfolg — die Anfrage wurde abgeschlossen.
1Fehlender oder ungültiger Parameter (leerer Link, falscher API-Schlüssel, fehlendes Passwort).
2Ungültiges URL-Format — der Link muss mit http:// oder https:// beginnen.
3Nicht unterstützter Link, ungültiger Magnet oder Benutzer nicht angemeldet.
4Kostenlose Konten können diesen Hoster nicht entsperren (nur Premium).
5Zu viele aktive Torrents (max. 5) oder Fehler des Torrent-Servers.
6Kostenloses Tageslimit erreicht, doppelter Torrent oder Hoster in Wartung.
7Dateigröße über dem kostenlosen Limit oder Fehler bei der Link-Erzeugung.
8Torrent-Größe nicht ermittelbar oder Torrent über 90 GiB.
9Hoster-Kontingent vor der Erzeugung erreicht (tägliche Links bei diesem Hoster).
10Erzeugung fehlgeschlagen — der Hoster hat einen Fehler gemeldet.
19Hoster-Limit erreicht, nachdem der Link bereits erzeugt wurde.
21Premium-Tarif für den API-Zugriff erforderlich.
22API-Zugriff für dieses Konto gesperrt.
55Dienst in Wartung oder ungültiger Parametertyp (z. B. nicht numerisches isFile).
56Ungültige IP-Adresse, Wartezeit nicht abgelaufen oder kostenloses Tageskontingent.
121Tägliches Download-Kontingent erreicht (70 eindeutige Links / 24 h).
122Zu viele laufende Entsperrungen — in ~1 Min. erneut versuchen.
632VPN/Proxy erkannt (für kostenlose Konten verboten).
Tageskontingent: jedes Konto ist auf 70 eindeutige Dateien pro 24 h begrenzt, Web und API zusammen (Fehler 121). Laufende Entsperrungen zählen ebenfalls (Fehler 122).

Wurzel — Endpunkte auflisten

Liefert ein JSON-Array mit Strings, die jeden Endpunkt des aktuellen Builds beschreiben. Praktisch für Verfügbarkeitstests.

GEThttps://bestdebrid.com/api/v1/
Keine Authentifizierung erforderlich.

Beispielantwort

[
  "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]  **"
]
Ausprobieren

Codebeispiele

curl https://bestdebrid.com/api/v1/
<?php
$data = json_decode(file_get_contents('https://bestdebrid.com/api/v1/'), true);
print_r($data);
const res  = await fetch('https://bestdebrid.com/api/v1/');
const data = await res.json();
console.log(data);

Serverzeit

Liefert die aktuelle Serverzeit. Nützlich zum Synchronisieren von Clients oder zum Erkennen von Zeitabweichungen.

GEThttps://bestdebrid.com/api/v1/time
Keine Authentifizierung erforderlich.

Beispielantwort

{
  "error": 0,
  "message": "2025-04-19 14: 22: 03"
}
Ausprobieren

Codebeispiele

curl https://bestdebrid.com/api/v1/time
<?php
$res = file_get_contents('https://bestdebrid.com/api/v1/time');
echo json_decode($res, true)['message'];
const r = await fetch('https://bestdebrid.com/api/v1/time');
console.log((await r.json()).message);

Reguläre Ausdrücke der Hoster

Liefert die Liste der regulären Ausdrücke (PCRE), die unterstützte Links erkennen. Damit lassen sich URLs clientseitig filtern, bevor /generateLink aufgerufen wird.

GEThttps://bestdebrid.com/api/v1/regex
Keine Authentifizierung erforderlich.

Antwortschema

FeldTypBeschreibung
[]string[]Flat JSON array of PCRE patterns (PHP preg_match syntax, with delimiters). The last pattern matches base64-encoded http(s):// links.

Beispielantwort

[
  "/(http|https):\\/\\/(\\w+\\.)?rapidgator\\.net\\/file\\/[0-9a-z]+/",
  "/(http|https):\\/\\/(\\w+\\.)?gofile\\.io\\/d\\/[0-9A-Za-z]+/",
  "..."
]
Client-side filtering: patterns use PHP delimiters (/…/). Strip the leading and trailing slash before feeding them to another regex engine.
Ausprobieren

Codebeispiele

curl https://bestdebrid.com/api/v1/regex
<?php
$patterns = json_decode(file_get_contents('https://bestdebrid.com/api/v1/regex'), true);
$supported = false;
foreach ($patterns as $re) {
    if (preg_match($re, $url)) { $supported = true; break; }
}
const patterns = await (await fetch('https://bestdebrid.com/api/v1/regex')).json();
const supported = patterns.some(p => new RegExp(p.slice(1, -1)).test(url));

Benutzerinformationen

Liefert das Profil des authentifizierten Benutzers: Premium-Status, Ablaufdatum und ob das Konto API-Limits umgeht.

GEThttps://bestdebrid.com/api/v1/user

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.

Antwortschema

FeldTypBeschreibung
errorinteger0 on success, 1 if the key is invalid.
usernamestringAccount username.
emailstringAccount email.
creditintegerRemaining credits on the account.
IDintegerInternal user ID.
premiumbooleantrue if the account has an active premium plan (expire in the future).
expirestring|nullPremium expiry date in Y-m-d H:i:s, or null if not premium.
bypass_api_limitbooleantrue for accounts allowed to bypass per-host unrestrict limits.

Beispielantwort

{
  "error": 0,
  "username": "john_doe",
  "email": "john@example.com",
  "credit": 0,
  "ID": 12345,
  "premium": true,
  "expire": "2026-09-14 10: 20: 00",
  "bypass_api_limit": false
}
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' \
  https://bestdebrid.com/api/v1/user
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$user = json_decode(file_get_contents('https://bestdebrid.com/api/v1/user', false, $ctx), true);
const res  = await fetch('https://bestdebrid.com/api/v1/user', {
  headers: { 'Authorization': 'YOUR_API_KEY' }
});
const user = await res.json();

API-Schlüssel erneuern

Erzeugt einen neuen API-Schlüssel. Der alte wird sofort ungültig. Liefert bei Erfolg den Literal-String true.

GEThttps://bestdebrid.com/api/v1/newkey

Parameter

ParameterTypBeschreibung
autherforderlichstringYour current API key (or Authorization header).
passerforderlichstringYour account password (or Password-X header). Confirms the rotation.

Beispielantworten

// Success (plain text, not JSON)
true

// Failure
{
  "error": 0,
  "message": "Invalid credentials"
}
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.
Unwiderrufliche Aktion: kein „Ausprobieren“-Block für diesen Endpunkt.

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' -H 'Password-X: YOUR_PASSWORD' \
  https://bestdebrid.com/api/v1/newkey
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\nPassword-X: YOUR_PASSWORD\r\n"]]);
$res = file_get_contents('https://bestdebrid.com/api/v1/newkey', false, $ctx);

if (trim($res) === 'true') {
    // success — read the new key from your profile page
}
const res = await fetch('https://bestdebrid.com/api/v1/newkey', {
  headers: { 'Authorization': 'YOUR_API_KEY', 'Password-X': 'YOUR_PASSWORD' }
});
const ok = (await res.text()).trim() === 'true';

Download-Verlauf

Liefert die zuletzt entsperrten Links des Benutzers als Objekt mit Schlüsseln ab "1" (kein JSON-Array).

GEThttps://bestdebrid.com/api/v1/downloadsHistory

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.
numoptionalintegerNumber of entries to return. Default 10, capped at 300.

Antwortschema (pro Eintrag)

FeldTypBeschreibung
namestringFilename of the downloaded file.
linkstringGenerated unrestricted download link.
originalstringOriginal hoster URL you submitted.
ipstringClient IP that triggered the download.
datestringTimestamp Y-m-d H:i:s.

Beispielantwort

{
  "1": {
    "name": "Video.mkv",
    "link": "https://debrid2.bestdebrid.com/dl/TY/abc.../Video.mkv",
    "original": "https://rapidgator.net/file/abc123",
    "ip": "1.2.3.4",
    "date": "2025-04-18 22: 13: 07"
  },
  "2": {
    "name": "Archive.zip",
    "link": "https://debrid1.bestdebrid.com/dl/TY/def.../Archive.zip",
    "original": "https://k2s.cc/file/def456",
    "ip": "1.2.3.4",
    "date": "2025-04-18 21: 02: 55"
  }
}
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' \
  'https://bestdebrid.com/api/v1/downloadsHistory?num=20'
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$history = json_decode(file_get_contents('https://bestdebrid.com/api/v1/downloadsHistory?num=20', false, $ctx), true);

foreach ($history as $entry) {
    echo $entry['name'] . "\n";
}
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));

Unterstützte Hoster

Vollständige Liste der Premium-Hoster mit Status, Icons, Domains und einem hostfolder-Flag, das angibt, welche per /hostfolder expandiert werden können.

GEThttps://bestdebrid.com/api/v1/hosts

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.

Antwortschema (pro Eintrag)

FeldTypBeschreibung
namestringHoster identifier (e.g. rapidgator, mega).
statusstringup or down.
picturestringRelative path to the standard icon (img/hosters/name.png).
picture_100_100stringRelative path to the 100×100 icon.
lastcheckstringTimestamp of the last availability check.
downsincedatestringTimestamp since the hoster is down (empty string if up).
hostfolderbooleantrue if the hoster supports folder/playlist expansion via /hostfolder (gofile, youtube, mega, terabox).
domainsstring[]Domain aliases handled as this hoster (e.g. rapidgator.net, rg.to).

Beispielantwort

[
  {
    "name": "rapidgator",
    "status": "up",
    "picture": "img/hosters/rapidgator.png",
    "picture_100_100": "img/hosters/100_100/rapidgator.png",
    "lastcheck": "2025-04-19 14: 00: 12",
    "downsincedate": "",
    "hostfolder": false,
    "domains": ["rapidgator.net", "rg.to"]
  },
  {
    "name": "mega",
    "status": "up",
    "picture": "img/hosters/mega.png",
    "picture_100_100": "img/hosters/100_100/mega.png",
    "lastcheck": "2025-04-19 14: 00: 14",
    "downsincedate": "",
    "hostfolder": true,
    "domains": ["mega.io", "mega.nz", "mega.co.nz"]
  }
]
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' https://bestdebrid.com/api/v1/hosts
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$hosts = json_decode(file_get_contents('https://bestdebrid.com/api/v1/hosts', false, $ctx), true);

// Quick lookup: domain -> hoster entry
$byDomain = [];
foreach ($hosts as $h) {
    foreach ($h['domains'] as $d) $byDomain[$d] = $h;
}
const hosts = await (await fetch('https://bestdebrid.com/api/v1/hosts', {
  headers: { 'Authorization': 'YOUR_API_KEY' }
})).json();

const expandable = hosts
  .filter(h => h.hostfolder && h.status === 'up')
  .map(h => h.name);

Hoster-Zähler

Anzahl der aktuell erreichbaren und nicht erreichbaren Premium-Hoster. Ideal für Status-Dashboards.

GEThttps://bestdebrid.com/api/v1/hostscount

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.

Antwortschema

FeldTypBeschreibung
totalhostsintegerTotal number of premium hosters.
hostsupintegerHosters currently marked up.
hostsdownintegerHosters currently marked down.

Beispielantwort

{
  "totalhosts": 87,
  "hostsup": 81,
  "hostsdown": 6
}
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' https://bestdebrid.com/api/v1/hostscount
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$counts = json_decode(file_get_contents('https://bestdebrid.com/api/v1/hostscount', false, $ctx), true);
const counts = await (await fetch('https://bestdebrid.com/api/v1/hostscount', {
  headers: { 'Authorization': 'YOUR_API_KEY' }
})).json();

Limits pro Hoster

Tägliche Limits pro Hoster (Anzahl Downloads und Bandbreite), wie sie den Benutzern angezeigt werden.

GEThttps://bestdebrid.com/api/v1/hostslimits

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.

Antwortschema (pro Eintrag)

FeldTypBeschreibung
namestringHoster identifier.
linksperdayintegerMax daily unrestricts visible to users.
bandwidthstringDaily bandwidth cap with units (e.g. "150 GB"); "∞" when unlimited.
picturestringRelative path to the standard icon.
picture_100_100stringRelative path to the 100×100 icon.

Beispielantwort

[
  {
    "name": "rapidgator",
    "linksperday": 25,
    "bandwidth": "150 GB",
    "picture": "img/hosters/rapidgator.png",
    "picture_100_100": "img/hosters/100_100/rapidgator.png"
  },
  {
    "name": "k2s",
    "linksperday": 50,
    "bandwidth": "∞",
    "picture": "img/hosters/k2s.png",
    "picture_100_100": "img/hosters/100_100/k2s.png"
  }
]
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' https://bestdebrid.com/api/v1/hostslimits
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$limits = json_decode(file_get_contents('https://bestdebrid.com/api/v1/hostslimits', false, $ctx), true);
const limits = await (await fetch('https://bestdebrid.com/api/v1/hostslimits', {
  headers: { 'Authorization': 'YOUR_API_KEY' }
})).json();

Ordner / Playlist expandieren

Löst einen Ordner, eine Freigabe oder eine Playlist in eine Liste von Datei-URLs auf, die an /generateLink übergeben werden. Unterstützt Gofile, TeraBox (und Aliase), YouTube-Playlists und Mega-Ordner.

POSThttps://bestdebrid.com/api/v1/hostfolder
Funktioniert mit GET und POST.

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.
linkerforderlichstringThe folder / playlist URL.
listoptionalstringYouTube playlist ID — only needed if link is a YouTube URL missing list=.
diroptionalstringTeraBox sub-path inside the share.
pathoptionalstringAlias for dir.
fsidoptionalstringTeraBox file ID — filters a single file from the share.
fileNameoptionalstringTeraBox filename filter (use with fsid).

Antwortschema

FeldTypBeschreibung
errorinteger0 on success, 1 on failure.
messagestring[] | stringArray of resolved URLs on success; human-readable error message on failure.

Beispielantworten

// 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.
Ausprobieren

Codebeispiele

curl -X POST https://bestdebrid.com/api/v1/hostfolder \
  -H 'Authorization: YOUR_API_KEY' \
  --data-urlencode 'link=https://gofile.io/d/XXXXX'
<?php
$ch = curl_init('https://bestdebrid.com/api/v1/hostfolder');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => ['Authorization: YOUR_API_KEY'],
    CURLOPT_POSTFIELDS     => http_build_query(['link' => $folderLink]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

$files = ($response['error'] === 0) ? $response['message'] : [];
const res = await fetch('https://bestdebrid.com/api/v1/hostfolder', {
  method : 'POST',
  headers: { 'Authorization': 'YOUR_API_KEY' },
  body   : new URLSearchParams({ link: folderLink })
});
const { error, message } = await res.json();
const files = error === 0 ? message : [];

Torrent / Magnet hinzufügen

Stellt einen Magnet-Link oder eine .torrent-Datei in die Warteschlange. Heruntergeladene Dateien werden danach über HTTPS via /gettorrentFile bereitgestellt.

POSThttps://bestdebrid.com/api/v1/torrentFile

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.
magneterforderlichstringMagnet URI, or base64-encoded .torrent file bytes when isFile=1.
isFileoptionalinteger1 if magnet is a base64 torrent file, 0 for a magnet URI (default). Must be numeric — otherwise error 55.
nocheckoptionalbooleanSkip the duplicate check (adding the same torrent twice otherwise returns error 6). Default false.
ipoptionalstringIP address allowed to later download the resulting files. Must be a valid IPv4/IPv6.

Antwortschema

FeldTypBeschreibung
errorinteger0 on success.
messagestring"OK" on success.
torrent_idstringTorrent infohash — use it with /gettorrentFile and /deltorrentFile.
torrent_linkstringHTML-escaped torrent name.

Beispielantwort

{
  "error": 0,
  "message": "OK",
  "torrent_id": "dc6521c4fec8641eaa5901164c8e57e16a790e05",
  "torrent_link": "Ubuntu.22.04.LTS.iso"
}
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.

Codebeispiele

# 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'
<?php
// Adding a magnet
$ch = curl_init('https://bestdebrid.com/api/v1/torrentFile');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => ['Authorization: YOUR_API_KEY'],
    CURLOPT_POSTFIELDS     => http_build_query([
        'magnet' => 'magnet:?xt=urn:btih:...',
        'isFile' => 0,
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

// Adding a .torrent file
$encoded = base64_encode(file_get_contents('/path/to/file.torrent'));
// ... POST with magnet=$encoded & isFile=1
// magnet
await fetch('https://bestdebrid.com/api/v1/torrentFile', {
  method : 'POST',
  headers: { 'Authorization': 'YOUR_API_KEY' },
  body   : new URLSearchParams({ magnet: 'magnet:?xt=urn:btih:...', isFile: '0' })
});

// .torrent file
const buf = await fetch('/my.torrent').then(r => r.arrayBuffer());
const b64 = btoa(String.fromCharCode(...new Uint8Array(buf)));
await fetch('https://bestdebrid.com/api/v1/torrentFile', {
  method : 'POST',
  headers: { 'Authorization': 'YOUR_API_KEY' },
  body   : new URLSearchParams({ magnet: b64, isFile: '1' })
});

Aktive Torrents auflisten

Liefert bis zu 5 aktuelle aktive Torrents des Kontos (abgeschlossen, laufend oder wartend — nicht gelöschte).

GEThttps://bestdebrid.com/api/v1/gettorrentList

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.

Antwortschema (pro Eintrag)

FeldTypBeschreibung
idstringTorrent infohash (use as torrentid in other endpoints).
namestringTorrent display name.
ipstringIP that was locked to this torrent.
datestringTimestamp when the torrent was added.

Beispielantwort

[
  {
    "id": "dc6521c4fec8641eaa5901164c8e57e16a790e05",
    "name": "Ubuntu.22.04.LTS.iso",
    "ip": "1.2.3.4",
    "date": "2025-04-19 10: 12: 34"
  }
]
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' https://bestdebrid.com/api/v1/gettorrentList
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$list = json_decode(file_get_contents('https://bestdebrid.com/api/v1/gettorrentList', false, $ctx), true);
const list = await (await fetch('https://bestdebrid.com/api/v1/gettorrentList', {
  headers: { 'Authorization': 'YOUR_API_KEY' }
})).json();

Torrent-Details

Vollständige Details eines Torrents: Fortschritt, Ratio, Größe, Geschwindigkeit und — nach Abschluss — die Liste der herunterladbaren Dateien plus ein ZIP-Archiv.

GEThttps://bestdebrid.com/api/v1/gettorrentFile

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.
torrentiderforderlichstringTorrent infohash returned by /torrentFile or /gettorrentList.

Antwortschema

FeldTypBeschreibung
errorinteger0 on success.
idstringTorrent infohash.
messagestring"OK".
filenamestringTorrent display name.
img-progressstringRelative path to a status icon (img/torrents/ok.gif, deb-loading.gif, wait.png, error.gif).
progressfloatPercent done (0–1).
ratiofloat | stringUpload ratio; empty string when unknown.
seedersintegerNumber of connected peers.
sizeintegerTotal size in bytes.
sizeStringstringHuman-readable size (e.g. "3.2 GB").
speedstringCurrent download speed (e.g. "4.52 MB/s").
serverIDintegerInternal ID of the seedbox storing the torrent.
linksobject | stringOnce finished, an object with zip (URL of the full ZIP) and files (array of per-file URLs). While downloading, the literal string "Waiting...".

Beispielantwort

{
  "error": 0,
  "id": "dc6521c4fec8641eaa5901164c8e57e16a790e05",
  "message": "OK",
  "filename": "Ubuntu.22.04.LTS.iso",
  "img-progress": "img/torrents/ok.gif",
  "progress": 1,
  "ratio": 1.23,
  "seeders": 12,
  "size": 3489660928,
  "sizeString": "3.25 GB",
  "speed": "0.00 MB/s",
  "serverID": 4,
  "links": {
    "zip": "https://seedbox.bestdebrid.com/index.php?zip=dc6521...&filename=Ubuntu.22.04.LTS.iso",
    "files": [
      "https://seedbox.bestdebrid.com/index.php?filename=dc6521...&id=Ubuntu.22.04.LTS.iso"
    ]
  }
}
ZIP endpoint: links.zip downloads the whole torrent content as a single archive — convenient for multi-file releases.
Ausprobieren

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' \
  'https://bestdebrid.com/api/v1/gettorrentFile?torrentid=dc6521c4...'
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$t = json_decode(file_get_contents('https://bestdebrid.com/api/v1/gettorrentFile?torrentid=' . $hash, false, $ctx), true);

if ($t['error'] === 0 && is_array($t['links'])) {
    $zip   = $t['links']['zip'];
    $files = $t['links']['files'];
}
const t = await (await fetch('https://bestdebrid.com/api/v1/gettorrentFile?torrentid=' + hash, {
  headers: { 'Authorization': 'YOUR_API_KEY' }
})).json();

if (t.error === 0 && typeof t.links === 'object') {
  const zipUrl = t.links.zip;
  const files  = t.links.files;
}

Torrent löschen

Entfernt einen Torrent aus dem Konto. Die Dateien werden nur von der Seedbox gelöscht, wenn kein anderer Benutzer ihn in den letzten 4 Tagen hinzugefügt hat und die Ratio ≥ 1 ist.

DELhttps://bestdebrid.com/api/v1/deltorrentFile

Parameter

ParameterTypBeschreibung
autherforderlichstringYour API key — as Authorization header or ?auth= query param.
torrentiderforderlichstringTorrent infohash to delete.

Beispielantwort

{
  "error": 0,
  "message": "Torrent deleted"
}
Irreversible. The torrent entry and any generated download links will no longer be accessible from your account.
Unwiderrufliche Aktion: kein „Ausprobieren“-Block für diesen Endpunkt.

Codebeispiele

curl -H 'Authorization: YOUR_API_KEY' \
  'https://bestdebrid.com/api/v1/deltorrentFile?torrentid=dc6521c4...'
<?php
$ctx = stream_context_create(['http' => ['header' => "Authorization: YOUR_API_KEY\r\n"]]);
$r = json_decode(file_get_contents('https://bestdebrid.com/api/v1/deltorrentFile?torrentid=' . $hash, false, $ctx), true);
await fetch('https://bestdebrid.com/api/v1/deltorrentFile?torrentid=' + hash, {
  headers: { 'Authorization': 'YOUR_API_KEY' }
});
Kontingent erreicht oder Schlüssel fehlt? Schlüssel und Tarif finden Sie in Ihrem Profil.