YouTube Transcript Scraper: Subtitles, Chapters & MCP avatar

YouTube Transcript Scraper: Subtitles, Chapters & MCP

Pricing

from $1.30 / 1,000 transcripts

Go to Apify Store
YouTube Transcript Scraper: Subtitles, Chapters & MCP

YouTube Transcript Scraper: Subtitles, Chapters & MCP

Extract YouTube transcripts as text, Markdown, RAG chunks, SRT, or VTT with chapters and key moments. Use it for AI agents via MCP, or to find where a phrase is said. This unofficial tool downloads no video and runs no speech-to-text; no-caption rows are free. Not affiliated with YouTube or Google.

Pricing

from $1.30 / 1,000 transcripts

Rating

0.0

(0)

Developer

Kizuki

Kizuki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

0

Monthly active users

6 hours ago

Last modified

Features

Limited permissions

Share

Get the transcripts of YouTube videos as text your code or AI agent can use, without a login or API key. Use it for RAG pipelines, for finding where a phrase is said, and for subtitle files.

  • Input: videos, playlists, or channels.
  • Formats: plain text, timed segments, chapter-aware markdown, RAG chunks, srt, or vtt.
  • Alongside the transcript: video metadata, and chapters, like and comment counts, and up to 5 mostReplayed moments with the words spoken in them, where YouTube provides them.
  • Search with find, keep a time window with startAt and endAt, or cap length with maxChars and continue by passing the row's nextStartSegment as startSegment. An input that names no target ({}, or settings only) returns a built-in sample, the transcript of one video: at most 1 row, marked isSample, with no result charged (the run start fee still applies). The sample runs on the default settings and the default proxy: your other settings are not applied to it (a lower maxItems is).

This Actor does not download video or audio files or run speech-to-text on videos without captions. It is an unofficial tool and is not affiliated with, endorsed by, or sponsored by YouTube or Google.

Sample row (shortened)

{
"id": "jGwO_UgTS7I",
"videoId": "jGwO_UgTS7I",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
"title": "Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)",
"channelName": "Stanford Online",
"publishedAt": "2020-04-17",
"durationSeconds": 4520,
"language": "en",
"captionKind": "manual",
"chapterCount": 7,
"mostReplayed": [
{ "rank": 1, "timestamp": "1:02:31", "intensity": 1, "text": "if you- um, if you're used to optimizing code..." }
],
"text": "Welcome to CS229 Machine Learning...",
"error": null
}

Pricing and MCP

  • Launch pricing: $1.50 per 1,000 transcripts on Free, down to $1.30 on the Gold tier, with every format included. Apify's Free plan ($5 monthly usage credit) covers about 3,300 transcripts, run start fees aside. Videos without captions, private videos, and find rows with no match are free. The full price table is further down this page.
  • MCP connect URL: https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts

Use cases

  • Agents that answer from videos. Send a video and a question's keywords in find; the row lists each place they are said with a timestamp link, so the answer can cite the second it came from.
  • Clips and highlights. mostReplayed gives the moments viewers replay most, already joined with the words said in them, so you do not need a second tool or to match timestamps by hand.
  • Brand and topic monitoring. Name channels or playlists and a phrase; videos that mention it come back with the places, and videos that do not are not charged.
  • RAG and vector search. chunks are cut between paragraphs and sentences and carry their start second.
  • Subtitles. srt and vtt are ready-to-save subtitle files.
  • Channel research. Name a channel and get its recent uploads; with Only new videos, a schedule returns only what is new.

Switching from another YouTube transcript scraper

This Actor accepts common input field names used across YouTube transcript tools, so an existing workflow or schedule can switch by changing only the Actor name (kizukidata/youtube-transcripts). When the platform injects schema defaults before startup, if you pass both, an alias wins over a field left at its default.

Input field mapping

