Appearance
Transcript
GET /v1/youtube/video/transcript
Retrieves the captions, subtitles, or transcript of a YouTube video or short. Returns both a timestamped transcript array with start/end times and a plain-text version in transcript_only_text. Supports specifying a language code. Note: the video must be under 2 minutes for transcript extraction to work.
Authentication
All requests require the x-api-key header. Get your key at scrapecreators.com.
Query Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
url | string | yes | YouTube video or short URL | https://www.youtube.com/watch?v=bjVIDXPP7Uk |
language | string | no | 2 letter language code, ie 'en', 'es', 'fr' etc. If the transcript is not available in the language you specify, the transcript will be null. | en |
Example Request
curl
bash
curl 'https://api.scrapecreators.com/v1/youtube/video/transcript?url=https://www.youtube.com/watch?v=bjVIDXPP7Uk' \
-H 'x-api-key: $SCRAPECREATORS_API_KEY'Node / TypeScript
js
const params = new URLSearchParams({ url: 'https://www.youtube.com/watch?v=bjVIDXPP7Uk' });
const res = await fetch(`https://api.scrapecreators.com/v1/youtube/video/transcript?${params}`, {
headers: { 'x-api-key': process.env.SCRAPECREATORS_API_KEY }
});
const data = await res.json();
console.log(data);Python
python
import os, requests
r = requests.get(
'https://api.scrapecreators.com/v1/youtube/video/transcript',
headers={'x-api-key': os.environ['SCRAPECREATORS_API_KEY']},
params={'url': 'https://www.youtube.com/watch?v=bjVIDXPP7Uk'},
)
r.raise_for_status()
print(r.json())CLI
bash
scrapecreators youtube video-transcript --helpExample Response
json
{
"videoId": "bjVIDXPP7Uk",
"type": "video",
"url": "https://www.youtube.com/watch?v=bjVIDXPP7Uk",
"transcript": [
{
"text": "welcome back to the hell farm and the",
"startMs": "160",
"endMs": "1920",
"startTimeText": "0:00"
}
],
"transcript_only_text": "welcome back to the hell farm and the backyard trails we built these jumps two years ago and last year we just kind of rebuilt them and this year......",
"language": "English"
}Credits
Most ScrapeCreators endpoints consume 1 credit per successful response. Some heavier endpoints (transcripts, AI-driven enrichment, ad detail lookups) may cost more. Check GET /v1/credit-balance for your remaining balance.
Errors
| Status | Meaning | Action |
|---|---|---|
| 200 | Success. | Use the JSON payload. |
| 400 | Invalid or missing parameter. | Verify required parameters and value format. |
| 401 | Missing or invalid x-api-key. | Pass a valid API key in the header. |
| 402 | Out of credits. | Top up at scrapecreators.com or wait for plan reset. |
| 404 | Resource not found or private. | Confirm the handle, URL, or id and that the resource is public. |
| 429 | Rate limited. | Backoff and retry with exponential delay. |
| 500 | Server error or upstream platform failure. | Retry with backoff; report persistent errors to support. |