YouTube Trending Video Scraper avatar

YouTube Trending Video Scraper

Pricing

from $0.00005 / actor start

Go to Apify Store
YouTube Trending Video Scraper

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

Akash Kumar Naik

Maintained by Community

Actor stats

0

Bookmarked

404

Total users

56

Monthly active users

2 days ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

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.

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 supported category charts.

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 — All, Music, Gaming, People & Blogs and Entertainment category charts
  • 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:

RegionCodeRegionCode
United StatesUSGermanyDE
IndiaINJapanJP
United KingdomGBFranceFR
CanadaCABrazilBR
AustraliaAUMexicoMX
South KoreaKRSpainES
RussiaRUItalyIT
IndonesiaIDNetherlandsNL

See the Input schema tab on the Actor page for the full list of 51 regions.

Video Categories

IDCategory
0All Categories
10Music
20Gaming
22People & Blogs
24Entertainment

YouTube's mostPopular chart is curated by YouTube. Other category IDs either return videos from mixed categories or no chart at all, so they are not offered here.

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

ParameterTypeRequiredDefaultDescription
regionCodestringNoUSCountry to fetch trending videos from (ISO 3166-1 alpha-2 code)
videoCategoryIdstringNo0Category chart to fetch (0 = all categories)
maxResultsintegerNo50Maximum 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": "10",
"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"tags": ["music", "official"]
}

How to Use

  1. Open the Actor page on Apify Store and click Start Actor.
  2. Pick a region (regionCode) and optionally a category (videoCategoryId).
  3. Set maxResults (1–50).
  4. 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 ApifyClient
client = 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:

EventPriceDescription
apify-actor-start$0.00005Synthetic start event (first 5s of compute covered by Apify)
getTrendingVideos$0.00015 per videoPer trending video returned

Cost examples:

ScenarioVideosCost
Single US trending fetch50$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)
  • Category charts are curated by YouTube, so the requested category is not a strict filter on every video. The output field video_category_id is the video's real category from snippet.categoryId.
  • 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. The input offers All (0), Music (10), Gaming (20), People & Blogs (22), and Entertainment (24). These are the categories YouTube's mostPopular chart filters reliably. Each output row also carries the video's real video_category_id.

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.

If you need more YouTube data from Apify, check out my other Apify Actors:


Built and maintained by akash9078 on the Apify platform.