YouTube Transcript Scraper
Pricing
from $3.00 / 1,000 transcript delivereds
YouTube Transcript Scraper
Get the transcript of any YouTube video, playlist, channel or search result as JSON. Timestamps, SRT, translation and RAG chunks. No API key. $3 per 1,000 transcripts.
Pricing
from $3.00 / 1,000 transcript delivereds
Rating
0.0
(0)
Developer
ng. night
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Features
Share
Paste YouTube links, get the transcripts back as JSON. It takes single videos, playlists, channels, @handles and search queries. You don't need a YouTube API key, a login or a browser.
It reads the captions YouTube already has, either the ones the creator uploaded or the auto-generated ones. It does not listen to the audio. A video with no captions comes back as an error row, and error rows are free.
What you get for each video
- Title, channel name and ID, publish date, length, view count, category
- The transcript as one string, plus its word count
- The caption language, and whether it is
manual,autoortranslated - Every other caption language the video has
- Optional: timestamped lines, the same thing as SRT text, and fixed-length chunks (each with a link that opens the video at that second, which is handy for RAG)
Input
| Field | What it does |
|---|---|
| Videos, playlists or channels | Video links (watch, youtu.be, shorts, live), playlist links, channel links, @handles, or a bare 11-character video ID. You can mix them. |
| YouTube search queries | Each query is searched on YouTube and the top results are transcribed. |
| Max videos per playlist, channel or search | Default 5, up to 200. Channels are read newest first. Single video links are always included. |
| Language | Caption language code such as en, es, de, ja, zh-Hans. Uploaded captions win over auto-generated ones. |
| If the video has no captions in that language | original returns the spoken language, translate asks YouTube to machine-translate, skip returns an error row and charges nothing. |
| Timestamped segments / SRT / chunk seconds | Optional extra fields. Chunk seconds of 60 gives one chunk per minute. |
| Proxy | Leave Apify Proxy on. See "Limits" below. |
Example input:
{"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw", "@mkbhd"],"searchQueries": ["python tutorial"],"maxVideosPerSource": 3,"language": "en","chunkSeconds": 60}
Example output
This is a real row for a 19-second video, shortened:
{"videoId": "jNQXAC9IVRw","url": "https://www.youtube.com/watch?v=jNQXAC9IVRw","title": "Me at the zoo","channelName": "jawed","channelId": "UC4QobU6STFB0P71PMvOGN5A","publishedAt": "2005-04-23T20:31:52-07:00","category": "Film & Animation","lengthSeconds": 19,"language": "en","captionKind": "manual","availableLanguages": [{ "code": "en", "name": "English", "kind": "manual" },{ "code": "de", "name": "German", "kind": "manual" }],"wordCount": 39,"transcript": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say","source": "video"}
A video that can't be read gives a row like this instead, and you aren't charged for it:
{"videoId": "OAZpSsu03VA","errorCode": "NO_CAPTIONS","error": "This video has no captions at all (neither uploaded nor auto-generated)."}
Error codes: NO_CAPTIONS, LANGUAGE_MISSING, UNAVAILABLE, PRIVATE, AGE_RESTRICTED, MEMBERS_ONLY, NOT_STARTED, BLOCKED, INVALID_INPUT, NO_VIDEOS, CHANNEL_NOT_FOUND.
The run also saves a SUMMARY record with the counts per error code.
Price
$3 per 1,000 transcripts ($0.003 each), plus a start fee of $0.00004 per run. You pay only for rows that contain a transcript. If you set a maximum cost per run, the actor stops when it is reached.
Limits
- YouTube shows a bot check to most cloud IP addresses. The actor sends its requests through Apify Proxy (datacenter, included in every plan) and tries up to 6 different IPs per video. In a test of 30 search results, 27 came back with a transcript and 2 had no captions. The remaining one stayed
BLOCKEDon all 6 IPs. If you see manyBLOCKEDrows, run again or choose the RESIDENTIAL proxy group. - No captions, no transcript. There is no speech-to-text fallback.
- Age-restricted, private and members-only videos can't be read.
- A live stream usually has no captions until it ends.
publishedAtandcategoryare sometimesnullbecause YouTube doesn't always send them.- Auto-translation (
translate) is YouTube's machine translation, so expect the usual mistakes. - A video of several hours with segments, SRT and chunks all switched on can produce a row larger than the 9 MB dataset item limit. Switch off what you don't need.
Run it from code
curl -X POST "https://api.apify.com/v2/acts/night111~youtube-transcript-extractor/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"]}'
Questions
Open an issue in the Issues tab of this Actor with the video link and the error code you got.