YouTube Trending Videos Scraper avatar

YouTube Trending Videos Scraper

Pricing

from $0.60 / 1,000 trending video returneds

Go to Apify Store
YouTube Trending Videos Scraper

YouTube Trending Videos Scraper

Scrape YouTube's official country-level Trending Music and Trending Movie Trailer charts. Use it for regional content research, not search or recommendations. Returns ranked videos with IDs, URLs, channels, artists, release dates, thumbnails, and chart context. Charged per scan and video.

Pricing

from $0.60 / 1,000 trending video returneds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

Get ranked videos from YouTube's official, non-personalized Trending Charts by country. This actor returns a compact, structured snapshot of either Trending Music Videos or Trending Movie Trailers: rank, video and channel IDs, canonical YouTube URL, artists, duration, release date, thumbnail, and chart context.

Use it for repeatable regional trend monitoring, editorial planning, music and trailer research, or creator-market analysis. Do not use it for YouTube search results, personalized Home recommendations, a channel's popular uploads, YouTube Studio audience insights, or a broad legacy Trending feed. Those are different YouTube surfaces and are deliberately not substituted here.

What it extracts

Every dataset item has the same flat, agent-friendly shape.

FieldMeaning
rankCurrent position in the requested Trending Chart
videoId, videoUrlStable YouTube video ID and canonical watch URL
titleVideo title supplied by YouTube Charts
channelId, channelNameAssociated channel when YouTube supplies it
artistsChart artist credits in display order
durationSeconds, releaseDateVideo duration and release date when available
thumbnailUrlLargest chart-provided thumbnail
previousRank, viewsChangePercent, periodsOnChartMovement data when YouTube provides it
region, chart, sourceUrl, scrapedAtExact chart context and collection time

The actor also writes OUTPUT and RUN_SUMMARY in the default key-value store. They contain the terminal outcome, result count, completed countries, any source failures, and PPE event counters.

When to use it

Use this actor when your question is one of these:

  • What music videos are gaining the most traction in the United States today?
  • Which movie trailers are trending in the United Kingdom this week?
  • How do official Trending Music rankings differ across the US, Canada, and Australia?
  • Which entries gained or lost rank between scheduled chart snapshots?

Charts are non-personalized: viewers in the same country see the same ranking. YouTube updates these chart views roughly every 30 minutes, so scheduling a recurring Actor task is the right way to build a time series.

Input

All inputs have useful defaults; no input is required for a US Trending Music snapshot.

InputDefaultNotes
regions["US"]One to ten ISO alpha-2 country codes, for example US, GB, or PK
charttrendingMusictrendingMusic or trendingMovieTrailers
maxResultsPerRegion30Keep from 1 to 30 ranked entries for each country
languageenBCP 47 UI language tag such as en, es, or pt-BR

Example input

{
"regions": ["US", "GB"],
"chart": "trendingMusic",
"maxResultsPerRegion": 10,
"language": "en"
}

For movie trailers, set chart to trendingMovieTrailers. YouTube does not publish every chart in every ISO country; an unavailable country/category pair is a valid empty result, not silently replaced with unrelated content.

Output example

{
"rank": 1,
"videoId": "ESORouDblNg",
"videoUrl": "https://www.youtube.com/watch?v=ESORouDblNg",
"title": "One Two",
"channelId": "UC1_liDR4fRFJgH4HoJeV8cw",
"channelName": "Future - Topic",
"artists": ["Future"],
"durationSeconds": 120,
"releaseDate": "2026-07-09",
"thumbnailUrl": "https://i.ytimg.com/vi/ESORouDblNg/maxresdefault.jpg",
"previousRank": null,
"viewsChangePercent": null,
"periodsOnChart": null,
"isAvailable": true,
"region": "US",
"chart": "trendingMusic",
"sourceUrl": "https://charts.youtube.com/charts/TrendingVideos/us",
"scrapedAt": "2026-07-14T12:30:00.000Z"
}

Fields unavailable from a particular YouTube chart are returned as null, never omitted. This keeps scheduled exports stable for spreadsheets, databases, and AI agents.

Pricing

This is a Pay per event + usage actor. Platform compute usage is passed through in addition to the predictable event charges.

EventPriceWhen charged
Actor start$0.00005Once when a run starts
Trending chart scanned$0.03After a requested country chart is successfully retrieved
Trending video returned$0.0006For each validated video written to the dataset

A one-country, 30-video run costs about $0.04805 plus platform usage. A one-country top-ten snapshot costs about $0.03605 plus platform usage. Empty, valid chart responses do not generate per-video charges.

API examples

JavaScript

const response = await fetch(
'https://api.apify.com/v2/acts/khadinakbar~youtube-trending-videos-scraper/runs?token=YOUR_APIFY_TOKEN',
{
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
regions: ['US'],
chart: 'trendingMovieTrailers',
maxResultsPerRegion: 10,
language: 'en',
}),
},
);
console.log(await response.json());

Python

import requests
response = requests.post(
'https://api.apify.com/v2/acts/khadinakbar~youtube-trending-videos-scraper/runs',
params={'token': 'YOUR_APIFY_TOKEN'},
json={
'regions': ['US', 'CA'],
'chart': 'trendingMusic',
'maxResultsPerRegion': 20,
'language': 'en',
},
timeout=60,
)
print(response.json())

Use your Apify token as a secret. Do not put a token in the actor input, dataset, or a public task.

Reliability and limits

The actor calls YouTube's public Charts browse service directly. It uses retries for transient source failures and reports PARTIAL when at least one country produces useful data while another fails. It reports VALID_EMPTY when YouTube truthfully has no entries for a valid chart/country request. Invalid country codes, invalid chart types, and out-of-range limits return INVALID_INPUT with a clear correction.

The actor does not use a user login, cookies, a YouTube Data API key, proxy configuration, or a fallback to search. That last point matters: search popularity is not the same as a YouTube Trending Chart. If the public chart contract changes or cannot return useful data for any country, the run fails honestly with UPSTREAM_FAILED rather than returning unrelated videos.

Use a dedicated actor when the data goal is not a public Trending Chart:

FAQ

You can request up to 30 currently available entries per country chart and up to ten countries per run. Schedule recurring runs to retain historical rank snapshots in Apify datasets.

Yes. The default dataset can be exported as JSON, CSV, Excel, RSS, or via the Apify API, then forwarded to automation tools, warehouses, or a dashboard.

Yes. Start a run with the Apify API and read its default dataset after completion. The JavaScript and Python examples above show the input shape.

No. YouTube's current public non-personalized trending surfaces are category-specific Charts. This actor returns official Trending Music Videos and Trending Movie Trailers and labels the source precisely.

No. Those products depend on viewer or channel-specific signals and are outside this public, repeatable chart contract.

Use this actor only for lawful purposes and in accordance with the policies that apply to your use. The actor collects public chart information and does not access private accounts, bypass authentication, or obtain non-public YouTube analytics.

Your feedback

If this actor saves your team time, please leave feedback in its Apify Console issue tab. Clear reports with the country, chart, run ID, and expected result help keep the public-chart contract reliable.