# YouTube transcripts, by API.

> A YouTube transcript API: send a video link, get plain text or timed captions in the language you pick. One key, pay per answer, errors never charged.

Send a video link, get the transcript back. Plain text for summaries and search, timed lines for subtitles and finding a moment.

[Get started](https://wagamiai.com/signup)

Sign up is open, no card needed. Got an invite code? [Set up your account](https://wagamiai.com/setup)

### Plain text or timed lines

One string for summaries, search and prompts. Or timed lines with a start, a length and the words.

### Any language you pick

Choose a language by code. Manual captions come first, then automatic ones.

### A whole channel, one loop

List a channel's uploads, then ask for each transcript. Errors are never charged.

One call

## A link in, the words out.

Send an id or any YouTube link. Shorts and youtu.be links work too.

- Plain text or timed lines
- Manual captions first, then automatic
- A video with no captions answers with an error, and errors are never charged

POST /v1/transcript

```
curl -X POST "https://wagamiai.com/v1/transcript" \
  -H "Authorization: Bearer $WAGAMI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "dQw4w9WgXcQ", "lang": "en"}'
```

answer

```
{ "ok": true,
  "transcript": "The tide table is the first thing…" }
```

python

```
import os, requests
API = "https://wagamiai.com"
S = requests.Session()
S.headers["Authorization"] = f"Bearer {os.environ['WAGAMI_KEY']}"

up = S.post(f"{API}/v1/channel/videos",
            json={"ref": "@veritasium", "limit": 50}).json()
for v in up["items"]:
    t = S.post(f"{API}/v1/transcript", json={"ref": v["id"]}).json()
    if t.get("ok"):
        open(f"{v['id']}.txt", "w", encoding="utf-8").write(t["transcript"])
```

Questions

## Good to know

### What does a transcript cost?

3 credits, which is $1.50 per 1,000. 10,000 transcripts is 30,000 credits, about $15 at the base rate. Errors are never charged.

### What if a video has no captions?

The call answers with an error, and you are not charged.

### Which languages work?

Pick one by code with `lang`. Manual captions come first, then automatic ones. What exists depends on the video.

### Can I get every transcript from a channel?

Yes. List its uploads with `/v1/channel/videos`, then call `/v1/transcript` for each id. `GET /v1/limits` shows your key's limits, so a long job can pace itself.

## Pay per transcript. Nothing for errors.

10,000 transcripts is 30,000 credits, about $15 at the base rate. 2,000 credits = $1, from $25, and credits never expire.

[Get started](https://wagamiai.com/signup) [See pricing](https://wagamiai.com/pricing)

---
This is the Markdown copy of https://wagamiai.com/youtube-transcript-api (WagamiAI). Every page has one: add `.md` to its address. All pages: https://wagamiai.com/llms.txt
