Youtube Transcript Scraper avatar

Youtube Transcript Scraper

Pricing

Pay per usage

Go to Apify Store
Youtube Transcript Scraper

Youtube Transcript Scraper

Extract YouTube video transcripts, subtitles, captions, timestamps, video metadata, and text at scale. Scrape accurate transcript data from YouTube URLs for AI training, LLM datasets, content analysis, research, SEO, summarization, and automation workflows.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Shahid Irfan

Shahid Irfan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

What does YouTube Transcript Scraper API do?

YouTube Transcript Scraper API extracts transcripts, timestamped segments, and public metadata from one or more YouTube video URLs. Add direct video links to video_urls, choose a caption language, and receive one structured dataset item per video. It uses @egoist/youtube-transcript-plus as the primary provider, with youtube-transcript as a fallback. Every request is sent through impit (Chrome impersonation) so a residential Apify proxy can be applied.

The Actor is useful for building searchable transcript libraries, AI and RAG datasets, research collections, accessibility workflows, and content analysis pipelines. It supports standard watch links, shortened links, Shorts, live video links, and embed links.

Why use YouTube Transcript Scraper API?

  • Transcript-first output - Get complete caption text and timestamped segments in a predictable format.
  • Proxy-ready - All requests go through impit, so an Apify residential proxy is applied to the InnerTube player call and the caption download.
  • Batch video processing - Submit multiple video URLs in one run and receive one result per video.
  • Language selection - Request a language by name, such as English or Spanish, or by code, such as en.
  • Metadata included - Combine transcript content with titles, descriptions, publication text, views, duration, thumbnails, creator information, and public status fields.
  • Clean dataset records - Unavailable values are omitted instead of being returned as null, empty strings, or empty arrays.
  • Workflow-ready exports - Download results as JSON, CSV, Excel, XML, and other Apify dataset formats, or connect the run to webhooks and integrations.

What data can you extract from YouTube videos?

FieldDescription
video_idStable YouTube video identifier.
titlePublic video title.
urlCanonical watch URL for the video.
descriptionPublic video description when available.
transcriptComplete caption text in reading order.
transcript_languageLanguage label selected for the transcript.
transcript_language_codeLanguage code, such as en or es.
transcript_segmentsArray of timestamped caption segments.
transcript_segments[].start_msSegment start time in milliseconds.
transcript_segments[].end_msSegment end time in milliseconds when available.
transcript_segments[].textCaption text for the segment.
published_textPublication date or relative publication text.
view_countNumeric public view count when available.
duration_secondsVideo duration in seconds.
thumbnail_urlBest available video thumbnail.
tagsPublic video tags when available.
channel_idPublic creator channel identifier when available.
channel_titlePublic creator channel name when available.
channel_urlPublic creator channel URL when available.
has_captionsWhether captions were available for the video.
video_details_fetchedWhether the video detail request completed.

How to use YouTube Transcript Scraper API

  1. Open the Actor in Apify Console.
  2. Add one or more direct YouTube video URLs to YouTube video URLs.
  3. Enter a caption language, or keep the default English.
  4. Start the run.
  5. Open the dataset to review transcript text, timestamps, and metadata.
  6. Export the dataset or connect it to your application, webhook, or automation.

Only direct video URLs are accepted. Channel pages, playlists, search pages, and other non-video pages are not input sources for this Actor.

Input parameters

ParameterTypeRequiredDefaultDescription
video_urlsArray of stringsYesExample video URLOne or more direct YouTube video URLs. Duplicate URLs are processed once.
languageStringNoEnglishCaption language name or code, such as English, en, or Spanish.
proxyObjectNo{ "useApifyProxy": true }Apify proxy configuration. Use residential proxies to avoid YouTube bot detection on datacenter IPs, for example { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }.

The values provided by the user are used as supplied. The requested language takes priority over any available-language fallback. If the requested language is unavailable, the Actor keeps the video metadata and omits transcript fields rather than silently selecting another language.

Usage examples

Extract one video transcript

Use a one-item array when you need a single transcript.

{
"video_urls": ["https://www.youtube.com/watch?v=7pq7jlR0R6o"],
"language": "English"
}

Extract several video transcripts

Submit multiple direct links to process them in the same run.

