Skip to content

Pull YouTube Caption Tracks Without Building a Browser Stack

Caption tracks are the cheapest source of time-aligned video text you can get: they already exist, they carry language codes, and they line up with the video timeline.

OUTPUT FORMATSHTMLJSONMarkdown

The hard part is delivery. Caption payloads arrive in a format built for players, not for pipelines, and pulling them at volume runs into the same quota and blocking problems as any other page fetch. This page describes a hosted route that takes a video URL and returns the caption fields a search index, a translation job, or a transcript corpus actually needs.

What a caption request returns

The response is built around the caption track rather than the page. Each track carries the caption text, a start, end, and duration value for every line, a BCP-47 language code, a flag separating auto-generated from human-created captions, speaker labels where the platform exposes them, and the track URL behind the timed payload. You send a video URL; the service renders the page, parses the tracks, and hands back structured data, so there is no HTML parsing on your side.

Two consequences matter for planning. First, you are not transcribing audio, so you inherit whatever quality the uploaded or auto-generated track has, including its errors. Second, the field set is the same shape across languages, which is what makes a translation handoff or a multi-language index straightforward.

Field and control map

Use this as a checklist when you design your parser and your request options.

  • Caption text: the spoken line. Index this for keyword search.
  • Start / end / duration: per-line timing. Use start for deep links, duration for chapter boundaries.
  • Language code: BCP-47. Filter or fan out by this field.
  • Auto-generated flag: tells you whether the track was machine-produced, which affects how much you trust punctuation and names.
  • Speaker labels: present only where the platform exposes them, so treat them as optional.
  • Track URL: the underlying timed payload, useful if you want to re-fetch or diff later.

On the request side, the options that change cost and behaviour are JavaScript rendering, premium or stealth proxies, geotargeting, and extraction rules. The pricing table below lists which of these are included at each tier.

Three workflows that fit this shape

In-video search. Store each caption line with its start time, then let a query return the second a term appears. Media research desks, internal learning libraries, and legal review teams all need to jump into long recordings rather than watch them.

Subtitle translation. Take the source track, pass the lines through your translation service, and rebuild SRT or VTT with the original timings. The manual export-translate-import loop disappears because the timings come back with the text.

Transcript corpora. Time-aligned text is usable for fine-tuning, ASR evaluation, or embedding sets without running speech-to-text yourself. Because the auto-generated flag is present, you can decide whether to include machine-produced tracks in a training set.

Worked example: from one URL to a searchable line

Suppose you are indexing a lecture series. For each video URL you send one request and receive a set of tracks. You keep the track whose language code matches your audience and whose auto-generated flag is false, if one exists. For each line you store the text, the start value, and the duration. A search for a term now returns a list of video identifiers plus the second the term is spoken, and your player can seek to that second. If the only track available is auto-generated, you still index it but mark it lower-confidence so a later human-corrected track can replace it. Nothing in this flow requires you to hold a browser session or rotate proxies yourself.

Two failures that look alike and are not

A request can come back without usable captions for two different reasons, and your retry logic should treat them differently.

No track available: the video genuinely has no caption track in the language you asked for, or none at all. Retrying will not help; fall back to another language, another video, or a transcription step.

Request blocked or throttled: the fetch did not complete because of anti-bot measures or rate limits. This is where proxy and rendering options matter, and where a retry with different settings can succeed.

Log the two cases separately. Mixing them produces retry storms on videos that will never return captions.

Plans and credit costs

The plan table below lists the published tiers. Credits are valid for one month and do not roll over; requests start at one credit each. JavaScript rendering adds 5 credits per successful request. Premium proxies cost 10 credits with rendering off and 25 with rendering on. Stealth proxies cost 75. A free starting allowance is described in the signup flow. All prices are exclusive of VAT.

Setup path

Create an account to get an API key. Install the client for your stack, or send the request directly. Pass the video URL and your key, then add options only when you need them: rendering for pages that require it, a proxy tier when blocking appears, a country code when the content is region-sensitive, and extraction rules when you want the response shaped to your schema. Code samples exist for Python, Node.js, cURL, and the request builder.

Plan comparison (captured reference)
PlanPrice / monthAPI creditsConcurrent requestsPriority supportAccount managerTeam management
Hobby$1975,00025Not includedNot includedNot included
Freelance$49250,00050Not includedNot includedNot included
Startup$991,000,000100Not includedNot includedNot included
Business$2493,000,000200IncludedIncludedIncluded
Business +$5998,000,000400IncludedIncludedIncluded
Enterprise 14$99914,000,000500IncludedIncludedIncluded
Enterprise 24$1,59924,000,000600IncludedIncludedIncluded
Enterprise 41$2,39941,000,000700IncludedIncludedIncluded
Enterprise 69$3,59969,000,000800IncludedIncludedIncluded
Enterprise 120$5,799120,000,000900IncludedIncludedIncluded

Captured plan structure; prices exclude VAT. Confirm current pricing before purchase.

Credit cost by option (captured reference)
OptionCredits per successful request
Base request1
JavaScript rendering5
Premium proxy, rendering off10
Premium proxy, rendering on25
Stealth proxy75

Credit costs depend on options selected; confirm current rates before budgeting.

Frequently asked questions

Do I need an account to scrape YouTube captions?

You need an API key from this service, but no YouTube account. Signing up provides a key and a free starting allowance without a card, and you then send the video URL.

Is scraping YouTube captions legal?

Public pages are generally scrapable, but review the target site's terms of service before deploying and avoid content behind a login. This is general guidance, not legal advice.

What caption data can I extract?

Caption text, per-line timestamps, language codes, an auto-generated versus human-created flag, and speaker labels where the platform exposes them. Extraction rules can shape the response to your schema.

Can I pull captions in multiple languages?

Yes. Every available track is returned, including human-translated and auto-translated variants. Filter by language code in your own logic.

How do I get timestamps for each caption line?

Each line carries start, end, and duration values. Use them for deep links, chapter generation, or subtitle editing.

How much does it cost to scrape YouTube captions?

A free starting allowance is available at signup without a card. Paid plans begin at $19 per month. Per-request cost depends on options: rendering adds 5 credits, premium proxies cost 10 with rendering off or 25 with it on, and stealth proxies cost 75. Confirm current pricing before purchase.