YouTube Transcript avatar

YouTube Transcript

Pricing

from $1.50 / 1,000 results

Go to Apify Store
YouTube Transcript

YouTube Transcript

Get full transcripts and timestamped captions from YouTube videos. Paste video URLs or IDs, choose a language, and export clean text and segments as JSON, CSV or Excel. No YouTube API key required.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

ali raza

ali raza

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

YouTube Transcript Scraper in Python

An Apify Actor that extracts transcripts (captions) from YouTube videos in Python, with no YouTube API key required. You pass in video URLs or IDs via input, which is defined by the input schema. For each video the Actor stores the full transcript text plus timestamped segments in a dataset, where you can download them as JSON, CSV, Excel and more.

The Actor uses HTTPX2 to call YouTube's internal (InnerTube) API the same way the Android app does, so no browser or HTML parsing is needed.

Included features

  • Apify SDK for Python - a toolkit for building Apify Actors and scrapers in Python
  • Input schema - define and easily validate a schema for your Actor's input
  • Dataset - store structured data where each object stored has the same attributes
  • Apify Proxy - optional proxy support, since YouTube often blocks datacenter IPs
  • HTTPX2 - library for making asynchronous HTTP requests in Python

Input

FieldTypeDescription
videoUrlsarrayVideo URLs (watch, youtu.be, shorts, embed) or bare 11-character video IDs.
languagestringPreferred caption language code, e.g. en, es, de. Falls back to any available track. Default en.
countrystringTwo-letter country code sent to YouTube. Default US.
proxyConfigurationobjectProxy settings. Residential proxies are the most reliable option.

Example:

{
"videoUrls": [
"https://www.youtube.com/watch?v=JpA6KCHK5tM",
"https://youtu.be/JpA6KCHK5tM"
],
"language": "en",
"country": "US",
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}

Output

One dataset item per video:

{
"videoId": "JpA6KCHK5tM",
"url": "https://www.youtube.com/watch?v=JpA6KCHK5tM",
"language": "en",
"segmentCount": 123,
"text": "Full transcript as a single string...",
"segments": [
{ "start": 0.0, "text": "First caption line" },
{ "start": 4.5, "text": "Second caption line" }
]
}