YouTube Transcript Scraper: captions with timestamps avatar

YouTube Transcript Scraper: captions with timestamps

Pricing

from $2.30 / 1,000 transcript delivereds

Go to Apify Store
YouTube Transcript Scraper: captions with timestamps

YouTube Transcript Scraper: captions with timestamps

YouTube captions and subtitles as full text plus timed segments, from video links or ids, a channel's latest videos or a playlist's latest videos. Picks your language, prefers manual captions, optional chunks for AI retrieval. Videos without captions are free. Not affiliated with YouTube or Google.

Pricing

from $2.30 / 1,000 transcript delivereds

Rating

0.0

(0)

Developer

Mohammed Samaan

Mohammed Samaan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Features

Limited permissions

Share

Get the public captions and subtitles of YouTube videos as full text plus timed lines. Give it video links or ids, a channel, or a playlist. It picks the language you ask for, prefers captions written by a person over automatic ones, and can cut the text into pieces for AI and search tools. Videos without captions cost nothing. This actor is not affiliated with or endorsed by YouTube or Google.

It reads only what a logged-out viewer can see: no login, no cookies, no browser, no video or audio download.

What you get

For each video that has captions: title, channel, length, the language of the caption that was read, whether YouTube generated it automatically, the whole transcript as one text, and the caption lines with start time and duration. Optionally the text is also cut into chunks of a size you choose.

FieldMeaning
rowTypetranscript for a delivered transcript, error for a free error row
videoId, urlThe 11 character video id and the link to the video
title, channelName, channelIdFrom YouTube's answer for that video (channelId and others are null when YouTube did not give them)
lengthSecondsVideo length in seconds
languageLanguage code of the caption that was read (en, de, pt-BR ...)
isAutoGeneratedtrue if YouTube generated the caption automatically, false if a person wrote or uploaded it
textThe whole caption as one text, lines joined by a space
segmentsList of { start, duration, text }, seconds. Left out when Include timed segments is off
segmentCountNumber of caption lines
chunksOnly when Chunk size is above 0: list of { index, start, text, approxTokens }
rowTrimmedOnly present, as true, when the row would have been over 8,500,000 bytes (UTF-8, as JSON), or could not be saved with them: segments and chunks were left out; text and segmentCount are still there
sourcevideo, or channel:<your entry> / playlist:<your entry>
scrapedAtWhen the row was read
input, errorKind, errorError rows only: what failed and why

It does not return view counts, likes, comments, descriptions or thumbnails, and it does not return subtitle files (SRT, VTT). It returns the caption lines as data.

Example

Input:

{
"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw", "VgOm8nqPlD4"],
"languages": ["en"],
"maxVideos": 3,
"chunkTokens": 0
}

Output (shape of one row; the text is shortened):

