Quickstart

Make your first request in under a minute.

1. Get an API key

Sign up for free — you get 100 credits with no credit card. Inside the dashboard, go to API Keys and click Create new key. Copy the full token (it's only shown once) and store it as an environment variable in your project.

bash
export API_KEY=tk_live_xxxxxxxxxxxxxxxxxxxx

2. Make a request

The simplest call: fetch a transcript by video ID.

bash
curl -X GET "https://youtubetranscriptapi.com/api/v2/youtube/transcript?video_url=dQw4w9WgXcQ" \
  -H "Authorization: Bearer $API_KEY"

The response includes the video ID, language, and a list of transcript segments.

json
{
  "video_id": "dQw4w9WgXcQ",
  "language": "en",
  "transcript": [
    { "text": "Never gonna give you up",  "start": 0.0,  "duration": 4.12 },
    { "text": "Never gonna let you down", "start": 4.12, "duration": 3.85 }
  ]
}

3. Handle errors and rate limits

Every response includes X-RateLimit-* headers and an X-Cache-Statusheader (HIT, PARTIAL-HIT, or MISS). On 429 we'll return a Retry-After header. See the errors guide for the full list of status codes and the retry policy we recommend.

Where to next