Dedicated ScrapersYouTube Scraper API
Dedicated YouTube API

YouTube Scraper API by ScrapeBadger — Videos, Channels & Transcripts

The fastest way to start scraping YouTube at scale. Our YouTube API returns structured JSON for videos, channels, playlists, comments, transcripts, search, trending, and Shorts — with no Data API key, anti-bot bypass, and region targeting built in.

39Endpoints
No keyData API needed
1–3sAvg response
From $0.36Per 1K search req

No credit card required · PAYG credits never expire

Get YouTube Video
# Get full detail for a YouTube video
import scrapebadger

client = scrapebadger.ScrapeBadger("sb_live_...")

video = client.youtube.video(
    video_id="dQw4w9WgXcQ"
)
200 OK1.8s · 15 credits
{
  "video_id": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "view_count": 1623847291,
  "like_count": 17800000,
  "length_seconds": 213,
  "channel_name": "Rick Astley",
  "published_at": "2009-10-25T06:57:33Z"
}
API Reference

YouTube API — 39 Dedicated Endpoints

Structured JSON responses with normalized data models. No HTML parsing. No proxy management. No Data API quota.

Response Schema

Every Field You Need, Ready to Use

All fields are normalized into typed JSON. Datetimes ship as both Unix timestamps and ISO-8601 strings. Thumbnails come as variant arrays with width and height.

Video

video_idstring11-char video identifier
titlestringVideo title
descriptionstringFull video description
view_countintegerTotal views
like_countintegerLike count (from /next toolbar)
comment_countintegerTotal comments on the video
length_secondsintegerDuration in seconds
published_atstringPublish date (ISO + Unix)
channel_idstringOwning channel UC… ID
channel_namestringChannel display name
keywordsarrayVideo tags / keywords
chaptersarrayChapter markers with timestamps
heatmaparrayMost-replayed intensity graph
thumbnailsarrayThumbnail variants (url, w, h)

Channel

channel_idstringCanonical UC… channel ID
titlestringChannel name
channel_usernamestring@handle
number_of_subscribersintegerSubscriber count
channel_total_videosintegerTotal uploaded videos
channel_total_viewsintegerLifetime channel views
descriptionstringChannel description
joined_datestringAccount creation date
countrystringChannel country
is_verifiedbooleanVerified badge
avatarstringChannel avatar URL
bannerstringChannel banner URL
external_linksarrayAbout-page links
latest_videosarrayFirst page of uploads
How it works

From API call to clean JSON in seconds

No proxy setup. No Data API key. No anti-bot configuration.

1

Send a request

Call any YouTube endpoint with your API key and parameters — query, video ID, channel handle, playlist ID, or region (gl/hl). REST or SDK.

2

We handle the hard parts

ScrapeBadger calls YouTube’s InnerTube JSON endpoints through a residential proxy with Chrome impersonation, picks the right client per endpoint, and detects blocks automatically.

3

Get structured JSON

Receive normalized JSON with typed fields, thumbnail variants, and dual-format timestamps — ready to store, analyse, or pipe into your application.

Use Cases

What Developers Build with YouTube Data

Scraping YouTube gives you real-time signals — trending videos and Shorts, channel growth, comment sentiment, and full transcripts for AI.

Trend & virality tracking

Pull trending feeds, hashtag feeds, and Shorts shelves by region to spot rising videos, sounds, and topics before they peak — across any country.

Channel & creator analytics

Track subscriber counts, view totals, upload cadence, and engagement across channels. Build creator dashboards and influencer-discovery tools on real data.

Transcripts for AI & search

Export timed transcripts and captions in any available language to power summarization, semantic search, subtitling, and RAG pipelines.

Comment & sentiment mining

Collect full comment threads with replies, sorted by top or newest, to analyze audience sentiment, feedback, and brand mentions at scale.

AI training datasets

Collect structured video, channel, and transcript data — titles, descriptions, tags, chapters, and captions — for training recommendation and classification models.

Cross-region comparison

Compare trending and search results across regions with gl (content region) and hl (UI language) to understand how content travels between markets.

Pricing

Pay Per Request. Credits Never Expire.

You only pay for successful responses — failed requests are always free. PAYG credits never expire; volume subscription tiers reduce per-credit cost further.

EndpointCredits / requestPAYGSubscription

See the full plan comparison on the pricing page — subscription tiers step down per-credit cost beyond the cheapest column shown above.

Free trial
1,000 credits free
= 125 search requests
Credits expire
Never
Buy once, use anytime
Failed requests
Always free
Pay for success only
Live cost estimator
Credits per request8
Total credits needed8,000
Loading plans…
Why ScrapeBadger

Built for Reliability at Scale

ScrapeBadger's YouTube Scraper API handles everything YouTube throws at automated requests — so your pipeline keeps running.

No Data API key or quota