{
"rowType": "transcript",
"videoId": "jNQXAC9IVRw",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"title": "Me at the zoo",
"channelName": "jawed",
"channelId": "UC4QobU6STFB0P71PMvOGN5A",
"lengthSeconds": 19,
"language": "en",
"isAutoGenerated": false,
"text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... ...",
"segments": [
{ "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }
],
"segmentCount": 6,
"source": "video",
"scrapedAt": "2026-11-21T12:00:00.000Z"
}

How to use it

Apify Console: open the actor, paste video links into Videos (or channels into Channels, playlists into Playlists), set Max videos, and click Start. Results appear in the Transcripts table; download them as JSON, CSV or Excel.

API (JavaScript client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('leadharbor/youtube-transcripts').call({
videos: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],
languages: ['en'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].text);

Python client:

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("leadharbor/youtube-transcripts").call(run_input={
"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
"languages": ["en"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["videoId"], item["language"], item["segmentCount"])

Use your own Apify token in place of the placeholder. To cap what one run can cost, set a maximum charge for the run in the Console run options or in the client call.

Input

FieldMeaning
videosVideo links or 11 character ids: watch?v=, youtu.be/, shorts/, embed/, live/. Only youtube.com, www.youtube.com, m.youtube.com and youtu.be are accepted
channelsChannel links (youtube.com/@name, youtube.com/channel/UC...), @handles or channel ids. Reads the channel's latest videos, see the limits below
playlistsPlaylist links or ids (PL...). Reads the playlist's latest videos, see the limits below
maxVideosMost videos read in one run, 1 to 5000, default 50, counted over all three fields together
maxVideoMinutesVideos longer than this many minutes are not read: a free too_long row, no charge. 1 to 180, default 180
languagesCaption languages in order of preference, default ["en"]. en also matches en-US
fallbackToAnyLanguageOn (default): if none of your languages exists, take another language: with preferManualCaptions on, the first manual caption (or the first listed one if there is no manual caption); with it off, the first caption YouTube lists. Off: that video returns a free language_unavailable row
preferManualCaptionsOn (default): inside one language, the first manual caption (written by a person) is used, or the first listed one if there is no manual caption. Off: the first caption YouTube lists for that language is used, manual or not
chunkTokens0 = off. Otherwise 50 to 8000: adds chunks of about that many tokens, cut on word boundaries
includeSegmentsOn (default): include segments. Off: smaller rows

The order of languages wins over caption quality: with ["en","de"] an automatic English caption is used before a manual German one.

chunkTokens is an estimate (one word is counted as 1.3 tokens). It is not a count from any model's tokenizer, so leave some room under your model's limit.

Entries that are not valid (another website, localhost, an IP address, a file link, a broken id) are not fetched; each gets a free invalid_input row.

Why this one

  • You are not charged for videos without captions, blocked or private videos, videos over your length limit, or invalid input entries; each of these is a free error row that tells you why.
  • Blocked, rate-limited and empty answers are retried up to 2 times, each on a new residential proxy session.
  • One actor takes video links or ids, channels, @handles and playlists.
  • Optional chunks with start times for retrieval tools.
  • language and isAutoGenerated on every row, and a choice of language order with or without fallback.

What it does not do, compared with some other transcript actors: no view counts, likes, description, publish date or thumbnail; no SRT or XML output (the caption lines come as data); and channel and playlist inputs read only the latest ~15 videos.

Use cases

  • AI and retrieval (RAG): turn videos into text with timestamps; use chunks to feed a vector store, and start to link back to the moment in the video.
  • Summaries and notes: pass text to your own summarizer or LLM.
  • Subtitles and captions work: segments gives each line with start and duration, ready to convert into your subtitle format.
  • Research and monitoring: collect what a channel's recent videos say, search quotes across videos, compare topics between channels.
  • Datasets: build a text corpus from public captions you are allowed to use.

Price

Pay per event, one event named transcript per video that returned at least one caption line. There is no start fee. Prices by Apify plan:

Apify planPrice per 1,000 transcriptsPer transcript
Free$3.00$0.0030
Starter (Bronze)$2.50$0.0025
Scale and above (Silver, Gold, Platinum, Diamond)$2.30$0.0023

Not charged: error rows, videos without captions, private or removed videos, videos still blocked after retries, videos over maxVideoMinutes (too_long), rows too large to store (too_large), videos already delivered earlier in the same run, videos not read because of the maximum charge or the time budget, and invalid input entries. If you set a maximum charge for the run, the run stops cleanly when it is reached; the videos it did not read are not charged. There is no separate platform-usage charge for this actor.

Limits

  • Some videos have no captions. In our own test of 500 videos from search results, about 1 in 5 had none (our measurement, not a promise for your list); Shorts had more. Those return a free no_captions row.
  • Automatic captions are lower quality than captions written by a person: wrong words, no punctuation, names misspelled. isAutoGenerated tells you which one you got.
  • Channels and playlists give only the latest videos. The actor reads YouTube's public feed, which lists about 15 videos. It cannot list a whole channel archive or a long playlist. To read older videos, put their links in Videos.
  • @handle links need one extra page read to find the channel id. If that fails you get a free channel_not_found row; use the channel id (UC...) instead. /c/ and /user/ links are not supported.
  • Caption links: if YouTube answers a caption link with 404, the actor asks again once for a new link before giving up; other failures give a request_failed row that names the step (player or captions).
  • YouTube may block requests. The actor uses Apify's residential proxy, starts a new session every 10 videos and on every retry, and retries a blocked, rate-limited or empty answer up to 2 times. If a video is still blocked, you get a free blocked row and no charge. Videos that need a sign-in (age limit) give a free age_or_login_required row.
  • Videos run one after another with a short pause, not in parallel. Set a run timeout of at least 5 minutes (shorter timeouts skip every video with a free skipped_time_budget row), and for large lists one that fits the list; when the time is used up, unread videos get a free skipped_time_budget row and you can run them again.
  • Live streams and premieres that have no caption yet return a free error row.
  • Long videos are capped. Videos longer than maxVideoMinutes (at most 180 minutes, the default) are not read and are free (too_long), because the proxy cost of reading a video grows with the length of its transcript.
  • Large rows. A long transcript is kept up to three times if you ask for text, segments and chunks. A row over 8,500,000 bytes (counted in UTF-8, so Hindi, Japanese and similar text takes more room than its character count) has segments and chunks left out (rowTrimmed: true); if the text alone is still too large, the video returns a free too_large row and is not charged. Turn off includeSegments to shrink rows.
  • Maximum charge: when the run's maximum charge is reached the run stops, and every video it did not read gets a free skipped_charge_limit row.
  • If saving a row fails after the transcript event was charged, the actor first tries once more without segments and chunks. If that fails too, the run carries on and writes a push_failed row saying so: the event may already have been charged, so contact us with the run id. SUMMARY.pushFailed counts these.
  • Restarts: if a run restarts, videos already in the dataset are not delivered or charged again.
  • Respect the terms of the platform and the rights of the video owners for the text you collect; you are responsible for how you use it.

Integrations and API

Run it from the Apify Console, the Apify API or the Apify clients for JavaScript and Python. Put it on an Apify schedule and connect a webhook or an integration (Make, Zapier, n8n, Google Sheets, Slack) to send each run's results on. Read the rows from the run's default dataset (.../datasets/<id>/items); the run summary (videos queued, delivered, without captions, retries, charged events) is in the key-value store record SUMMARY.

FAQ

Is it official? No. It is an independent tool and is not affiliated with or endorsed by YouTube or Google.

Do I pay for videos without captions? No. Only a video that returned at least one caption line is charged.

How do I get a channel's whole back catalogue? You cannot with this actor; channel and playlist inputs give the latest videos only (about 15). Pass the video links yourself for older ones.

Which language do I get? The first of your languages that the video has. If none exists, with fallback on you get the video's own language (see the language field), and with fallback off a free error row.

Can I get subtitles in a translated language? No. It returns caption tracks that exist on the video; it does not translate.

Why did a video return blocked? YouTube refused or returned nothing, also after retries on new sessions. Run that video again later.

Do I need a proxy or a login? No. The actor handles its own proxy; you do not need an account on YouTube.