# API Reference

Seven endpoints. Predictable JSON. Same shape forever.

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

## Base URL

```bash
https://youtubetranscriptapi.com/api/v2
```

OpenAPI 3.1 spec: [/openapi.json](https://youtubetranscriptapi.com/openapi.json)

## Authentication

Send your API key as a bearer token on every request:

```bash
Authorization: Bearer YOUR_API_KEY
```

## Endpoints

Click any endpoint to see its full reference: parameters, response shape, examples, and edge cases.

- [`GET /api/v2/youtube/transcript`](https://youtubetranscriptapi.com/docs/api/transcript) — 1 credit: Extract YouTube transcripts with or without timestamps.
- [`GET /api/v2/youtube/search`](https://youtubetranscriptapi.com/docs/api/search) — 4 credits: Search YouTube for videos or channels with rich metadata.
- [`GET /api/v2/youtube/channel/search`](https://youtubetranscriptapi.com/docs/api/channel) — 1 credit: Search videos within a specific channel.
- [`GET /api/v2/youtube/channel/videos`](https://youtubetranscriptapi.com/docs/api/channel) — 20 credits (first page): A channel's most recent uploads, up to 100 videos. Only the first page is served for now.
- [`GET /api/v2/youtube/channel/latest`](https://youtubetranscriptapi.com/docs/api/channel) — Free: RSS-based monitoring for the latest 15 uploads of a channel.
- [`GET /api/v2/youtube/playlist/videos`](https://youtubetranscriptapi.com/docs/api/playlist) — 20 credits (first page): Up to 100 videos from any public YouTube playlist. Only the first page is served for now.
- [`GET /api/v2/youtube/channel/resolve`](https://youtubetranscriptapi.com/docs/api/channel) — Free: Convert any @handle, URL, or UC… ID to a canonical channel ID.

## Account

`GET /api/v2/account/whoami` — Free

The plan and balance of the account that owns the key. Free, and it answers at a zero balance too, so it works as a pre-flight check before a batch job. `credits.spendable` is what the API can spend now; plan credits are left out of it while a renewal payment is failing.

```bash
curl "https://youtubetranscriptapi.com/api/v2/account/whoami" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json
{
  "user_id": "…",
  "plan": "free",
  "plan_status": null,
  "credits": { "spendable": 87, "plan": 0, "topup": 87 }
}
```

You don't need to poll it: every successful call carries `X-Credits-Charged` and `X-Credits-Remaining` headers. See [Rate Limits](https://youtubetranscriptapi.com/docs/rate-limits).
