YouTube Transcripts Scraper avatar

YouTube Transcripts Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
YouTube Transcripts Scraper

YouTube Transcripts Scraper

Download timestamped transcripts from YouTube videos, playlists and channels in bulk. Manual captions are used before auto-generated ones, and you only pay for transcripts actually delivered.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Philip Kirkbride

Philip Kirkbride

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

Download timestamped transcripts from YouTube videos, playlists and channels in bulk. Each successful video becomes one row with the full text, per-segment timings, caption-language details, and an optional SRT or WebVTT subtitle. Manual captions are preferred over auto-generated ones, and transcript charges apply only to transcripts that are actually delivered, in addition to the run-start charge.

Quick Start

{
"sources": [
"https://www.youtube.com/watch?v=jNQXAC9IVRw",
"@TED"
],
"maxVideos": 20,
"languages": ["en", "es"],
"subtitleFormat": "srt"
}

sources accepts video links or IDs, channel URLs or @handles, and playlist URLs. A .../playlist?list=... URL collects the whole playlist; a watch URL that also carries a list parameter collects only that video. Videos are deduplicated across sources, sources are processed in input order, and the run stops at maxVideos (successful and unsuccessful videos both count toward the limit).

Input

InputTypeDefaultMeaning
sourcesarray—Video URLs or IDs, channel URLs or @handles, and playlist URLs.
maxVideosinteger100Total video limit across every source, including videos with no usable captions.
languagesarray["en"]Preferred caption languages in order, for example ["en", "es", "pt-BR"]. For each preferred language, manual captions are chosen before auto-generated ones.
allowTranslationbooleanfalseWhen no preferred track exists, ask for a translation into the first preferred language, if one is offered.
subtitleFormatstringnonenone, srt or vtt. Adds the matching subtitle text field next to the structured transcript.
proxyConfigurationobjectApify proxyOptional proxy settings; the default works for most runs.

Channel collections cover the Videos tab; Shorts and live streams are not included in channel expansion. Individual Shorts and live-video URLs can be supplied directly.

What it returns

The default dataset contains only successful transcripts — one row per video:

FieldMeaning
videoId, urlUnique video ID and canonical watch URL.
title, channelName, channelIdVideo and creator metadata when available.
publishDate, durationPublication date and total duration in seconds, when available.
languageCode, isAutoGeneratedThe caption language that was selected and whether those captions are auto-generated.
availableLanguagesThe caption languages available for the video, with their auto-generated flags.
transcriptCaption segments: [{"start": 0, "duration": 1.5, "text": "…"}]. start and duration are in seconds.
fullTextAll segment text joined with newlines.
errorAlways null in the default dataset. Videos that fail are reported in OUTPUT.videoErrors instead.
srt or vttSubtitle text, present when you set subtitleFormat to that value.

The OUTPUT store record holds the requested, successful and error counts, the run status, errorsLocation: "OUTPUT.videoErrors", and the videoErrors array. Each error entry is the video row, with code and message nested under error, not at the top level. For example:

{
"videoErrors": [{
"videoId": "jNQXAC9IVRw",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"title": null,
"channelName": null,
"channelId": null,
"publishDate": null,
"duration": null,
"languageCode": null,
"isAutoGenerated": null,
"availableLanguages": [],
"transcript": [],
"fullText": "",
"error": {"code": "NO_CAPTIONS", "message": "No captions available"}
}]
}

This is an illustrative excerpt of OUTPUT; metadata may be populated when available. Videos that fail are not dataset rows and incur no transcript charge; the run-start charge still applies.

Output example

Illustrative transcript row (caption availability and metadata can change):

{
"videoId": "jNQXAC9IVRw",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"title": "Me at the zoo",
"channelName": "jawed",
"channelId": "UCb1GQXk-4V-G9GQ4m2v5A5g",
"publishDate": "2005-04-24",
"duration": 19,
"languageCode": "en",
"isAutoGenerated": false,
"availableLanguages": [{"languageCode": "en", "isAutoGenerated": false}],
"transcript": [{"start": 0.0, "duration": 1.5, "text": "All right, so here we are..."}],
"fullText": "All right, so here we are...",
"error": null,
"srt": "1\n00:00:00,000 --> 00:00:01,500\nAll right, so here we are...\n"
}

Limits and caveats

  • Only caption tracks that are publicly available are collected. Removed, age-restricted, region-restricted, members-only and sign-in-required videos may not be accessible.
  • Auto-generated captions can be inaccurate, overlapping or incomplete, and their timing is segment-level, not word-level.
  • Some videos have no captions. They are listed in the run summary as NO_CAPTIONS and incur no transcript charge. The run-start charge still applies. The same applies to other inaccessible videos, which are listed in OUTPUT.videoErrors.
  • Metadata such as title, channel or publish date can be null when YouTube does not expose it.
  • A mixed run keeps its successful rows and lists the failures separately. A run in which every selected video fails exits with an error.
  • Large channels may need to be split into smaller sources groups.
  • Use this actor only where you have the necessary permissions and a lawful basis; YouTube's terms restrict automated access.

Error codes you may see in OUTPUT.videoErrors: NO_CAPTIONS, VIDEO_PRIVATE, VIDEO_UNAVAILABLE, AGE_RESTRICTED, LOGIN_REQUIRED, BOT_BLOCKED, CONSENT_REQUIRED, PO_TOKEN_REQUIRED and LANGUAGE_UNAVAILABLE.

FAQ

Are manual or automatic captions used? For each preferred language, a manual caption track is chosen before an auto-generated one. If none of your preferred languages match, the video is reported as LANGUAGE_UNAVAILABLE unless you set allowTranslation: true and a translation is offered.

Do failed videos cost anything? There is no transcript charge for failed videos. The run-start charge still applies.

Can I get subtitle files? Set subtitleFormat to srt or vtt and the text arrives in the srt or vtt field of each row.

Can I mix videos, channels and playlists in one run? Yes — put them all in sources; they are deduplicated before collection.

Price

$0.005 per transcript delivered, plus $0.005 per run start. A start is charged once per GB of memory, so the default 512 MB run is one start. Videos with no transcript, or that otherwise fail, incur no transcript charge; the run-start charge still applies. Platform usage is included in these prices.