YouTube Trending Video Scraper
Pricing
from $0.00005 / actor start
YouTube Trending Video Scraper
Scrape YouTube trending videos by region and category using the YouTube Data API v3. Extract video metadata, views, likes, comments, and more for SEO research, content planning, and trend analysis.
Pricing
from $0.00005 / actor start
Rating
0.0
(0)
Developer
Akash Kumar Naik
Maintained by CommunityActor stats
0
Bookmarked
345
Total users
110
Monthly active users
6 days ago
Last modified
Categories
Security
Limited permissionsShare
YouTube Trending Scraper is an Apify Actor that extracts real-time trending video data from YouTube by region and category using the official YouTube Data API v3 — video metadata, views, likes, comments, and more for SEO research, content planning, and trend analysis.
What Is YouTube Trending Scraper?
The Actor scrapes YouTube's most popular/trending videos using the official YouTube Data API v3. It returns video metadata including views, likes, comments, duration, thumbnails, and channel info for any of the 51 supported regions, with filtering by the 11 trending categories.
Key Features
- Real-time trending data — get current trending videos as they appear on YouTube
- Multi-region coverage — 51 regions via ISO 3166-1 alpha-2 codes
- Category filtering — Music, Gaming, Sports, Shorts, Film & Animation, and more (11 categories)
- Comprehensive metadata — views, likes, comments, duration, tags, thumbnails, channel info
- Pay-per-event pricing — pay only for what you use; no subscription required
- Python SDK — full Apify SDK integration for reliable data extraction
Supported Regions
51 regions are supported via ISO 3166-1 alpha-2 codes. Popular regions include:
| Region | Code | Region | Code |
|---|---|---|---|
| United States | US | Germany | DE |
| India | IN | Japan | JP |
| United Kingdom | GB | France | FR |
| Canada | CA | Brazil | BR |
| Australia | AU | Mexico | MX |
| South Korea | KR | Spain | ES |
| Russia | RU | Italy | IT |
| Indonesia | ID | Netherlands | NL |
See the Input schema tab on the Actor page for the full list of 51 regions.
Video Categories
| ID | Category | ID | Category |
|---|---|---|---|
| 0 | All Categories | 17 | Sports |
| 1 | Film & Animation | 18 | Shorts |
| 2 | Autos & Vehicles | 19 | Travel & Events |
| 10 | Music | 20 | Gaming |
| 15 | Pets & Animals | 21 | Videoblogging |
| 22 | People & Blogs |
Use Cases
- SEO research — identify trending topics in your niche, discover high-performing titles and descriptions, analyze trending content patterns and keywords, and track keyword trends across regions
- Content planning — find viral content ideas, monitor competitor video performance, analyze trending categories and tags, and research content gaps in your market
- Market research — regional content performance analysis, trend forecasting, audience interest mapping, and brand monitoring
- AI & data science — training data for ML models, trend prediction feature engineering, social media sentiment analysis, and video engagement benchmarking
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
regionCode | string | No | US | Country to fetch trending videos from (ISO 3166-1 alpha-2 code) |
videoCategoryId | string | No | 0 | Category to filter by (0 = all categories) |
maxResults | integer | No | 50 | Maximum number of videos to retrieve (1–50) |
Example input:
{"regionCode": "US","videoCategoryId": "0","maxResults": 50}
Sample Output
{"video_id": "dQw4w9WgXcQ","title": "Video Title","description": "Video description","channel_id": "UC...","channel_title": "Channel Name","published_at": "2024-01-15T12:00:00Z","thumbnail_url": "https://i.ytimg.com/vi/...","view_count": 1000000,"like_count": 50000,"comment_count": 2000,"duration": "10:30","region_code": "US","video_category_id": null,"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","tags": ["music", "official"]}
How to Use
- Open the Actor page on Apify Store and click Start Actor.
- Pick a region (
regionCode) and optionally a category (videoCategoryId). - Set
maxResults(1–50). - Run the Actor and download results as JSON, CSV, or Excel from the dataset.
How to Use via API
cURL:
curl -X POST "https://api.apify.com/v2/acts/akash9078/youtube-trending-scraper/runs" \-H "Authorization: Bearer YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"regionCode": "US", "maxResults": 50}'
Python:
from apify_client import ApifyClientclient = ApifyClient(token='YOUR_APIFY_TOKEN')run = client.actor('akash9078/youtube-trending-scraper').call(run_input={'regionCode': 'US','videoCategoryId': '0','maxResults': 50})for item in client.dataset(run['defaultDatasetId']).list_items()['items']:print(item)
Node.js with Apify Client:
const { ApifyClient } = require('apify-client');const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });const run = await client.actor('akash9078/youtube-trending-scraper').call({regionCode: 'US',videoCategoryId: '0',maxResults: 50,});const dataset = await client.dataset(run.defaultDatasetId).listItems();console.log(dataset.items);
Pricing
This Actor uses the Pay Per Event pricing model:
| Event | Price | Description |
|---|---|---|
apify-actor-start | $0.00005 | Synthetic start event (first 5s of compute covered by Apify) |
getTrendingVideos | $0.00015 per video | Per trending video returned |
Cost examples:
| Scenario | Videos | Cost |
|---|---|---|
| Single US trending fetch | 50 | $0.0075 |
| Multi-region (5 countries) | 250 | $0.0375 |
| Daily monitoring (30 days) | 1,500 | ~$0.23/day (≈ $6.90/month) |
(Each run adds the one-time $0.00005 apify-actor-start charge.)
Limitations
- Maximum 50 videos per run (matching YouTube's trending chart size)
- Subject to YouTube API quotas
- Data reflects the current trending chart; historical trending data is not available
- Intended for personal, research, and educational use — users must comply with the YouTube Terms of Service, Google API Terms of Service, and applicable laws. Licensed under the MIT License.
FAQ
How many videos can I get per run?
Up to 50 — the size of YouTube's trending chart for a region and category.
Which regions are supported?
51 regions via ISO 3166-1 alpha-2 codes, from the US, UK, and India to Japan, Brazil, and Vietnam.
Can I filter by category?
Yes. videoCategoryId supports 11 categories including All (0), Music (10), Gaming (20), Sports (17), and Shorts (18).
How is billing calculated?
$0.00015 per trending video returned, plus a $0.00005 synthetic start event per run — a 50-video fetch costs about $0.0076.
Does it need a YouTube API key?
No. The Actor runs on the official YouTube Data API v3 with the key managed on the Apify platform.
Related Actors
If you need more YouTube data from Apify, check out my other Apify Actors:
- YouTube Transcript Scraper — extract transcripts from any YouTube video
- YouTube Transcript Extractor — transcripts with timestamps in 100+ languages
- YouTube Full Channel Transcripts Extractor — transcripts for entire channels
- YouTube Playlist Scraper with Transcript — playlist metadata plus transcripts
- YouTube Channel Video Scraper — video metadata for entire channels
- YouTube Playlist Scraper — full metadata for every video in a playlist
- YouTube Search Scraper — search YouTube via the official Data API
Built and maintained by akash9078 on the Apify platform.