YouTube transcripts
Turn YouTube watch, Shorts, live, embed, and short URLs into timestamped text.
Send a YouTube video URL to POST /youtube/transcript. Berrycrawl reads its available captions and
returns a timestamped transcript through the standard scrape response shape. The focused endpoint
only accepts URLs that identify one YouTube video.
curl https://api.berrycrawl.com/api/v1/youtube/transcript \
-H "Authorization: Bearer $BERRYCRAWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=aircAruvnKk",
"formats": ["markdown"],
"timeout": 60000
}'The same request is available in the dashboard playground.
Existing scrape integrations keep working
YouTube video URLs remain supported by POST /scrape. Use POST /youtube/transcript for a focused contract and clearer usage attribution.
Supported URL forms
Berrycrawl recognizes URLs that identify one video.
| URL form | Example |
|---|---|
| Watch | youtube.com/watch?v=aircAruvnKk |
| Short link | youtu.be/aircAruvnKk |
| Shorts | youtube.com/shorts/aircAruvnKk |
| Live | youtube.com/live/aircAruvnKk |
| Embed | youtube.com/embed/aircAruvnKk |
| Privacy-enhanced embed | youtube-nocookie.com/embed/aircAruvnKk |
Channel, playlist, search, and profile URLs do not identify one video and use normal page scraping.
Response
The response uses the same shape as every scrape. Requested text formats appear under data.
For Markdown, each caption segment includes its playback timestamp.
{
"success": true,
"data": {
"markdown": "# Video title\n\nBy Creator\n\n[0:00] ..."
},
"metadata": {
"source": "youtube-transcript",
"videoId": "aircAruvnKk",
"language": "en",
"title": "Video title",
"authorName": "Creator"
},
"credits": { "used": 5 }
}Title, creator, duration, language, and thumbnail fields are included when the caption source provides them. You can also request HTML, raw HTML, links, a summary, or structured JSON through the usual scrape formats.
Price
Every successful YouTube transcript response costs 5 credits. Missing captions and failed requests are not charged.
Dedicated endpoint versus page scraping
POST /youtube/transcript always returns a transcript and does not accept browser actions, proxy
controls, or waitFor. To load the YouTube page itself, use POST /scrape with browser options or
use POST /screenshot to capture it.
For compatibility, POST /scrape still auto-detects supported YouTube video URLs when no browser
action or waitFor value is present. The Playground has separate YouTube and Scrape screens
so you can try both request paths.
Errors
| Status | Meaning | Next action |
|---|---|---|
404 | No transcript is available for the video | Try another video or verify captions exist |
400 | The URL or request options are invalid | Use one supported single-video URL |
502 / 503 | The caption source is temporarily unavailable | Retry with exponential backoff and jitter |
504 | The transcript request exceeded its timeout | Retry with a larger timeout, up to 60 seconds |
Do not blindly retry 404: a video without available captions will keep returning the same result.