YouTube Video Scraper API: Metadata, Comments and Transcripts in One Call
A YouTube video page is dense: title, description, tags, category, duration, view count, upload date, like and comment counts, hashtags, transcripts, and creator details all sit on one public surface.
Pulling that reliably at scale usually means managing headless browsers, rotating proxies, and anti-bot defenses yourself. This API takes a YouTube video URL and returns the rendered page or structured JSON, so your pipeline can focus on the data rather than the plumbing.
What a single call returns
Each request targets one public YouTube video page. Depending on the options you pass, the response can include:
- Video metadata: title, description, tags, category, duration, view count, and upload date.
- Engagement signals: like counts, comment counts, and per-comment text with like and reply counts.
- Transcripts and caption text for content search, trending-topic, and accessibility workflows.
- Hashtags and creator info attached to the video.
- A full-page screenshot for visual verification.
- Clean Markdown for LLM-ready transcript-summary or content-trend workflows.
You can request the raw HTML, parsed JSON via extraction rules, or AI-driven JSON via a natural-language spec. No HTML parsing is required on your side when you use the structured output modes.
Which workflow are you building?
The three common YouTube scraping targets map to different request shapes. Use this checklist to pick the right one before you write code.
- Creator tracking and trend detection. You need metadata plus engagement counts per video, refreshed on each call. Use the default render plus extraction rules for the fields you care about. This is the lightest path and the cheapest per request.
- Comment sentiment analysis. You need comment text, like counts, and reply counts per video. Comments load dynamically, so enable JavaScript rendering and, if the page is aggressive about blocking, a stealth proxy. Expect higher credit cost per request.
- Transcript and content search. You need caption text per video. Request Markdown output or use extraction rules targeting the transcript region. This feeds LLM summarization and topic-trend pipelines.
If you are unsure which fields exist on a given video, start with a single request using ai_extract_rules and a plain-language description of the fields you want. The response comes back as parsed JSON, and you can then lock in CSS selectors for repeatable runs.
Request controls and what they unlock
The API exposes a small set of parameters that change what the renderer does and what the response contains. The table below is a reader guide, not a replacement for the exact request contract.
- render_js: executes the page in a real browser so dynamically loaded content (comments, some engagement widgets) is present. Costs 5 API credits per successful request when enabled.
- stealth_proxy: routes the request through a stealth proxy to reduce CAPTCHA and block risk. Costs 75 API credits per successful request.
- premium_proxy: premium proxy pool. Costs 10 credits with JS rendering disabled, or 25 credits with JS rendering enabled.
- country_code: geotargets the request through 200+ countries and territories (40+ on classic proxies).
- extract_rules: CSS or XPath selectors mapped to field names, returning structured JSON.
- ai_extract_rules: a natural-language spec that returns structured JSON without selectors.
- screenshot: captures a full-page screenshot for visual verification.
- markdown: returns the page as clean Markdown for LLM consumption.
A practical rule: start with the cheapest option that returns the fields you need, then add render_js or a proxy only when a field is missing or the request is blocked.
Estimating credit cost before you commit
Credit cost per request depends on the options you enable. The captured figures are: 5 credits for JS rendering, 25 credits for premium_proxy with JS, and 75 credits for stealth_proxy. A plain request without those options starts at 1 credit.
Worked example using the captured numbers: suppose you track 2,000 videos per day and need comment text, so you enable JS rendering plus a stealth proxy. At 75 credits per request, that is 150,000 credits per day, which exceeds the Hobby plan's 75,000 monthly credits by a wide margin. If you only need metadata and can skip the stealth proxy, the same 2,000 videos at 5 credits each is 10,000 credits per day, or roughly 300,000 per month, which fits the Startup plan's 1,000,000 credits with room to spare. The lesson: the proxy choice, not the video count, usually drives the bill.
API credits are valid for one month and do not roll over. Requests start at 1 credit each.
Plan limits at a glance (dated reference)
The plan figures below reflect the captured pricing page at the time of capture and are shown as a dated reference, not a current quote. Check the live pricing page before you commit.
| Plan | Monthly price | API credits | Concurrent requests | Priority support | Team management |
|---|---|---|---|---|---|
| Hobby | $19/mo | 75,000 | 25 | Not included | Not included |
| Freelance | $49/mo | 250,000 | 50 | Not included | Not included |
| Startup | $99/mo | 1,000,000 | 100 | Not included | Not included |
| Business | $249/mo | 3,000,000 | 200 | Included | Included |
| Business + | $599/mo | 8,000,000 | 400 | Included | Included |
| Enterprise 14 | $999/mo | 14,000,000 | 500 | Included | Included |
| Enterprise 24 | $1,599/mo | 24,000,000 | 600 | Included | Included |
| Enterprise 41 | $2,399/mo | 41,000,000 | 700 | Included | Included |
| Enterprise 69 | $3,599/mo | 69,000,000 | 800 | Included | Included |
| Enterprise 120 | $5,799/mo | 120,000,000 | 900 | Included | Included |
All prices are exclusive of VAT. JavaScript rendering, rotating and premium proxies, geotargeting, and screenshots and extraction rules are included on every plan. The differentiators are credit volume, concurrency, priority email support, dedicated account manager, and team management.
Telling failures apart
Three failure modes look similar but need different fixes.
- Blocked request. The response is an error or a CAPTCHA page rather than the video. Fix: enable stealth_proxy or premium_proxy, and consider country_code if the block is geo-specific.
- Missing field. The request succeeds but a field you expected is absent. Fix: the content may load dynamically, so enable render_js. If the field still does not appear, it may not be on the public page for that video.
- Wrong extraction rule. The request succeeds and the page renders, but your JSON has nulls or wrong values. Fix: check that your CSS or XPath selectors match the current page structure, or switch to ai_extract_rules with a plain-language spec.
A quick diagnostic order: confirm the URL is a public video page, confirm the field exists in the rendered HTML, then confirm your rule targets it. That sequence avoids paying for stealth proxies when the real problem is a selector.
Setup path
- Create an account to get an API key and 1,000 free credits. No credit card is required.
- Install an SDK for Python, Node.js, Go, PHP, Ruby, or Java, or use plain cURL. The SDKs wrap the same request contract.
- Send the YouTube video URL with your API key. The renderer executes the page in a real browser, rotates the IP, and returns the response.
- Add advanced parameters only when needed: render_js for JavaScript, stealth_proxy for CAPTCHAs, country_code for geotargeting, ai_extract_rules for natural-language extraction.
Clear examples exist in Python, Node.js, cURL, and the request builder. Copy the snippet, swap in your key, and send the request.
Compliance and scope
Pages that are visible without signing in are generally the ones teams collect, yet each site's terms still govern what you may do, so read them before you deploy and keep requests away from anything behind a login. The API does not collect or store personal data from scraped sites unless the user explicitly requests it. If your workflow touches personal data, confirm your own GDPR or CCPA obligations before you build.
| Plan | Monthly price | API credits | Concurrent requests | Priority support | Team management |
|---|---|---|---|---|---|
| Hobby | $19/mo | 75,000 | 25 | Not included | Not included |
| Freelance | $49/mo | 250,000 | 50 | Not included | Not included |
| Startup | $99/mo | 1,000,000 | 100 | Not included | Not included |
| Business | $249/mo | 3,000,000 | 200 | Included | Included |
| Business + | $599/mo | 8,000,000 | 400 | Included | Included |
| Enterprise 14 | $999/mo | 14,000,000 | 500 | Included | Included |
| Enterprise 24 | $1,599/mo | 24,000,000 | 600 | Included | Included |
| Enterprise 41 | $2,399/mo | 41,000,000 | 700 | Included | Included |
| Enterprise 69 | $3,599/mo | 69,000,000 | 800 | Included | Included |
| Enterprise 120 | $5,799/mo | 120,000,000 | 900 | Included | Included |
Captured pricing page figures, shown as a dated reference. All prices exclusive of VAT. Check the live pricing page before committing.
Frequently asked questions
Do I need a YouTube account to use this API?
No. You need an API key from the provider, which comes with 1,000 free credits and no card requirement. Send the public video URL and the renderer handles the rest. You do not log in to YouTube.
Is scraping YouTube videos legal?
Public-facing pages can usually be scraped, but the answer depends on jurisdiction and on YouTube's terms of service. Review the target site's terms before deploying, and avoid post-login content. This is not legal advice.
What data can I extract from a YouTube video?
Anything that renders on the public page. Use extract_rules with CSS selectors, or ai_extract_rules with a natural-language spec, to get structured JSON back. Typical fields include title, description, tags, category, duration, view count, upload date, like and comment counts, hashtags, transcripts, and creator info.
How do I get structured JSON from a YouTube video?
You have two routes to JSON: supply extract_rules that pair CSS selectors with the field names you want, or describe the fields in plain language through ai_extract_rules. Either way the reply arrives already parsed as JSON. If you are unsure which selectors to use, start with ai_extract_rules and then lock in selectors for repeatable runs.
Which programming languages can I use?
Any. SDKs are published for Python, Node.js, Go, PHP, Ruby, and Java. Plain cURL works too. Pick whatever your stack already uses.
How much does it cost to scrape YouTube videos?
There are 1,000 free credits on signup with no card required. Paid plans start at $19/month for higher volume and concurrency. Credit cost per request depends on options: 5 credits for JS rendering, 25 for premium_proxy with JS, and 75 for stealth_proxy. A plain request starts at 1 credit. Credits are valid for one month and do not roll over.
What should I try first if a request is blocked?
Enable stealth_proxy or premium_proxy, and add country_code if the block appears geo-specific. If the request succeeds but a field is missing, the cause is usually dynamic content, so enable render_js before paying for a proxy.