YouTube Transcript API
Pricing
from $0.30 / 1,000 results
YouTube Transcript API
Need to grab the words from YouTube videos? YouTube Transcript API is here to help! It's easy to use and gets the job done, plus it gives you some extra info too. Go ahead and try it!
Pricing
from $0.30 / 1,000 results
Rating
0.0
(0)
Developer
Novi
Maintained by CommunityActor stats
0
Bookmarked
71
Total users
0
Monthly active users
3 days ago
Last modified
Categories
Features
Share
Get the full transcript (captions / subtitles) of any YouTube video as clean JSON, with a timestamp and duration for every line. Every result also includes the video title and channel. Paste video URLs or IDs and download the results as JSON, CSV, Excel or via API.
What can this YouTube Transcript API do?
- 📝 Extract transcripts from YouTube videos, both manually uploaded captions and auto-generated ones
- ⏱️ Timestamps included: every line has
startanddurationin seconds, ready for subtitles, chaptering or search - 📺 Video metadata included: video title, channel name, channel ID and channel URL in every result
- 🌍 Language info: lists every caption language the video has in
availableLanguages - 🔗 Bulk input: process many videos in one run, using full URLs,
youtu.belinks, Shorts, embed links or plain video IDs - 🛡️ Keeps going on errors: if a video has no transcript, you still get a row with an
errormessage and the run continues - 🔌 Use it anywhere: Apify API, Python and JavaScript clients, n8n, Make, Zapier, or as an MCP tool for AI agents
What can I use YouTube transcripts for?
- AI and LLM pipelines: summarize videos, build RAG datasets, or feed transcripts to ChatGPT or Claude
- Content repurposing: turn videos into blog posts, newsletters, show notes or social posts
- SEO and research: analyze what competitors say in their videos and find keywords and topics
- Subtitles and accessibility: generate subtitle files or translate captions
- Education: build searchable notes from lectures and tutorials
How to get a YouTube transcript
- Click Try for free and open the actor in Apify Console.
- Add one or more YouTube video URLs or IDs to Video URLs/ID.
- Optionally set your preferred language code (default
en). - Keep Proxy Configuration on RESIDENTIAL for the most reliable results.
- Click Start, then download the dataset in JSON, CSV, Excel or HTML.
Input
| Field | Type | Description |
|---|---|---|
video_urls | string[] | YouTube video URLs or IDs. Supports youtube.com/watch?v=, youtu.be/, /shorts/, /embed/, /live/ and plain IDs. |
language | string | Preferred language code (e.g. en, es, vi). Prefers manual captions over auto-generated ones; falls back to the default track if unavailable. |
proxyConfiguration | object | Proxy settings. Defaults to RESIDENTIAL because YouTube blocks most datacenter IPs. |
Input example
{"video_urls": ["https://www.youtube.com/watch?v=2IK3DFHRFfw","https://youtu.be/dQw4w9WgXcQ","qYNweeDHiyU"],"language": "en","proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}}
Output
Each video becomes one item in the dataset:
| Field | Description |
|---|---|
videoId | The YouTube video ID |
url | Link to the video |
title | Video title |
channelName | Channel name |
channelId | Channel ID (UC...) |
channelUrl | Channel URL |
language | Language code of the returned transcript |
availableLanguages | Caption languages the video has |
transcripts | Transcript lines, each with text, start (seconds) and duration (seconds) |
error | Only present when the transcript could not be retrieved |
Output example
{"videoId": "2IK3DFHRFfw","url": "https://www.youtube.com/watch?v=2IK3DFHRFfw","title": "Generative AI in a Nutshell - how to survive and thrive in the age of AI","channelName": "Henrik Kniberg","channelId": "UCW0cG4zyFG8oKAlOom4KonQ","channelUrl": "http://www.youtube.com/@henrikkniberg","availableLanguages": ["en", "iw"],"transcripts": [{"text": "[Music]","start": 0,"duration": 5.839},{"text": "ever since computers were invented they've really just been glorified calculators machines that execute the exact instructions given to them by the","start": 5,"duration": 8.2}]}
Use the YouTube Transcript API from code
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("novi/youtube-transcript-api").call(run_input={"video_urls": ["https://www.youtube.com/watch?v=2IK3DFHRFfw"],"language": "en","proxyConfiguration": {"useApifyProxy": True, "apifyProxyGroups": ["RESIDENTIAL"]},})for item in client.dataset(run["defaultDatasetId"]).iterate_items():full_text = " ".join(line["text"] for line in item["transcripts"])print(item["title"], "-", item["channelName"])print(full_text[:200])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('novi/youtube-transcript-api').call({video_urls: ['https://www.youtube.com/watch?v=2IK3DFHRFfw'],language: 'en',proxyConfiguration: { useApifyProxy: true, apifyProxyGroups: ['RESIDENTIAL'] },});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Use with AI Agents (MCP)
Connect this Actor directly to Claude Desktop, Cursor, or any MCP-compatible AI agent using Apify's hosted MCP server:
{"mcpServers": {"apify-youtube-transcript": {"url": "https://mcp.apify.com/?tools=novi/youtube-transcript-api","headers": {"Authorization": "Bearer <YOUR_APIFY_TOKEN>"}}}}
Use it in n8n
This Actor is also available as an n8n community node: n8n-nodes-youtube-transcript-scraper.
- In your n8n instance, open Settings > Community Nodes, select Install, enter
n8n-nodes-youtube-transcript-scraperand confirm. - Add the Apify YouTube Transcript API node to a workflow and connect your Apify account (API key or OAuth2).
- Fill in the same fields as the Actor input and run the workflow. Each result comes back as its own n8n item.
The node also works as a tool for the n8n AI Agent. Runs are billed to your Apify account at the same price as runs started from Apify Console.
FAQ
Why does a result have an error field and no transcript?
The uploader disabled captions, YouTube has no transcript for the video, or the video is private, deleted or age-restricted.
Can I choose the transcript language?
Yes. Pass a language code like en, es or vi in language. Manual captions are preferred over auto-generated ones; if the requested language isn't available, the actor falls back to the video's default track and lists every available code in availableLanguages.
Does it work with auto-generated captions? Yes. If the uploader did not add captions, YouTube's auto-generated transcript is used.
Why should I use RESIDENTIAL proxies? YouTube rate-limits and shows captchas to datacenter IPs. Residential proxies make runs much more reliable, especially for large batches.
Can I get the transcript as plain text?
Join the text fields of transcripts, as in the Python example above.
Is scraping YouTube transcripts legal? This actor only reads publicly available captions. Make sure your use of the data follows YouTube's terms and the laws that apply to you, especially for copyrighted content.
Support
Found a bug or need a feature? Open an issue in the Issues tab and we usually reply within a day.