Common input field namesMapped toNotes
youtube_url, youtubeUrl, youtube_urls, youtubeUrls, video_url, videoUrl, video_urls, videoUrls, video, videoId, video_id, videoIds, video_ids, url, urls, startUrls, start_urlsvideosAccepts strings, arrays, or [{"url": "…"}]. Playlist and channel links are routed automatically.
channel, channel_url, channelUrl, channel_urls, channelUrlschannelsAccepts handles, channel URLs, or channel IDs.
playlist, playlist_url, playlistUrl, playlist_urls, playlistUrlsplaylistsAccepts playlist URLs or playlist IDs.
language, lang, targetLanguage, target_language, subtitlesLanguage, captionLanguage, preferredLanguage, preferredLanguages, languageCodelanguagesOverrides the default ["en"]. Captions are returned in the video's own languages and are never machine-translated.
transcript_type, transcriptType, subType, captionType, prefer_manualpreferManual"generated" or "auto" sets preferManual: false; "manual", "any", or "both" keeps preferManual: true.
output, outputFormat, outputFormats, output_formats, format, timestamps, includeTimestampsformatsMaps "srt", "vtt", "text" / "singleStringText", "json" / "captions" (["text", "segments"]), and "llm" (["markdown"]). Setting timestamps: false returns ["text"].
max_videos, maxVideos, max_results, maxResults, resultsLimit, limitmaxItemsCaps the number of videos processed.
proxy, proxyOptions, proxyConfig, proxy_configurationproxyConfigurationReplaces the default proxy object when provided; a proxy you set yourself is kept.

Optional toggles from other tools (such as include_metadata, maxRetries, scrapeShorts, wordLevel, enableAiFallback, or empty searchKeywords: []) are ignored without warnings next to a video, playlist or channel. A date range (start_date, end_date, startDate, endDate) and list_only: true are refused before anything is read or charged: this Actor does not filter videos by date and always returns transcripts, so running past them would return and charge videos you did not ask for. Remove the field, and name the videos or cap a channel or playlist with maxItems. The other fields that would change the result in the other tool (translate_to, channel_transcripts, include_transcript_text) have no effect here and are listed under "Unknown input fields were ignored" in the run output when the input also names a video, playlist or channel. An input that names none and holds such a field (or any field this Actor does not know) ends as invalid input: nothing is read or charged, and the sample video is not used. Search terms (searchKeywords, searchQueries, search, queries) are not supported because this Actor reads video, playlist, and channel URLs directly rather than searching YouTube: given alone they return an input error and charge nothing; given next to videos, channels or playlists they are listed as ignored and the run continues.

Existing JSON payloads that run as-is

Example using startUrls, subType, and outputFormats:

{
"startUrls": [{ "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I" }],
"languages": ["en"],
"subType": "both",
"outputFormats": ["json", "text", "srt"],
"maxResults": 1
}

Example using videoUrl and targetLanguage:

{
"videoUrl": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
"targetLanguage": "en"
}

Output rows always use this Actor's field names (text, segments, markdown, chunks, srt, vtt), so update dataset field mapping in downstream steps.

Pricing and zero-charge failures

  • Launch pricing starts at $1.50 per 1,000 transcripts on the Free tier (down to $1.30 at Gold), plus a $0.00005 run start fee.
  • Apify's Free plan ($5 monthly usage credit) covers about 3,300 transcripts (run start fees aside).
  • Videos without captions, private or removed videos, and any other failed error row are still written to the dataset with the reason and cost $0.

What data can you get?

