# Quickstart

Make your first request in under a minute.

Source: https://youtubetranscriptapi.com/docs/quickstart

## 1. Get an API key

[Sign up](https://youtubetranscriptapi.com/signup) 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"
```

A video not fetched before usually takes 10–30 seconds; videos already fetched return in about a second. Set your HTTP client timeout to at least 60 seconds.

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

```json
{
  "video_id": "dQw4w9WgXcQ",
  "language": "en",
  "transcript": [
    { "text": "First caption line",  "start": 0,    "duration": 4.12 },
    { "text": "Second caption line", "start": 4.12, "duration": 3.85 }
  ]
}
```

## 3. Handle errors and rate limits

Successful responses include `X-RateLimit-*` headers and an `X-Cache-Status` header (`HIT` or `MISS`), plus `X-Credits-Charged` and `X-Credits-Remaining` with your balance. Most errors carry the rate-limit headers too; 401, 403 and a 503 from a failed account check don't. On 429, 408 and 503 we'll return a `Retry-After` header. See the [errors guide](https://youtubetranscriptapi.com/docs/errors) for the full list of status codes and the retry policy we recommend.

## Where to next

- [Full API Reference](https://youtubetranscriptapi.com/docs/api) — every endpoint and field.
- Step-by-step guides for [Python](https://youtubetranscriptapi.com/youtube-transcript-api-python), [JavaScript & Node.js](https://youtubetranscriptapi.com/youtube-transcript-api-javascript) and [cURL & REST](https://youtubetranscriptapi.com/youtube-transcript-api-curl).
- [Authentication & key rotation](https://youtubetranscriptapi.com/docs/authentication).
- [Agent Skills](https://youtubetranscriptapi.com/docs/agent-skills) for Claude Code and other coding agents.
