Dokumentation der Video-Download-API

Mit unserer Any4K.com Video-Download-API kannst du Videos aus beliebten sozialen Plattformen wie YouTube, TikTok und Twitter ganz einfach herunterladen. Die API unterstützt verschiedene Videoqualitäten und Formate und bietet Funktionen zur Video- und Audio-Extraktion.
API-Endpunkte
Videoinformationen prüfen
Liefert Video-Metadaten und verfügbare Download-Formate.
Endpunkt: https://api.any4k.com/v1/dlp/check
Methode: POST
Content-Type: application/json
Anfrageparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| url | string | Ja | Die URL des herunterzuladenden Videos |
| lang | string | Nein | Sprachcode (Standard: en) |
| country | string | Nein | Ländercode (Standard: US) |
| platform | string | Nein | Plattformname (Standard: Web) |
| deviceId | string | Nein | Eindeutige Geräte-ID |
Anfragebeispiel
cURL
curl -X POST https://api.any4k.com/v1/dlp/check \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"lang": "en",
"country": "US",
"platform": "Web",
"deviceId": "your-device-id"
}'
Node.js
const axios = require('axios');
async function checkVideo() {
try {
const response = await axios.post('https://api.any4k.com/v1/dlp/check', {
url: 'https://www.youtube.com/watch?v=VIDEO_ID',
lang: 'en',
country: 'US',
platform: 'Web',
deviceId: 'your-device-id'
}, {
headers: {
'Content-Type': 'application/json'
}
});
console.log(response.data);
} catch (error) {
console.error('Fehler:', error.response.data);
}
}
Antwortformat
{
"err_code": 0,
"err_msg": "",
"data": {
"id": "VIDEO_ID",
"title": "Videotitel",
"description": "Videobeschreibung",
"duration": 180,
"view_count": 1000000,
"upload_date": "20240401",
"extractor": "youtube",
"is_live": false,
"thumbnail": "https://example.com/thumbnail.jpg",
"download": [
{
"id": "format_id",
"ext": "mp4",
"res_text": "1080p",
"filesize": 104857600
}
],
"raw_video": [
{
"id": "format_id",
"ext": "mp4",
"res_text": "4K",
"filesize": 524288000,
"vcodec": "h264"
}
],
"raw_audio": [
{
"id": "format_id",
"ext": "m4a",
"filesize": 3145728,
"acodec": "aac",
"asr": 44100
}
]
}
}
Video herunterladen
Lädt das Video im angegebenen Format herunter.
Endpunkt: https://api.any4k.com/v1/dlp/download
Methode: POST
Content-Type: application/json
Anfrageparameter
| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
| url | string | Ja | Die URL des Videos |
| format | string | Ja | Format-ID aus der Check-Antwort |
| lang | string | Nein | Sprachcode (Standard: en) |
| country | string | Nein | Ländercode (Standard: US) |
Anfragebeispiel
cURL
curl -X POST https://api.any4k.com/v1/dlp/download \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"format": "format_id",
"lang": "en",
"country": "US"
}'
Node.js
const axios = require('axios');
async function downloadVideo() {
try {
const response = await axios.post('https://api.any4k.com/v1/dlp/download', {
url: 'https://www.youtube.com/watch?v=VIDEO_ID',
format: 'format_id',
lang: 'en',
country: 'US'
}, {
headers: {
'Content-Type': 'application/json'
},
responseType: 'stream'
});
// Video-Stream verarbeiten
response.data.pipe(fs.createWriteStream('video.mp4'));
} catch (error) {
console.error('Fehler:', error.message);
}
}
Fehlercodes
| Code | Beschreibung |
|---|---|
| 0 | Erfolg |
| 400 | Ungültige Anfrage – fehlerhafte Parameter |
| 401 | Nicht autorisiert – ungültiger API-Schlüssel |
| 403 | Verboten – Zugriff verweigert |
| 404 | Nicht gefunden – Video nicht gefunden |
| 429 | Zu viele Anfragen – Rate-Limit überschritten |
| 500 | Interner Serverfehler |
| 502 | Bad Gateway – Fehler der Videoplattform |
Unterstützte Plattformen
- YouTube
- TikTok
- Vimeo
- Dailymotion
- und viele mehr ...
Rate-Limits
- Kostenlose Version: 100 Anfragen pro Tag
- Pro-Version: 1000 Anfragen pro Tag
- Enterprise-Version: individuelle Limits
Best Practices
- Prüfe vor dem Download stets die Videoinformationen
- Gehe sinnvoll mit Rate-Limits um
- Implementiere eine saubere Fehlerbehandlung
- Cache Antworten, wenn möglich
- Verwende angemessene Timeout-Werte
Support
Für technischen Support oder Fragen wende dich bitte an:
- E-Mail: api@any4k.com
- Dokumentation: https://any4k.com/api
Frequently Asked Questions
Was kann die Any4K Video-Download-API?
Sie kann öffentliche Video-URLs prüfen, Metadaten und verfügbare Formate zurückgeben und Downloads über die dokumentierten Endpunkte starten.
Welche Plattformen werden unterstützt?
Die API ist auf beliebte Plattformen wie YouTube, TikTok, Twitter/X, Facebook, Instagram, Vimeo, Dailymotion, Twitch und weitere ausgelegt, sofern öffentlicher Zugriff besteht.
Muss ich den Check-Endpunkt vor dem Download aufrufen?
Ja. Prüfe zuerst die Videoinformationen, um Formate anzuzeigen, nicht unterstützte Videos zu erkennen und die richtige Download-Option zu wählen.