We read YouTube’s own InnerTube JSON endpoints — no official Data API v3 key, no OAuth, and no daily quota units to ration. Just call the endpoint and get data.

Anti-bot bypass included

YouTube fingerprints traffic and increasingly gates requests behind bot checks. ScrapeBadger handles Chrome impersonation, residential proxies, and block detection automatically — no CAPTCHA solving on your end.

Structured JSON, no parsing

Responses are normalized typed JSON — no HTML to parse, no fragile selectors that break when YouTube ships a frontend change. Datetimes ship as both Unix and ISO-8601.

Transcripts & captions

A dedicated transcript endpoint returns timed segments with language and translation options — the data summarization, subtitling, and AI pipelines depend on.

Pay per success only

Credits are only deducted for successful responses. If YouTube returns an error or the request times out, no credits are consumed. You only pay for data you actually receive.

SDKs for 12 Languages

Official SDKs for Python, Node.js, Go, Rust, PHP, C#, Java, Kotlin, Ruby, Swift, Dart and C++ — generated from one OpenAPI spec, always in sync with the API. Full documentation with working code examples for every endpoint.

Code Examples

Simple Integration. Any Language.

Get started in minutes with Python, Node.js, or plain HTTP requests.

The scrapebadger Python library wraps the YouTube API with typed methods. Install with pip install scrapebadger, then start scraping YouTube in a few lines of code.

Python: Search + Detail
from scrapebadger import ScrapeBadger

client = ScrapeBadger("sb_live_...")

# Search videos, US region
results = client.youtube.search(
    query="lo-fi beats",
    gl="US",
)

# Get full details for the first result
for video in results.results[:3]:
    detail = client.youtube.video(
        video_id=video.video_id,
    )
    print(detail.title, detail.view_count)
Node.js: Transcript
import ScrapeBadger from 'scrapebadger'

const client = new ScrapeBadger({
  apiKey: 'sb_live_...'
})

// Get the timed transcript for a video
const transcript = await client.youtube.transcript({
  videoId: 'dQw4w9WgXcQ',
})

for (const segment of transcript.segments) {
  console.log(segment.start, segment.text)
}
FAQ

Frequently Asked Questions

Common questions about scraping YouTube with the API — Python, Node.js, or REST.

What data does the YouTube Scraper API return?

Search returns videos, channels, and playlists with views, duration, channel, and thumbnails. Video detail returns the full merged player + next response — views, likes, comment count, description, keywords, chapters, heatmap, and channel info. Dedicated endpoints cover comments and replies, transcripts and captions, streaming data, related videos, channel sub-surfaces (videos, shorts, streams, playlists, community, about, subscriber count), playlists and mixes, trending and hashtag feeds, Shorts and shorts-by-sound, community posts, and YouTube Music search.

Do I need a YouTube Data API key?

No. The ScrapeBadger YouTube API reads YouTube’s unauthenticated InnerTube JSON endpoints directly — there is no official Data API v3 key, no OAuth flow, and no quota units to manage. You also get data the Data API never exposes, such as transcripts, heatmaps, related videos, and live subscriber counts.

Can I get YouTube video transcripts and captions?

Yes. The /videos/{id}/transcript endpoint returns timed transcript segments with optional language and translation (tlang) parameters, and /videos/{id}/captions lists every available caption track and translation language. Transcripts are priced at just 8 credits — a deliberate undercut, since fetching them through InnerTube is cheap.

How does region targeting work?

Every list endpoint accepts gl (content region, e.g. US, GB, DE) and hl (UI language, e.g. en, es, de). Combine them to get region-correct search, trending, and home feeds. The /regions, /languages, and /markets reference endpoints list every supported value and are free to call.

How does the YouTube Scraper API handle anti-bot protection?

YouTube fingerprints TLS/HTTP traffic and increasingly gates InnerTube and streaming requests behind bot checks and PO-token requirements. ScrapeBadger uses Chrome impersonation over residential proxies, detects blocks, and selects the right InnerTube client per endpoint automatically. You never configure proxies, manage fingerprints, or solve CAPTCHAs.

How do I scrape YouTube with Python?

Install with pip install scrapebadger, then initialise the client and call client.youtube.search(query="lo-fi beats"), client.youtube.video(video_id="dQw4w9WgXcQ"), client.youtube.transcript(video_id="dQw4w9WgXcQ"), or client.youtube.channel(channel_id="@mkbhd"). The SDK returns typed objects and exposes continuation tokens for paging through every list endpoint.

Plans & subscriptions

Bigger volume? Save up to 70%

Per-request credit costs are listed above. For higher monthly volume, subscription tiers reduce the per-credit rate substantially. All YouTube endpoints — search, videos, channels, transcripts, comments, trending, and Shorts — included on every plan.

Get started

Start Scraping YouTube Today

1,000 free credits. No credit card. Get your API key in under a minute.

PAYG credits never expire · Pay only for successful requests · No Data API key