{
"video_urls": ["https://www.youtube.com/watch?v=7pq7jlR0R6o", "https://www.youtube.com/watch?v=hePb00CqvP0"],
"language": "English"
}

Request a specific caption language

Use a language code when you need an exact language request.

{
"video_urls": ["https://www.youtube.com/watch?v=7pq7jlR0R6o"],
"language": "es"
}

Sample output

The exact fields depend on the public information and captions available for each video at run time.

{
"video_id": "7pq7jlR0R6o",
"title": "Avengers Endgame: Encore | Official Trailer I In Cinemas Sep 25",
"url": "https://www.youtube.com/watch?v=7pq7jlR0R6o",
"description": "Reassemble the team and relive the experience as Avengers Endgame: Encore returns in cinemas September 25.",
"duration_seconds": 96,
"has_captions": true,
"transcript_language": "English (auto-generated)",
"transcript_language_code": "en",
"transcript": "Hey Cap, you read me? Cap, it's Sam. Can you hear me?",
"transcript_segments": [
{
"start_ms": 7960,
"end_ms": 10880,
"text": "Hey Cap, you read me?"
}
]
}

Transcript behavior

  • Captions are matched to the requested language name or language code.
  • Automatic captions are included when YouTube provides them for the requested language.
  • Transcript segments include start times and end times when the source provides them.
  • JSON3, WebVTT, and XML caption responses are normalized into the same segment structure.
  • Videos without captions still return available public metadata.
  • Private, removed, age-restricted, or temporarily unavailable videos may return fewer fields or fail to produce a dataset item.
  • Null values, empty strings, and empty arrays are omitted recursively from dataset records.

Tips for best results

  • Use complete public video URLs copied from YouTube.
  • Use a language code such as en when matching a particular language matters.
  • Start with one or two videos to check transcript availability before submitting a larger list.
  • Keep video_id as the stable key when joining results across runs.
  • Review the dataset preview because captions, counts, descriptions, and availability can change.
  • Keep the requested language consistent when comparing transcripts across multiple videos.

Integrations and exports

  • Google Sheets - Review transcript text, titles, and timestamp segments in a spreadsheet.
  • Webhooks - Notify downstream services after a run completes.
  • Make or Zapier - Send transcript records into no-code workflows.
  • Apify API - Start runs and retrieve dataset items programmatically.
  • AI and RAG pipelines - Load transcript text and timestamps into search, embedding, or knowledge-base workflows.
  • Exports - Download JSON, CSV, Excel, XML, and other supported dataset formats.

Frequently asked questions

Does the Actor accept multiple videos?

Yes. Add multiple direct video URLs to the video_urls array. The Actor returns one dataset item per unique URL.

Does the Actor accept a channel URL or playlist URL?

No. The input is intentionally limited to direct YouTube video URLs. Add individual video links to video_urls instead.

Can I request automatic captions?

Yes. Automatic captions are returned when they are the available track for the requested language. The language label identifies automatic captions when YouTube provides that information.

What happens when a video has no transcript?

The Actor returns the public metadata that is available and omits transcript fields. A missing transcript can mean that captions are disabled, the requested language is unavailable, or YouTube did not make captions available for that request.

Can I export the results to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, Excel, JSON, XML, and other supported formats.

Can I run the Actor on a schedule?

Yes. Schedule repeated runs in Apify Console with the same list of video URLs to refresh transcript and metadata records.

Does this require a YouTube login or API key?

No. The Actor is intended for publicly available YouTube videos and captions. All requests use the unofficial InnerTube API through impit, with no po_token requirement.

How are requests sent?

Every request (the watch page, InnerTube player call, and caption download) is made by impit with Chrome browser impersonation. If you configure the proxy input, those requests share one sticky residential proxy session so YouTube sees a consistent IP while validating the caption URL. Failed requests rotate to a new session before retrying.

You are responsible for complying with YouTube's terms, applicable laws, copyright rules, and privacy requirements. Collect and use public data responsibly.

No additional related Actor links are listed because another relevant public Actor under the Shahid Irfan profile could not be verified while preparing this README. This avoids publishing guessed or incorrect links.

Support

For issues or feature requests, use the Issues tab on the Actor page or contact the developer through Apify.

This Actor is intended for legitimate collection of publicly available information. Users are responsible for complying with YouTube's terms of service, applicable laws, copyright obligations, and privacy rules.