FieldDescription
id, videoId, urlThe 11-character video ID (also the row ID) and https://www.youtube.com/watch?v=<videoId>
title, channelId, channelName, publishedAtVideo metadata: title, channel and the publication date (YYYY-MM-DD)
durationSeconds, viewCount, descriptionLength, views when the caption was read, and the description
likeCount, commentCount, commentCountTextLikes, and the comment count as a number and as YouTube shows it (23K is 23000; exact below 1,000). null when hidden or not read
chapters, chaptersSource, chapterCountThe video's chapters (start in seconds, title). chaptersSource is description (written by the uploader) or auto (generated by YouTube)
mostReplayedUp to 5 most replayed moments, most replayed first: rank, start, end, timestamp, url (the video opened at the moment), intensity (0-1), labeledByYouTube and text (what is said during the moment, up to 600 characters)
heatmapThe replay graph of the whole video: intervalSeconds and values (heights from 0 to 1 in time order, usually 100 points)
signalsFetchedAt, signalsNoteWhen the likes, comments, chapters and replay graph were read; or one sentence saying why they are missing
matchCount, matchesWith find: how often the phrases are said, and each place (phrase, start, end, timestamp, url, text with the speech around it)
textThe transcript as plain text in paragraphs
segmentsTimed captions: start (seconds), duration, text
markdownTitle, a metadata line, ## chapter headings and paragraphs that each open with a timestamp link
chunksRAG chunks: index, start (seconds), chars, text
srt, vttThe transcript as a SubRip or WebVTT subtitle file
segmentCount, chars, totalSegmentCount, totalCharsThe size of the transcript in this row, and of the video's whole caption track
partial, truncated, nextStartSegmentWhether the row holds part of the track, whether maxChars cut it, and the caption number to pass as startSegment to read on
availableCaptionsEvery caption track the video has: language, kind (manual or auto) and the name YouTube shows
language, captionKindLanguage code of the track used (en, ja, pt-BR…) and what it is: manual (written by a person) or auto (auto-generated by YouTube)
languageRequested, languageReturned, languageNote, translatedThe language you asked for, the one that came back, and one sentence when they differ because the video has no track in your language. translated is always false
errornull, or {type, message} on an uncharged status row (no captions, private, removed, blocked and the other reasons below)
cached, fetchedAttrue when the caption came from the Actor's cache (read in the last 90 days), and when it was read
isNewOnly with onlyNewItems: whether the video is new since the previous run
sourceYouTube captions

Every row has every field except isNew. A transcript format you did not ask for in formats is null (chunks is empty). Comment text and commenter names are not collected.

How to use YouTube Transcript Scraper

  1. Put Videos, Playlists and/or Channels into the input. Any YouTube link works in Videos: a playlist or channel link placed there is read as what it is.
  2. To get only part of each transcript, set Find phrases, a time window or Maximum transcript characters. Leave them empty for whole transcripts.
  3. Pick the formats you need (default: text and segments) and the caption language order.
  4. Run it and read the dataset.

An empty input ({}) returns the transcript of one sample video, free.

Input example: where is a phrase said?

{
"videos": ["https://www.youtube.com/watch?v=jGwO_UgTS7I"],
"find": ["supervised learning"],
"formats": ["text"],
"maxItems": 1
}

Input example: a channel's new videos as Markdown and SRT

{
"channels": ["https://www.youtube.com/@TED"],
"formats": ["markdown", "srt"],
"onlyNewItems": true,
"maxItems": 10
}

Input

