Yoinku

Yoinku API

A free HTTP API for fetching video metadata and download URLs from YouTube, TikTok and Instagram. Authenticate with a free API key from your account — CORS enabled, callable from your terminal, a script, or the browser.

API key authCORS enabledJSON responses5 req/min

Base URL

https://yoinku.com/api/v1

Authentication

Every request needs an API key in the x-api-key header. Keys are free: sign up and create one on your account page. API downloads count against the same daily limit as the web UI (30 per day per account).

curl -H "x-api-key: yk_..." "https://yoinku.com/api/v1/info?url=https://youtu.be/dQw4w9WgXcQ"
Manage your API keys

Endpoints

GET/api/v1/info

Video info

Returns the title, thumbnail, duration and the list of available formats for a video.

Parameters

url (required)
The YouTube, TikTok or Instagram video URL.

Example request

curl -H "x-api-key: yk_..." \
  "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 }
    ]
  }
}
GET/api/v1/download

Download 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, TikTok or Instagram 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 -H "x-api-key: yk_..." \
  "https://yoinku.com/api/v1/download?url=https://youtu.be/dQw4w9WgXcQ&format=v-720"

# …or download the file directly
curl -L -o video.mp4 -H "x-api-key: yk_..." \
  "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 5 per minute per IP, and downloads to 30 per day per account (shared with web downloads). 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), 401 (missing or invalid API key), 404 (not found), 422 (unsupported or failed), 429 (rate limited or daily quota exceeded).

Prefer a UI?

Use the Yoinku web app in your browser — paste a link and download, no code required.

Open the downloader

Use the API only for content you own or have permission to download. You are solely responsible for how you use it.