Yoinku API
A free HTTP API for fetching video metadata and download URLs from YouTube and TikTok. No API key, CORS enabled — call it from your terminal, a script, or the browser.
Base URL
https://yoinku.com/api/v1Endpoints
/api/v1/infoVideo info
Returns the title, thumbnail, duration and the list of available formats for a video.
Parameters
- url (required)
- The YouTube or TikTok video URL.
Example request
curl "https://yoinku.com/api/v1/info?url=https://youtu.be/dQw4w9WgXcQ"Example response
{
"ok": true,
"data": {
"id": "dQw4w9WgXcQ",
"platform": "youtube",
"title": "Example video",
"durationSeconds": 213,
"thumbnailUrl": "https://i.ytimg.com/...",
"formats": [
{ "id": "v-1080", "kind": "video", "container": "mp4",
"quality": "1080p", "height": 1080,
"hasVideo": true, "hasAudio": true },
{ "id": "a-mp3", "kind": "audio", "container": "mp3",
"quality": "MP3", "hasVideo": false, "hasAudio": true }
]
}
}/api/v1/downloadDownload URL
Produces the file and returns a short-lived download URL (valid about one hour). Add redirect=1 to be sent straight to the file with a 302 — handy with curl -L.
Parameters
- url (required)
- The YouTube or TikTok video URL.
- format (required)
- A format id from the info response, e.g. v-720 or a-mp3.
- redirect (optional)
- Set to 1 to be 302-redirected to the file instead of receiving JSON.
Example request
# Get a short-lived download URL (JSON)
curl "https://yoinku.com/api/v1/download?url=https://youtu.be/dQw4w9WgXcQ&format=v-720"
# …or download the file directly
curl -L -o video.mp4 \
"https://yoinku.com/api/v1/download?url=https://youtu.be/dQw4w9WgXcQ&format=v-720&redirect=1"Example response
{
"ok": true,
"url": "https://<bucket>.r2.cloudflarestorage.com/...",
"filename": "Example video.mp4",
"expiresInSeconds": 3600
}Format IDs
Pick an id from the formats array in the info response. Video ids look like v-1080, v-720, v-360 (by height); audio ids are a-mp3 and a-m4a.
Fair use
Requests are limited to 30 per minute per IP. Going over returns HTTP 429 with a Retry-After header. Please be considerate and cache responses where you can.
Errors
Failures return { "ok": false, "error": { "code", "message" } } with a matching HTTP status: 400 (bad input), 404 (not found), 422 (unsupported or failed), 429 (rate limited).
Prefer a UI?
Use the Yoinku web app in your browser — paste a link and download, no code required.
Open the downloaderUse the API only for content you own or have permission to download. You are solely responsible for how you use it.