FieldDefaultWhat it does
videos[]Video URLs, Shorts links or 11-character IDs; up to 500. Playlist and channel links are accepted here too
playlists[]Playlist URLs or IDs; up to 20; the first 100 videos of each, in playlist order
channels[]Channel URL, @handle, /c/ or /user/ URL, or channel ID; up to 20; recent videos, newest first
find[]Words or phrases to look for (up to 20, not case-sensitive). Rows list the places in matches; a video where none is said returns matchCount: 0 and is not charged
findModesnippetssnippets: the transcript fields hold only the places the phrases are said. filter: they hold the whole transcript of each video that matches
findContextSeconds15Seconds of speech kept before and after each match (0 to 600)
maxMatches10Places described per video (1 to 100); matchCount counts all of them
startAt, endAtnoneA time window in seconds from the start of the video, applied to every video of the run
maxChars0Cut each transcript after this many characters of caption text, between two captions; 0 is no cap. A cut row has truncated: true and nextStartSegment
startSegment0Start at this caption number; pass a cut row's nextStartSegment to read on
formats["text", "segments"]Any of text, segments, markdown, chunks, srt, vtt
languages["en"]Caption languages, in order of preference (up to 10)
preferManualtrueUse human-written captions over auto-generated ones when both exist in the requested language
includeSignalstrueAdd mostReplayed, heatmap, YouTube's chapters, likeCount and commentCount. No extra charge
chunkSize1500Characters per chunk (0 to 20,000); used when formats names chunks
maxItemsnone — all named videos plus 20 from your playlists and channels; the Console form prefills 3Maximum rows written in one run, 1 to 500. Transcripts and status rows share the cap, so maxItems: 3 with 100 videos named processes three. There is no default; the Console form prefills 3, so clear the field or raise it to take more. Named videos beyond the cap are not requested, are listed in OUTPUT as unchecked and are not charged
onlyNewItemsfalseReturn only videos that earlier runs with the same input have not returned
maxConcurrency3How many requests may run at once (1 to 3)
proxyConfigurationApify residential proxyProxy settings (country, groups, custom proxy URLs)

Switching from another transcript Actor or script

See Switching from another YouTube transcript scraper above for the full input field mapping, existing JSON examples, pricing, and zero-charge failure rows.

Output

One row per video the run processes, every field present. error.type is one of login-required, no-captions, private, removed, live, region-restricted, age-restricted, members-only, paid, caption-unavailable, too-large, blocked, timeout, unavailable. A video the run processes gets a row even when YouTube refuses it, and a status row is never charged.

Output example

One row of a real run (2026-11-13, answered from the cache) with formats naming text, segments and markdown: Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018) (Stanford Online). description, text, segments, markdown, mostReplayed and heatmap.values are shortened here (the counts are the full ones); a run returns them in full, except that each mostReplayed text holds at most 600 characters.

{
"id": "jGwO_UgTS7I",
"videoId": "jGwO_UgTS7I",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
"title": "Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)",
"channelId": "UCBa5G_ESCn8Yd4vw5U-gIcg",
"channelName": "Stanford Online",
"publishedAt": "2020-04-17",
"durationSeconds": 4520,
"viewCount": 5048990,
"description": "For more information about Stanford’s Artificial Intelligence professional and graduate programs, visit: https://stanford.io/ai\n\n…",
"language": "en",
"languageRequested": "en",
"languageReturned": "en",
"captionKind": "manual",
"translated": false,
"languageNote": null,
"availableCaptions": [
{ "language": "en", "kind": "manual", "name": "English" },
{ "language": "en", "kind": "auto", "name": "English (auto-generated)" }
],
"likeCount": 63091,
"commentCount": 1300,
"commentCountText": "1.3K",
"chapters": [
{ "start": 0, "title": "Introduction" },
{ "start": 321, "title": "Teaching team introductions" },
{ "start": 402, "title": "Goals for the course and the state of machine learning across research and industry" },
{ "start": 609, "title": "Prerequisites for the course" },
{ "start": 713, "title": "Homework, and a note about the Stanford honor code" },
{ "start": 1017, "title": "Overview of the class project" },
{ "start": 1557, "title": "Questions" }
],
"chaptersSource": "description",
"chapterCount": 7,
"mostReplayed": [
{
"rank": 1,
"start": 3751.6,
"end": 3842,
"timestamp": "1:02:31",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=3751s",
"intensity": 1,
"labeledByYouTube": true,
"text": "if you- um, if you're used to optimizing code, right? Making code run faster, I'm not sure if you have done that. …"
},
{
"rank": 2,
"start": 2486,
"end": 2621.6,
"timestamp": "41:26",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2486s",
"intensity": 0.786,
"labeledByYouTube": false,
"text": "So maybe your house has a size, you know, of that amount on the horizontal axis. …"
}
],
"heatmap": { "intervalSeconds": 45.2, "values": [0.121, 0.124, 0.055, 0.046, 0.161, 0.206, 0.23, 0.164] },
"signalsFetchedAt": "2026-11-13T14:07:55.859Z",
"signalsNote": null,
"segmentCount": 1464,
"chars": 69876,
"totalSegmentCount": 1464,
"totalChars": 69876,
"partial": false,
"truncated": false,
"nextStartSegment": null,
"matchCount": null,
"matches": [],
"text": "Welcome to CS229 Machine Learning. Uh, some of you know that this class has been taught at Stanford for a long time. …",
"segments": [{ "start": 3.1, "duration": 3.3, "text": "Welcome to CS229 Machine Learning." }],
"markdown": "# Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)\n\n[Watch on YouTube](https://www.youtube.com/watch?v=jGwO_UgTS7I) · Stanford Online · published 2020-04-17 · 1:15:20 · en (manual)\n\n## 0:00 Introduction\n\n[0:03](https://www.youtube.com/watch?v=jGwO_UgTS7I&t=3s) Welcome to CS229 Machine Learning. …\n\n## 5:21 Teaching team introductions\n\n[5:21](https://www.youtube.com/watch?v=jGwO_UgTS7I&t=321s) There's a class coordinator. …",
"chunks": [],
"srt": null,
"vtt": null,
"cached": true,
"fetchedAt": "2026-11-13T14:07:52.367Z",
"error": null
}

