YouTube Trending Scraper
Pricing
from $3.00 / 1,000 results
YouTube Trending Scraper
Scrape trending and popular YouTube videos by category. Returns ranked video lists for Gaming, News, Music, Movies, and more.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share
Scrape trending and popular YouTube videos by category — Gaming, News, Music, Movies, and the main Trending feed. Returns ranked video lists with titles, channels, view counts, durations, thumbnails, and badge metadata.
What You Get
Each scraped video includes:
| Field | Description | Example |
|---|---|---|
position | Rank in the trending list | 1 |
videoId | YouTube video ID | "dQw4w9WgXcQ" |
title | Video title | "Minecraft 1.21 Update" |
channelName | Channel display name | "Dream" |
channelUrl | Full channel URL | "https://www.youtube.com/@Dream" |
viewCountText | Human-readable view count | "3.2M views" |
publishedTimeText | Relative publish time | "2 days ago" |
durationText | Video duration | "12:34" |
thumbnailUrl | Highest-resolution thumbnail URL | "https://i.ytimg.com/vi/..." |
badges | Array of badge labels | ["4K", "CC"] |
isLive | Whether the video is a live stream | true |
category | Input category used | "gaming" |
scrapedAt | ISO 8601 UTC timestamp | "2024-01-15T10:30:00+00:00" |
Fields with no value are omitted from output rather than being returned as null.
Input
| Field | Type | Default | Description |
|---|---|---|---|
category | string | "gaming" | Trending section: now, gaming, music, movies, news |
maxResults | integer | 50 | Maximum number of videos to return (1–200) |
market | string | "US" | Regional market: US, GB, DE, IN, JP, BR, FR, ES, KR, RU |
Category Notes
gaming— YouTube Gaming trending feed. Works without authentication and typically surfaces dozens to hundreds of videos across shelf sections. Most reliable category.news— Redirects to the YouTube News channel and returns recent top-story videos grouped by shelf. Works without authentication. Typically surfaces 100–200 videos.music— YouTube Music channel. Returns music videos from trending playlists and charts. Works without authentication; surfaces 30–80 individual videos.movies— YouTube Movies channel. Requires YouTube authentication; unauthenticated access only shows a promotional page with no video data.now— Main YouTube Trending feed (/feed/trending). Requires YouTube authentication; unauthenticated requests redirect to the home page and return no results.
Example Input
{"category": "gaming","maxResults": 50,"market": "US"}
How It Works
The scraper uses Playwright (headless Chromium) to render YouTube's JavaScript-heavy trending pages and extract the embedded ytInitialData JSON object, which contains the full structured video data. HTTP-only fetches return 0 videos because trending pages require JS execution.
The scraper:
- Launches a headless Chromium browser with consent cookies pre-set to bypass GDPR overlays
- Navigates to the category URL with region parameters (
?gl=US&hl=en) - Waits for JS to execute and populate
window.ytInitialData - Parses shelf sections (
shelfRenderer,gridVideoRenderer,videoRenderer,richGridRenderer) to extract all visible videos - Trims to
maxResultsand pushes to the dataset
Frequently Asked Questions
Why does the now or movies category return no results?
YouTube's main trending feed (/feed/trending) and the Movies channel both require authentication. Unauthenticated users are silently redirected or shown only a promotional page with no video data. Use gaming, news, or music for reliable unauthenticated scraping.
How many videos can I get?
The Gaming category surfaces the most videos (200–400 across shelf sections). Music, Movies, and News categories depend on what YouTube populates on those channel pages, typically 30–100 videos. Set maxResults up to 200 to capture as many as possible.
Does this work without a proxy? Yes. The scraper is designed to work without a proxy and actually tries without proxy first, as proxy IPs can trigger GDPR consent pages or regional redirects. A proxy is configured as a fallback if the initial no-proxy attempt fails.
What regions are supported?
US, GB, DE, IN, JP, BR, FR, ES, KR, RU. The market field sets the gl (geolocation) and hl (language) parameters to return region-specific trending content.
Are live streams included?
Yes. Live streams appear in trending feeds and are flagged with "isLive": true and a "LIVE" badge in the badges array.
Why are some fields missing from certain videos?
Fields like publishedTimeText and durationText are not available for live streams (they have no fixed duration or publish date yet). Fields with no value are omitted entirely from the output record to keep the data clean.
Output Dataset Views
The dataset offers two views in the Apify UI:
- Trending Overview — Compact view: position, videoId, title, channelName, viewCountText, isLive, category
- Full Details — All fields including channelUrl, durationText, thumbnailUrl, badges, and scrapedAt timestamp
Use Cases
- Daily trend monitoring — schedule the actor to run every morning and track which topics dominate the Gaming or Music trending feed
- Content strategy — identify which video formats, lengths, and titles are trending right now in your niche
- Competitive intelligence — see which channels are appearing in trending feeds across different categories
- Market research — compare trending content across different regional markets using the
marketparameter - News tracking — use the
newscategory to capture the day's top-story videos without a news API subscription - SEO and keyword research — extract trending video titles to identify high-traffic keywords and phrases
FAQ
Which categories are most reliable?
gaming, news, and music are the most reliable for unauthenticated scraping. now (main trending feed) and movies require YouTube authentication and return no results without it.
How often does trending content change? The Gaming and Music trending lists refresh frequently throughout the day. For accurate trend snapshots, schedule runs every 1–6 hours.
Can I scrape trending content for non-US markets?
Yes. Set the market field to any supported country code (e.g. GB, DE, JP, BR). Results will reflect the trending content for that region.
Do I need a proxy? No. The actor is designed to work without a proxy and tries direct connections first. Proxy fallback is used automatically when direct access is blocked.
Why does maxResults sometimes return fewer videos than configured?
YouTube's category pages have a fixed number of available trending slots. If a category has fewer videos than your maxResults limit, you will get all available videos.
YouTube Scraper Suite
This actor is part of a complete YouTube data extraction toolkit. Explore the full suite:
| Actor | Description |
|---|---|
| YouTube Channel Scraper | Channel metadata, subscriber counts, and full video catalogs |
| YouTube Channel Scraper Fast | Streamlined channel scraper for high-volume and speed-sensitive workflows |
| YouTube Comment Scraper | Comments, replies, likes, author info, and pinned/hearted status |
| YouTube Email Scraper | Creator contact emails from channel pages, Instagram, TikTok, and Linktree |
| YouTube Hashtag Scraper | Videos and Shorts tagged with specific hashtags |
| YouTube Playlist Scraper | All videos and metadata from any YouTube playlist |
| YouTube Search Scraper | Search results including videos, channels, and playlists |
| YouTube Shorts Scraper | Shorts from channels or hashtags with full view and like metadata |
| YouTube Transcript Scraper | Timed transcripts and captions with optional Whisper AI fallback |
| YouTube Trending Scraper | Ranked trending videos by category — Gaming, Music, News, Movies |
| YouTube Video Details Scraper | Comprehensive video metadata, chapters, endscreen, captions, and comments |
| YouTube Video Downloader | Download videos, playlists, and channels in any quality with metadata |