# I built an API that gives any AI the ability to learn from YouTube

> Source: <https://dev.to/asfi/i-built-an-api-that-gives-any-ai-the-ability-to-learn-from-youtube-4hma>
> Published: 2026-05-30 07:49:07+00:00

YouTube is the world's largest knowledge base. Billions of hours of tutorials, lectures, interviews, and technical walkthroughs — and your AI agent can't touch any of it.

It can read text. It can search the web. But it can't watch a video.

I built TubeScribe API to fix that.

When you're building an AI agent or RAG pipeline, you constantly run into this wall. A user asks "summarize this YouTube video" or "extract the key points from this lecture" — and you have nothing. The transcript might be buried in auto-generated captions, or not exist at all for older videos.

You could build your own solution. Pull the Innertube API, parse the caption XML, handle Whisper fallback for videos with no captions, deal with rate limits and format variations... or you could just make one API call.

```
curl "https://transcriptapi.dev/transcript?url=https://youtube.com/watch?v=VIDEO_ID&summary=true" \
  -H "X-API-Key: your_key"
```

Response:

```
{
  "title": "...",
  "channel": "...",
  "duration": 1247,
  "transcript": [
    { "text": "Welcome back everyone...", "start": 0.0, "duration": 3.2 },
    ...
  ],
  "summary": "This video covers...",
  "wordCount": 4821,
  "cached": false
}
```

That's it. Full transcript with timestamps, video metadata, and an optional Claude AI summary — all in one response.

`&summary=true`

and get a structured summary generated by Claude alongside the raw transcript.The API is built for developers and AI agents. JSON responses, standard REST, straightforward auth via `X-API-Key`

header.

OpenAPI spec available at [transcriptapi.dev/openapi.yaml](https://transcriptapi.dev/openapi.yaml) if you want to import it directly into Postman, Insomnia, or your agent framework.

If you're building anything with AI + video content, I'd love to hear what you're working on. Drop a comment below.

*Asfi*