The same video with "find": ["supervised learning"] and "maxMatches": 2 returns matchCount: 15, partial: true, chars: 951 instead of 69,876, and these matches (texts shortened):

[
{
"phrase": "supervised learning",
"start": 2371.2,
"end": 2376.5,
"timestamp": "39:31",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2371s",
"text": "… And so in the next 10 weeks, you'll learn about a variety of these different tools. Um, and so the first of them and the most widely used one is supervised learning. …"
},
{
"phrase": "supervised learning",
"start": 2421.5,
"end": 2423.2,
"timestamp": "40:21",
"url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2421s",
"text": "… So the most widely used machine learning tool is, uh, today is supervised learning. Actually, let me check, how, how many of you know what supervised learning is? …"
}
]

A video without a transcript returns the same shape with error set and the text fields null (shortened here):

{
"id": "aqz-KE-bpKQ",
"videoId": "aqz-KE-bpKQ",
"error": { "type": "no-captions", "message": "This video has no caption track" },
"text": null,
"segments": null,
"markdown": null,
"chunks": [],
"mostReplayed": [],
"matches": []
}

Find, time windows and maxChars

  • find looks for each phrase in the caption track without regard to case, also across two captions. It is a text match, not a semantic search: pass short keywords, not a whole question. In languages written with spaces a phrase matches whole words (art does not match start); in Japanese, Chinese, Korean and Thai it matches anywhere. matchCount counts every place, each phrase on its own; matches describes up to maxMatches of them, and a phrase repeated inside a place already listed is not listed twice. Typographic quotes and dashes match their plain forms (don't finds don’t).
  • snippets (default) keeps only the places described in matches in text, segments, markdown, chunks, srt and vtt, with findContextSeconds of speech on each side. When matches holds exactly maxMatches entries, raise maxMatches to get the rest (matchCount can stay larger, because a phrase said again inside a listed place is counted but not listed again). filter keeps the whole transcript of every video in which a phrase is said.
  • A video in which no phrase is said returns a row with matchCount: 0, its metadata and no transcript. That row is not charged.
  • startAt and endAt keep the captions said inside the window. With find, phrases are looked for inside the window only.
  • maxChars cuts between two captions and always keeps at least one. The row says truncated: true and gives nextStartSegment; run again with startSegment set to it to read on. Each part starts exactly where the last one ended, with no caption returned twice. It counts caption text (the row's chars) and decides which captions every format holds; markdown, srt and vtt are longer by their timestamps and headings, and the rest of the row is not bounded.
  • A row with no transcript text (no phrase said, or nothing said inside the window) is not charged.
  • The order is fixed: startSegment, the window, then find, then maxChars.

Most replayed moments and chapters

  • mostReplayed starts with the ranges YouTube itself marks "Most replayed" (labeledByYouTube: true) and adds the highest remaining peaks of the replay graph, up to 5 in total, ranked by the graph's height. The first seconds of a video are high on almost every graph, because every view starts there, so a peak is not read off them.
  • text in a moment is what is said during it in this row's caption track, even when the row itself holds only a selection.
  • YouTube shows a replay graph only for videos with enough views. A video without one returns mostReplayed: [] and heatmap: null; that is not an error.
  • chapters are the ones YouTube shows on the progress bar. When they were not read, they come from the description's timestamp lines (at least three lines shaped like 0:00 Title, the first at 0:00).
  • If YouTube does not answer for these fields, the row still returns its transcript, is charged as a transcript, and says so in signalsNote.
  • Rows answered from the cache carry the likes, comments and replay graph of the day the caption was read (signalsFetchedAt).

Which caption comes back

A YouTube video can have human-written caption tracks in any number of languages and one auto-generated track, which YouTube makes in the language that is spoken.

  1. For each language in languages, in order, the Actor looks for a track in that language. When the video has one, it is used: the human-written track first, or the auto-generated one when preferManual is off.
  2. When the video has no track in any language you named, the Actor returns its auto-generated track (the spoken language), or its first track when it has no auto-generated one. languageNote says so.

The row always tells you which language you asked for (languageRequested), which language the text is in (languageReturned) and what kind it is (captionKind). The Actor never asks YouTube for a machine translation, so translated is always false. A video with no captions at all returns the status row no-captions, not charged.

Only new videos

onlyNewItems keeps a per-input state record (the videos, playlists and channels named, the language order, preferManual, and find and the time window when set) in a named key-value store of your Apify account. It records a video only after its charged row was written, keeps entries for 90 days, and does not remember status rows, so those videos are checked again. With find, a video in which no phrase is said is left out of the dataset and checked again on the next run (from the cache, without a request). A video an earlier run delivered is skipped before anything is fetched for it. A run with nothing new returns and charges nothing. Do not run the same input concurrently: both runs read the old state and both return the same new videos.

Captions are cached automatically, so a repeat request for the same video is served without a request to YouTube: the row says cached: true and fetchedAt is the day the caption was first read. Those rows are charged like any other, because the transcript is delivered. A status row is never stored, so it is fetched again next time.

How much does it cost?

YouTube Transcript Scraper uses pay-per-event pricing: you pay per transcript it returns plus a run start fee (see below), not for the time the run takes. At the Free tier 1,000 transcripts cost $1.50; at Gold, $1.30.

Apify plan (discount tier)Price per 1,000 transcriptsPrice per transcript
Free$1.50$0.0015
Starter (Bronze)$1.40$0.0014
Scale (Silver)$1.35$0.00135
Business (Gold)$1.30$0.0013

Apify's Free plan includes USD 5 of monthly usage, which covers about 3,300 transcripts at the Free tier price, run start fees aside.

  • Run start fee: USD 0.00005 per GB of memory per run (USD 0.00005 at this Actor's default 512 MB).
  • One price covers everything in the row: every format, the most replayed moments, chapters, likes and comment count. There is no separate metadata charge.
  • A transcript is charged once per video per run, whatever part of it the row holds. Reading one video in several parts (maxChars with startSegment), or asking for it again in a later run, charges one transcript each time.
  • Videos without a transcript, private or removed videos and other status rows are returned with a reason code but are not charged. Neither is a video in which none of your find phrases is said, or one in which nothing is said inside your time window.
  • Videos beyond maxItems are not requested and not charged. maxItems always caps the run at the number you set; leave it out to take every video you named plus up to 20 from your playlists and channels (the Console form prefills 3).

Use with AI agents (MCP)

YouTube Transcript Scraper works as a tool for AI agents such as Claude, Cursor and n8n agents through the Apify MCP server. Load this Actor, plus the tool that reads its input schema and pricing, with this server URL:

https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts
  • Claude Code: run claude mcp add apify "https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts" -t http.
  • Claude (web or desktop app): open Customize → Connectors, choose Add custom connector, name it Apify and paste the server URL above.
  • Cursor: add the server to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"apify": { "url": "https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts" }
}
}
  • n8n: add the Apify node (on self-hosted n8n, install the community package @apify/n8n-nodes-apify) and choose Run an Actor and get dataset; for an n8n AI Agent, add Apify Tool as a tool.

The server signs you in to Apify with OAuth. A client that cannot use OAuth can send your Apify API token in an Authorization: Bearer <APIFY_TOKEN> header instead.

What to send from an agent

Keep the row small, because the whole row goes into the model's context:

  • To answer a question about a video, send videos, the question's keywords in find and "formats": ["text"]. Read matches.
  • To read a long video in parts, send "formats": ["text"] with "maxChars": 8000, then repeat with startSegment set to the row's nextStartSegment while truncated is true. Each part is charged as one transcript.
  • To find the highlights, read mostReplayed; each moment already carries the first 600 characters of what is said in it, so add "formats": ["text"] and a small maxChars (for example 200) when the transcript itself is not needed.
  • Always set maxItems. It bounds the rows written, and only transcripts are charged.

Integrations and API

Run the Actor from your own code or from an automation tool. The examples use the Actor's name in the Store, kizukidata/youtube-transcripts; replace <APIFY_TOKEN> with your API token.

Zapier, Make and n8n

Use the Apify integration, choose Run Actor, and pass videos, playlists or channels plus maxItems. Add Get dataset items and map title, videoId, text, mostReplayed, language and error to your document store, CMS or LLM step. For a channel, set onlyNewItems: true and use the new rows as the trigger.

LangChain

Load the returned rows as documents: ask for "formats": ["markdown", "chunks"], use markdown as page_content and title, url, channelName and chapters as metadata. The chunks array can be embedded directly without a second splitter; ApifyDatasetLoader from the Apify LangChain integration works with the run's dataset ID.

cURL

curl -X POST "https://api.apify.com/v2/acts/kizukidata~youtube-transcripts/runs" \
-H "Authorization: Bearer <APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"videos":["https://www.youtube.com/watch?v=jGwO_UgTS7I"],"find":["supervised learning"],"formats":["text"],"maxItems":1}'

Poll GET https://api.apify.com/v2/actor-runs/<RUN_ID> for the status, read defaultDatasetId, then fetch GET https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json.

Python

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("kizukidata/youtube-transcripts").call(run_input={"videos": ["https://www.youtube.com/watch?v=jGwO_UgTS7I"], "maxItems": 1})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["title"], item["chars"], [m["timestamp"] for m in item["mostReplayed"]])

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('kizukidata/youtube-transcripts').call({ videos: ['https://www.youtube.com/watch?v=jGwO_UgTS7I'], formats: ['srt'], maxItems: 1 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].srt);

