The YouTube Transcript API extracts the full transcript (subtitles) from a YouTube video.Documentation Index
Fetch the complete documentation index at: https://docs.hasdata.com/llms.txt
Use this file to discover all available pages before exploring further.
Get Your API Key
Sign in at hasdata.com, go to your account settings, and copy your API key. All requests must include your key in thex-api-key header.
Request Cost and API Credits
Each request to the YouTube Transcript API consumes API Credits from your account balance.- Cost per request: 10 API Credits
- Credits are deducted only for successful requests.
- Your total available credits depend on your active plan.
Make Your First Request
API Parameters
| Parameter | Default Value | Required | Description |
|---|---|---|---|
v | dQw4w9WgXcQ | Yes | 11-character YouTube video ID — the value of the v= query parameter in a watch URL (e.g. dQw4w9WgXcQ for https://www.youtube.com/watch?v=dQw4w9WgXcQ). |
languageCode | en | No | BCP-47 / YouTube language code of the transcript track to return (e.g. en, de, en-US, pt-BR). Must match a track that the video actually has. When omitted, the video’s default language track is returned. |
type | - | No | Set to asr to fetch the YouTube auto-generated (speech-recognition) track. Omit to fetch the human-authored track for languageCode when one exists. |