YouTube video transcript API
The video's own captions: the language you ask for.
100 free credits. No card needed.
dQw4w9WgXcQ, de
Sent with an id and the language
- Cost
- 1 credit
- Fields
- 11
- Cached
- 30 days
One transcript a request
What you get in each transcript
What you can build with it
Captions in the language you need. Ask for language=de and you get the German track where the video has one, de-DE in the sample. available_languages lists every language on offer: de-DE, en and es-419 here.
- language
- de-DE
- source
- captions
- language_name
- German (Germany)
- duration_seconds
- 213
Typed or recognised, told apart. source is captions when the uploader typed them and auto_captions when YouTube recognised the speech, and extra.tracks marks each track auto or not, so a study can keep the typed ones only.
- en
- English
- en
- English (auto-generated)
- de-DE
- German (Germany)
Timed lines for clips and quotes. Each segment has its start and end in seconds, 18.64 to 21.88 for the sample's first line, so a quote links straight to its moment in the video.
- 18.64
- Uns beiden ist die Liebe nicht...
- 22.64
- Du kennst die Regeln genau wie ich
- 27.04
- Für mich zählst nur du
From a key to JSON.
id (dQw4w9WgXcQ) and language (de).data.The request. GET /v1/youtube/video/transcript
curl -G "https://api.socialscrape.dev/v1/youtube/video/transcript" \ -d id=dQw4w9WgXcQ \ -d language=de \ -H "x-api-key: $SOCIALSCRAPE_API_KEY"
import requests r = requests.get( "https://api.socialscrape.dev/v1/youtube/video/transcript", params={"id": "dQw4w9WgXcQ", "language": "de"}, headers={"x-api-key": KEY}, ) transcript = r.json()["data"]
const url = new URL("https://api.socialscrape.dev/v1/youtube/video/transcript"); url.searchParams.set("id", "dQw4w9WgXcQ"); url.searchParams.set("language", "de"); const res = await fetch(url, { headers: { "x-api-key": KEY }, }); const { data } = await res.json();
The response. A sample, in the shape every call returns.
{
"ok": true,
"credits_charged": 1,
"data": {
"text": "Uns beiden ist die Liebe nicht...",
"duration_seconds": 213,
"url": "https://www.youtube.com/watch?v=d...",
"video_id": "dQw4w9WgXcQ",
"language": "de-DE",
"source": "captions",
"segments": [ ..., ..., ... ],
...
}
}
Ask in plain words. Ask your agent for YouTube video transcript in plain words, and the SocialScrape MCP server makes the call.
Get the video transcript for dQw4w9WgXcQ.
Here is the transcript: "Uns beiden ist die Liebe nicht fremd...".
One tool call
YouTube video transcript, given an id.
Same price as the API
1 credit a call; a repeat within 30 days is free.
Runs on your machine
Your key stays in your agent's settings.
Pay only for data you get.
Failed requests and cached repeats are free.
1,000 credits
$13 one time
Get an API key- $13.00 per 1,000 credits
- Credits never expire
- No subscription
25,000 credits
$55 one time
Get an API key- $2.20 per 1,000 credits
- Credits never expire
- No subscription
230,000 credits
$349 one time
Get an API key- $1.52 per 1,000 credits
- Credits never expire
- No subscription
Questions, answered.
Common questions
What if a YouTube video has no captions?
It answers transcript_unavailable and costs nothing. AI transcription of YouTube audio is not available yet.
What does original_audio do?
It returns captions only in the language the video is spoken in, and it takes precedence over language.
Can I ask for a regional code like en-US?
Yes. language takes codes such as en, es or en-US, and overrides the default track unless original_audio is set.
What does it return?
Or the original audio's, typed by the uploader or recognised by YouTube (source), with the languages on offer. A video without captions answers transcript_unavailable and costs nothing; AI transcription of YouTube audio is not available yet. The transcript has up to 11 fields, and the sample fills video_id, url, language, source, duration_seconds, text, segments and available_languages.
What do I send?
Send one of url or id.
url: Video or Short URL (watch, youtu.be, shorts, live, embed).
id: 11-character video id.
language: Language code ("en", "es", "en-US"). Overrides the default track unless original_audio is set.
original_audio: Only return captions in the video's original spoken language. Takes precedence over language.
Which errors can it return?
invalid_params, unsupported_url, not_found and transcript_unavailable. None is charged, and the errors list says which to retry.
Is there an SDK call for it?
client.youtube.video_transcript(...) in Python and client.youtube.videoTranscript() in TypeScript.
Start pulling social data.
100 free credits. No card needed.