Limitations

  • Unofficial and independent. This is an unofficial Actor: it is an independent tool, not affiliated with, endorsed by or sponsored by YouTube or Google. It needs no login, no API key and no browser, and it never downloads video or audio.
  • No login, no cookies and no CAPTCHA workaround. A video that needs a sign-in returns login-required. An age gate returns age-restricted, a members-only video returns members-only, a rental or purchase returns paid, and the video's own privacy setting returns private; all are reported as uncharged status rows.
  • No video or audio download and no speech-to-text step: a video without a caption track returns no-captions. A live stream with no usable track is live, a video you can no longer watch is removed or unavailable, and a track that comes back empty is caption-unavailable.
  • No machine translation. A video with no track in your language returns its own track in the spoken language, and languageNote says so. When a video has several tracks in one language, the first one YouTube lists is returned; availableCaptions names them all.
  • Playlists return their first 100 videos. Mixes generated per viewer are not playlists and are not read.
  • Comment counts above 999 are rounded by YouTube (23K). Like counts are exact unless the uploader hides them.
  • Region-restricted videos depend on the proxy country; set apifyProxyCountry in proxyConfiguration when you know the video is available in one country.
  • A channel or playlist input is bounded by maxItems (20 in total when it is left out, read one by one, so the first can fill the cap).
  • Descriptions and captions are YouTube's own text; the Actor keeps the wording and only groups it into paragraphs and chunks.

