English | 简体中文
Get the transcript of any YouTube video as timed segments or plain text, in the language you choose.
Powered by Serpent API. Full reference: YouTube Transcript API docs.
- Get an API key at apiserpent.com. Every account starts with 10 free API calls.
- Call the endpoint with your key in the
X-API-Keyheader:
curl -G "https://apiserpent.com/api/social/youtube/transcript" \
--data-urlencode "video=https://youtu.be/8jPQjjsBbIc" \
--data-urlencode "output=text" \
-H "X-API-Key: $SERPENT_API_KEY"GET https://apiserpent.com/api/social/youtube/transcript
| Parameter | Required | Description |
|---|---|---|
video |
Yes | 11-character video id or any YouTube link (watch, youtu.be, Shorts, embed, live) |
lang |
No | Language code such as en, de, pt-BR. Omit for the video's main language. |
output |
No | segments (default) or text |
video_id, title, channel, duration_seconds, language, is_auto_generated, available_languages[], segments[] (start, duration, text), text.
See the docs for the complete field list and sample responses.
| File | Language | Run |
|---|---|---|
example.py |
Python 3 (pip install requests) |
SERPENT_API_KEY=sk_live_... python example.py |
example.mjs |
Node.js 18+ (no dependencies) | SERPENT_API_KEY=sk_live_... node example.mjs |
- Video summarisation with LLMs
- Search and RAG over video content
- Subtitles, captions and content repurposing
- Serpent API docs - Google, Bing, Yahoo, DuckDuckGo and Brave search, plus AI rank tracking
- All SDKs and tools on GitHub
MIT