YouTube transcript getter

Paste a YouTube link. Get the captions as text, with timestamps.

SampleRecorded public data, shortened. Run the tool for a live result.

de-DECaptions3:333 lines

Uns beiden ist die Liebe nicht fremd

Du kennst die Regeln genau wie ich

Für mich zählst nur du

Also available: de-DE, en, es-419

Free, no signup. A limited number of lookups per visitor each hour. Public data only.

How it works

The tool reads the captions YouTube already holds for the video: the ones the uploader typed, or the ones YouTube generated. It works with watch links, youtu.be links, Shorts and live replays. A video with no captions at all has nothing to return, and the tool says so.

Use this in your app

This tool calls GET /v1/youtube/video/transcript. See the reference, or get early access for a key.

curl
curl -G "https://api.socialscrape.io/v1/youtube/video/transcript" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "id=dQw4w9WgXcQ" \
  --data-urlencode "language=de"
Python
import os
import requests

params = {
    "id": "dQw4w9WgXcQ",
    "language": "de",
}
res = requests.get(
    "https://api.socialscrape.io/v1/youtube/video/transcript",
    headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
    params=params,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
const url = new URL("https://api.socialscrape.io/v1/youtube/video/transcript");
url.search = new URLSearchParams({
  "id": "dQw4w9WgXcQ",
  "language": "de"
}).toString();
const res = await fetch(url, {
  headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();

if (body.ok) {
  console.log(body.data);
} else {
  console.error(body.error.code, body.error.message);
}
n8n
{
  "nodes": [
    {
      "name": "SocialScrape YouTube video transcript",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/youtube/video/transcript",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "dQw4w9WgXcQ"
            },
            {
              "name": "language",
              "value": "de"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Questions

Why does a video say no transcript is available?

The video has no captions, uploaded or generated, so there is nothing to read. Failed lookups cost nothing in the API.

Which language do I get?

The video's default track. The result lists the other languages on offer. To pick one in your own code, send the language parameter.

Is this tool free?

Yes. No account and no card. Each visitor gets a limited number of lookups an hour, so it stays free for everyone.

How do I get this data in my own app?

Send GET /v1/youtube/video/transcript with your key in the x-api-key header. A request costs 1 credit for captions; AI transcription 1 up to 2 minutes, then 1 per started minute. A repeat of something fetched recently costs 0 credits, and failed requests are free. See the reference.