YouTube Scraper API
Search YouTube, pull full video and Shorts detail, fetch comments and replies, export transcripts (SRT/VTT/plain text), enumerate a channel’s videos, shorts, streams, playlists, and community posts, and retrieve trending feeds, hashtags, and playlists — from the world’s largest video platform. The API handles authentication, anti-bot bypass, and region routing automatically.Key Features
Widest Coverage
39 endpoints — videos, Shorts, channels, playlists, comments, transcripts, trending, hashtags, community posts, and music search.
Transcripts & Captions
The
/v1/youtube/videos/{id}/transcript endpoint returns timed segments plus ready-to-use SRT, VTT, and full-text exports.Anti-Bot Bypass
Automatic session management, Chrome TLS impersonation, and fingerprint rotation to avoid blocks.
Rich Video Data
Views, likes, chapters, heatmap (most-replayed), keywords, hashtags, live details, and streaming formats.
Region & Language
Target any content region with
gl and any UI language with hl for accurate, localized results.SDK Support
First-class support via the ScrapeBadger Node.js and Python SDKs.
Regions & Languages
YouTube results are localized by content region and UI language. Two query parameters control this on most endpoints:| Parameter | Meaning | Example |
|---|---|---|
gl | Content region (ISO 3166-1 alpha-2 country code) | US, GB, DE, JP |
hl | UI / interface language (BCP-47 language code) | en, de, fr, ja |
Pagination
YouTube list endpoints do not use page numbers. Every paginated response includes acontinuation token; pass it back as the continuation query parameter to fetch the next page. When continuation is null, you have reached the end.
Quick Start
Endpoints
Search & Discovery
| Endpoint | Method | Description |
|---|---|---|
/v1/youtube/search | GET | Search videos, channels, playlists, or movies |
/v1/youtube/autocomplete | GET | Keyword autocomplete suggestions |
/v1/youtube/trending | GET | Trending feed (Now / Music / Gaming / Movies) |
/v1/youtube/trending/shorts | GET | Trending Shorts shelf |
/v1/youtube/hashtags/{tag} | GET | Videos under a hashtag |
/v1/youtube/home | GET | Guest home / recommendations feed |
/v1/youtube/music/search | GET | YouTube Music search (songs, albums, artists) |
Videos & Shorts
| Endpoint | Method | Description |
|---|---|---|
/v1/youtube/videos/{video_id} | GET | Full video detail |
/v1/youtube/videos/batch | POST | Up to 50 videos in one request |
/v1/youtube/videos/{video_id}/related | GET | Related / recommended videos |
/v1/youtube/videos/{video_id}/comments | GET | Top-level comments |
/v1/youtube/videos/{video_id}/comments/{comment_id}/replies | GET | Replies to a comment |
/v1/youtube/videos/{video_id}/transcript | GET | Timed transcript (SRT / VTT / text) |
/v1/youtube/videos/{video_id}/captions | GET | Available caption tracks |
/v1/youtube/videos/{video_id}/streams | GET | Streaming formats (best-effort URLs) |
/v1/youtube/videos/{video_id}/live_chat | GET | Live chat / chat replay messages |
/v1/youtube/shorts/{video_id} | GET | Full Shorts detail |
/v1/youtube/shorts/by_sound/{sound_id} | GET | Shorts using a given sound |
Channels
| Endpoint | Method | Description |
|---|---|---|
/v1/youtube/channels/{channel_id} | GET | Full channel detail (accepts UC…, @handle, or custom URL) |
/v1/youtube/channels/{channel_id}/videos | GET | A channel’s videos |
/v1/youtube/channels/{channel_id}/shorts | GET | A channel’s Shorts |
/v1/youtube/channels/{channel_id}/streams | GET | A channel’s live streams |
/v1/youtube/channels/{channel_id}/playlists | GET | A channel’s playlists |
/v1/youtube/channels/{channel_id}/community | GET | A channel’s community posts |
/v1/youtube/channels/{channel_id}/about | GET | Lightweight channel about payload |
/v1/youtube/channels/{channel_id}/subscriber_count | GET | Fast subscriber-count-only lookup |
/v1/youtube/channels/{channel_id}/search | GET | Search within a channel |
/v1/youtube/channels/resolve | GET | Resolve a handle / URL to canonical ids |
Playlists
| Endpoint | Method | Description |
|---|---|---|
/v1/youtube/playlists/{playlist_id} | GET | Full playlist detail + first item page |
/v1/youtube/playlists/{playlist_id}/items | GET | A page of playlist items |
/v1/youtube/mixes/{mix_id} | GET | An auto-generated mix |
Community & Reference
| Endpoint | Method | Description |
|---|---|---|
/v1/youtube/posts/{post_id} | GET | A community post |
/v1/youtube/posts/{post_id}/comments | GET | Comments on a community post |
/v1/youtube/oembed | GET | Public oEmbed metadata for a URL |
/v1/youtube/categories | GET | Video category reference list |
/v1/youtube/languages | GET | Supported UI languages (hl) |
/v1/youtube/regions | GET | Supported content regions (gl) |
/v1/youtube/markets | GET | Supported markets reference |
Credit Costs
| Endpoint | Cost |
|---|---|
| Search | 5 credits |
| Trending / hashtag / home | 5 credits |
| Music search | 5 credits |
| Video detail | 10 credits |
| Batch videos | 10 credits per video |
| Related / comments / replies / live chat | 5 credits |
| Transcript | 5 credits |
| Streams | 15 credits |
| Captions | 2 credits |
| Short detail / shorts by sound | 5 credits |
| Channel detail | 5 credits |
| Channel videos / shorts / streams / playlists / community / search | 5 credits |
| Channel about / subscriber count / resolve | 2 credits |
| Playlist / playlist items / mix | 5 credits |
| Community post / post comments | 5 credits |
| Autocomplete / oEmbed | 1 credit |
| Categories / languages / regions / markets | 0 credits |
| Failed requests | 0 credits |
Authentication
All requests require your API key in theX-API-Key header:
Anti-Bot Handling
YouTube protects its data with IP-reputation scoring, TLS/HTTP-2 fingerprinting, bot-guard challenges, and PO-token requirements on media. ScrapeBadger clears these automatically using Chrome TLS impersonation on sessions matched to the target region. You never need to manage proxies, sessions, or tokens.For accurate, localized results, requests are routed through proxies in the
gl region. This is handled automatically. Some fields (such as dislike_count and direct media urls) are restricted by YouTube platform-wide and may be null.Next Steps
Search YouTube
Full API reference for searching videos, channels, and playlists
Get Video Detail
Fetch full metadata for a single video

