YouTube Transcripts Scraper avatar

YouTube Transcripts Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
YouTube Transcripts Scraper

YouTube Transcripts Scraper

Fetch the full transcript (closed captions) of any YouTube video that has captions enabled. Returns time-aligned segments + joined text.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Farhan Febrian Nauval

Farhan Febrian Nauval

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

15 days ago

Last modified

Categories

Share

Get the full transcript of YouTube videos: every caption line with its timestamp, the whole text joined for reading or feeding to an AI model, and basic video details. You choose the language you prefer.

What you get

One row per video that has captions:

FieldMeaning
videoId, url, titleThe video
channelName, channelIdWho published it
lengthSeconds, viewCountDuration and views
language, languageNameThe caption track returned, for example es / Spanish
isAutoGeneratedtrue when the captions are YouTube's automatic ones, false when the creator provided them
availableTracksEvery caption language the video offers
segmentCountNumber of caption lines
segmentsCaption lines: startSeconds, durationSeconds, text
textAll caption lines joined into one string

Example row (shortened)

{
"videoId": "dQw4w9WgXcQ",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"channelName": "Rick Astley",
"lengthSeconds": 213,
"language": "en",
"languageName": "English",
"isAutoGenerated": false,
"segmentCount": 61,
"segments": [
{ "startSeconds": 18.64, "durationSeconds": 3.24, "text": "♪ We're no strangers to love ♪" },
{ "startSeconds": 22.64, "durationSeconds": 4.32, "text": "♪ You know the rules and so do I ♪" }
],
"text": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ..."
}

Input

ParameterDefaultDescription
videos(required)Video URLs or ids: watch, youtu.be, Shorts and embed links all work
languageenPreferred caption language, for example es, de, id
proxyConfigurationResidentialKeep residential (see below)
{ "videos": ["https://www.youtube.com/watch?v=aircAruvnKk", "youtu.be/dQw4w9WgXcQ"], "language": "es" }

How the language is chosen

  1. Creator captions in your language
  2. Automatic captions in your language
  3. English (creator, then automatic)
  4. The first track the video has

So a request for es on a video with only Korean captions returns the Korean ones. Check language on each row, and availableTracks for what else exists.

Good to know

  • Use the residential proxy. YouTube answers most requests from Apify's own servers with "Sign in to confirm you're not a bot". Every video gets a fresh IP, and a blocked one is retried up to 4 times. Without a proxy most videos fail.
  • You pay only for transcripts. A video without captions, private, removed or blocked is not saved as a row. It is listed in the run's status message instead, for example 12 of 13 transcript(s) saved. Failed: .... A run where no video works fails.
  • Captions come from the video. Music videos often have lyric lines with ♪ marks, and some talks start with the translator's credit.
  • Long videos are long. A 4-hour course gives about 1,900 lines and 270,000 characters of text.

Use cases

  • Build a searchable library or an AI knowledge base from lectures, tutorials and podcasts.
  • Summarise videos or turn them into articles and notes.
  • Study what channels say about a topic over time.
  • Read a video's captions in another language when the creator provided them.

Scope

The actor reads publicly available captions of public videos, the same ones any viewer can turn on. It uses no login and no YouTube account. Respect the rights of video creators and YouTube's terms when you use the text.