FAQ

How long does a run take?

A single video is usually a few seconds: the caption track and the video's public metadata, not the video. A video read before is answered from the cache in about two seconds. A channel or playlist takes longer because its video list is read first and each video is fetched in turn.

Why is a row cached: true?

The same video and language were read in the last 90 days, so the caption came from the cache without a request. The transcript is still delivered, so the row is charged like any other.

Why did a video come back with error?

no-captions means there is no caption track, login-required means YouTube asked for a sign-in, private, age-restricted, members-only and paid are the video's own settings, and region-restricted depends on the proxy country. removed is a video YouTube took down, live is a live stream (or its recording) with no usable caption track, too-large is an answer too big to read in one run, and blocked / timeout mean YouTube refused or did not answer after the retries. None of these rows is charged, and the next run tries the video again.

Why is mostReplayed empty?

YouTube shows a replay graph only once a video has enough views, and not for very new videos. When signalsNote is null and includeSignals is on, the video simply has no graph yet.

I asked for English and got Japanese text. Why?

The video has no caption track in English, so the Actor returned the video's own track in the spoken language instead: languageReturned is ja, and languageNote says the video has no track in the language you asked for. Add more codes to languages to choose the fallback yourself.

Can I get only new videos of a channel?

Yes: set onlyNewItems to true, save the input as a Task and schedule it. See Only new videos.

