How-to guide
How to get a YouTube video transcript from a URL
Send the video URL to youtube/video/transcript and it returns the spoken transcript as timestamped segments, each with its text, start time and duration, plus the language, word count and speech rate. You can then search, quote or summarise the text in your own code. A run costs 3 credits.
3 credits per run, in one API call
The calls, in order
Each step is one request to the SocialCrawl API. Copy the curl, add your key and run it.
Get YouTube video transcript
3 credits per callTry this call on its endpoint page: Get YouTube video transcriptcurlcurl -H "x-api-key: YOUR_API_KEY" \ "https://www.socialcrawl.dev/v1/youtube/video/transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ"
What comes back
A real response from youtube/video/transcript, captured from the SocialCrawl API, with long lists cut to two rows.
JSON
{
"success": true,
"platform": "youtube",
"endpoint": "/v1/youtube/video/transcript",
"data": {
"transcript": [
{
"text": "[♪♪♪]",
"duration": 1.68,
"offset": 1.36,
"lang": "en",
"wordCount": 0,
"speechRate": 0
},
{
"text": "♪ We're no strangers to love ♪",
"duration": 3.24,
"offset": 18.64,
"lang": "en",
"wordCount": 5,
"speechRate": 93
}
]
},
"credits_used": 0,
"request_id": "req_example000000",
"cached": true,
"credits_remaining": 9999,
"source": "captured",
"captured_at": "2026-10-02T12:45:01.380Z",
"redacted": true
}Hand this job to your coding agent
Paste this prompt into Claude Code, Cursor or any agent that can make HTTP requests. It names every endpoint and parameter the job needs.
Prompt
Use the SocialCrawl API for this job: Get the full transcript of a video to search, summarise or quote it.
Base URL: https://www.socialcrawl.dev. Send the API key in the x-api-key header (an Authorization: Bearer header also works). Values in braces are placeholders to fill.
1. GET /v1/youtube/video/transcript?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ
Every response is JSON with data, credits_used and request_id. The full endpoint reference is at https://www.socialcrawl.dev/llms.txt.FAQ
Have a question? We got answers
Find answers to frequently asked questions about SocialCrawl's API, pricing, and capabilities.
Contact usWhat does the transcript look like?
It is a list of segments, each with text, an offset in seconds, a duration, the language and a word count. Join the text fields for plain prose, or keep the offsets to link a quote to its moment.
What if the video has no captions?
The reply is a 404 that names the reason. The registry describes this as expected rather than a failure, so handle it in your code by skipping the video or logging that no transcript exists.
Can I get transcripts for many videos?
Yes. POST /v1/youtube/transcripts takes up to 100 video ids per request, and a video without captions comes back as not found instead of failing the batch.
Does it return the title and views as well?
It does not. The transcript response holds the spoken text and its timing data. For the video's own details, use the YouTube video endpoint in the registry and join the two on the video URL.
Will it translate the transcript?
It does not translate. Pass language=es, for example, to get the Spanish caption track when the video has one; when no track matches you get a 404 that costs nothing.
How much does one run cost?
One run of the example above costs 3 credits across one API call. Every new account gets 100 free credits, credits for failed or empty calls are refunded automatically, and there is no subscription.
Ask AI about SocialCrawl