Can I reuse or republish these transcripts?

The Actor reads what YouTube shows for a public video: its caption track, and the chapters, replay graph and like and comment counts next to the player. It does not download the video and does not log in. Transcripts are third-party content: check the rights before republishing them. Transcripts, descriptions and channel names can contain personal data (a speaker's name, a phone number read out in the talk, a channel owner's name), which can be personal data under the GDPR and similar laws; handle it accordingly. This is not legal advice.

Other Actors from Kizuki that work well with this one:

  • YouTube Channel Scraper & Monitor — watches a channel's new videos and returns views, likes, length and the newest comments; feed its video IDs here to get the transcripts.
  • URL to Markdown — the article or page around a video as clean Markdown.
  • PDF to Markdown Extractor — PDFs as page-numbered Markdown, so one RAG corpus can take transcripts, web pages and PDFs the same way.
  • YouTube Playlist Scraper — one row per playlist video with chapters, most replayed moments and an optional transcript.
  • YouTube Comments Scraper — top or newest comments and reply rows of videos, Shorts and channels, with onlyNewItems for scheduled runs.
  • YouTube Shorts Scraper — Shorts by keyword, channel or URL, with view counts, hashtags and optional transcripts.
  • YouTube Email Scraper — creator emails, link-in-bio pages, websites, contact forms, booking links and socials by channel or keyword.

Your feedback

Bugs, a video whose chapters, moments or matches came out wrong, and feature requests go to the Actor's Issues tab in Apify Console. A channel owner who wants a channel left out can open an Issue with the channel URL; we review it and, when it comes from the channel's owner, leave the channel out in a later build. A third party's request is not enough.