YouTube Trending Scraper (by Country & Category) avatar

YouTube Trending Scraper (by Country & Category)

Pricing

from $1.99 / 1,000 results

Go to Apify Store
YouTube Trending Scraper (by Country & Category)

YouTube Trending Scraper (by Country & Category)

YouTube Trending Scraper captures the trending feed by country and category - rank, video title, URL, ID, thumbnail, author, publish time, views, likes and comments. ๐Ÿ”ฅ For trend spotting, content planning and virality research.

Pricing

from $1.99 / 1,000 results

Rating

0.0

(0)

Developer

Scrapers Hub

Scrapers Hub

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

YouTube Trending Scraper

The YouTube Trending Scraper pulls the current list of trending YouTube videos for any of 26 countries and 13 content categories, returning clean, structured records you can push straight into a spreadsheet, a BI dashboard or a content-planning pipeline. Instead of manually opening the YouTube trending tab, switching regions and copying titles by hand, you pick a country and a category, press Start, and receive a ranked dataset containing video titles, canonical video URLs, video IDs, thumbnail links, channel names, publish recency, view counts, like counts and comment counts.

Trending data is the fastest signal available about what an audience is actually watching right now. Media teams use it to time coverage, marketers use it to find rising formats before saturation, and researchers use it to track how attention moves between regions. This YouTube trending scraper turns that signal into a repeatable dataset rather than a screenshot.

The Actor is built on a lightweight HTTP client, so it runs without a headless browser and without heavy resource consumption. Each run outputs one dataset item per trending video, already ordered by its trending rank.


Every dataset item describes a single trending video. The fields group naturally into five categories:

CategoryFieldsWhat you get
๐Ÿฅ‡ RankingrankThe position of the video within the trending list for the selected country and category
๐ŸŽฌ Video identityvideo_title, video_id, video_urlThe display title, the eleven-character YouTube video ID, and the canonical watch URL
๐Ÿ–ผ๏ธ Media assetsthumbnail_urlDirect link to the video's thumbnail image, suitable for embedding or downloading
๐Ÿ‘ค Channel & timingauthor, published_time_textThe uploading channel or credited creator, plus the relative publish time as YouTube displays it
๐Ÿ“Š Engagement metricsviews, likes, commentsAbbreviated engagement counts as shown on the platform
๐ŸŒ Run contextcountry, categoryThe country slug and the human-readable category the item was collected under

The most analytically useful field here is rank combined with published_time_text. Because trending position and publish recency arrive together, you can immediately separate videos that climbed fast from a same-day upload against evergreen content that has been accumulating for weeks โ€” a distinction that raw view counts alone will never give you.


FeatureDescription
๐ŸŒ 26-country coverageChoose from World, India, Indonesia, United States, Brazil, Saudi Arabia, France, Japan, Germany, Thailand, United Kingdom, Turkey, Mexico, Philippines, Spain, Vietnam, UAE, Russia, South Africa, Canada, Switzerland, Australia, Chile, Netherlands, Italy and South Korea
๐ŸŽญ 13 content categoriesNarrow results to Music, Gaming, Sports, News & Politics, Comedy, Entertainment, Film & Animation, Autos & Vehicles, Pets & Animals, People & Blogs, Howto & Style, Science & Technology โ€” or take everything with All
๐Ÿฅ‡ Rank-ordered outputItems arrive with an explicit rank field so the trending order is preserved in the dataset, not just implied by row position
โšก Browser-free architectureRuns on plain HTTP requests via httpx with no headless Chrome, which keeps memory requirements and run duration low
๐Ÿ–ผ๏ธ Thumbnail URLs includedEvery record carries a thumbnail_url so you can build visual dashboards or download creative assets without a second lookup
๐Ÿ“Š Engagement metrics in one passviews, likes and comments are captured alongside the video metadata, avoiding a separate per-video enrichment step
๐Ÿ” Repeatable snapshotsBecause the input is just two select fields, the same run configuration can be scheduled daily to build a longitudinal trending archive
๐Ÿงพ Stable, flat schemaTwelve top-level fields with no nested objects, so CSV, Excel and Google Sheets exports stay readable
๐Ÿ”— Full API and integration supportTrigger runs and pull the dataset through the Apify API, the Python or JavaScript clients, webhooks, Zapier or Make

Regional depth without regional accounts. Getting a genuine view of what is trending in Japan or Brazil normally means a VPN, a fresh browser profile and a lot of manual switching. Here it is a dropdown. The country field is written back into every record, so multi-region datasets stay unambiguous when you merge them.

Category-level precision. Global trending lists are dominated by music and entertainment, which buries signal for anyone tracking gaming, science, or news. Selecting a specific category returns a trending list scoped to that vertical, so a gaming analyst is not forced to filter out chart-topping music videos.

Lightweight and fast by design. The Actor uses direct HTTP requests rather than a headless browser. That means shorter runs, lower memory, and a far smaller failure surface โ€” there is no page rendering step that can hang or time out on a slow asset.

Analysis-ready output. The dataset is flat, consistently keyed and includes the run context on every row. You can concatenate a month of daily runs into a single table and immediately group by country, category or author without any reshaping.


๐Ÿ“ฅ Input

The YouTube trending scraper takes two required fields. Both are dropdown selects, so there is nothing to construct or escape.

{
"country": "world",
"category": "all"
}
FieldTypeRequiredDefaultDescription
countrystring (enum)โœ… YesworldSelect the country to scrape trends for. Accepts one of: world, india, indonesia, united-states, brazil, saudi-arabia, france, japan, germany, thailand, united-kingdom, turkey, mexico, philippines, spain, vietnam, united-arab-emirates, russia, south-africa, canada, switzerland, australia, chile, netherlands, italy, south-korea
categorystring (enum)โœ… YesallSelect the category of trends to scrape. Accepts one of: all, film-and-animation, autos-and-vehicles, music, pets-and-animals, sports, gaming, people-and-blogs, comedy, entertainment, news-and-politics, howto-and-style, science-and-technology

๐Ÿ’ก Input Examples

Global trending, everything:

{
"country": "world",
"category": "all"
}

United States gaming trends:

{
"country": "united-states",
"category": "gaming"
}

Indian music charts:

{
"country": "india",
"category": "music"
}

๐Ÿ“ค Output

Each trending video becomes one dataset item. Below is a real record from an actual run of the YouTube trending scraper:

{
"rank": 1,
"video_title": "Toxic Official Hindi Trailer | Rocking Star Yash | Geetu Mohandas | KVN | Monster Mind Creations",
"video_url": "https://youtube.com/watch?v=G5hWlD5zfhw",
"video_id": "G5hWlD5zfhw",
"thumbnail_url": "https://i.ytimg.com/vi/G5hWlD5zfhw/sddefault.jpg",
"author": "KVN PRODUCTIONS and Zee Music Company",
"published_time_text": "3 days ago",
"views": "28M",
"likes": "598K",
"comments": "34K",
"country": "world",
"category": "Film & Animation"
}
FieldTypeDescription
rankinteger | nullRank of the item in the results
video_titlestring | nullVideo title of the item
video_urlstring | nullURL of the video file
video_idstring | nullIdentifier of the video
thumbnail_urlstring | nullURL of the thumbnail image
authorstring | nullAuthor of the item
published_time_textstring | nullText of the published time
viewsstring | nullNumber of views
likesstring | nullNumber of likes
commentsstring | nullComments attached to the item
countrystring | nullCountry
categorystring | nullCategory of the item

Note that views, likes and comments are returned as strings in the abbreviated form YouTube displays (28M, 598K, 34K). If you need numeric values for arithmetic, parse the suffix in your downstream pipeline. Any field may be null when the platform does not expose that value for a given video.


Sign in to your Apify account and open the Actor page. If you do not have an account yet, creating one takes under a minute and gives you access to the Apify console, where every run, log and dataset is stored. From the Actor page, click Start or Try for free to open the input form. The console is also where you will later find scheduling, integrations and API tokens, so it is worth getting familiar with the layout early.

Step 2: Select the target country

The country dropdown controls which regional trending list is fetched. Choose world for the aggregated global list, or pick a specific market such as united-states, japan or brazil. This is the single most impactful setting in the whole configuration, because trending lists diverge enormously between regions โ€” a video dominating in Indonesia may not appear at all in the German list. If you plan to compare markets, run the scraper once per country rather than trying to combine them in a single run.

Step 3: Choose the content category

The category dropdown scopes the trending list to a vertical. Leaving it on all returns the general trending feed, which tends to skew toward music and entertainment. Selecting something narrower โ€” gaming, news-and-politics, science-and-technology โ€” gives you a list that is genuinely useful for that niche. The chosen category is echoed back in the category output field in its human-readable form, so you can safely merge multiple category runs into one table and group afterwards.

Step 4: Start the run and watch the log

Click Start. The run log streams live in the console, showing progress as the trending list is fetched and parsed. Because the Actor uses direct HTTP requests rather than a headless browser, runs are typically short. If something goes wrong โ€” an unexpected page structure, a network error โ€” it will surface in the log with a clear message rather than failing silently.

Step 5: Review the dataset in the Output tab

When the run finishes, switch to the Output or Dataset tab. You will see a table with one row per trending video, ordered by rank. Scan the first few rows to confirm the country and category match what you selected, and check that views and likes are populated. This quick sanity check takes seconds and catches configuration mistakes before you build anything on top of the data.

Step 6: Export in your preferred format

Apify datasets export to JSON, CSV, Excel, XML, HTML table and RSS from the same screen. CSV is the usual choice for spreadsheet analysis; JSON is better if you are feeding an application. You can also filter and select specific fields at export time โ€” for example, exporting only rank, video_title, author and views for a lightweight editorial brief.

Step 7: Schedule recurring runs to build a trend archive

A single trending snapshot tells you what is popular today. A month of daily snapshots tells you how popularity moves. Use the Schedules section of the Apify console to run the same country/category combination every day at a fixed time. Because the run context is written into every record via the country and category fields, appending each day's dataset to a growing archive is straightforward, and you can later compute rank velocity per video_id.


๐Ÿ”Œ API Access & Integrations

Run the YouTube trending scraper directly from the Apify API and get the dataset items back in a single synchronous call:

curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~youtube-trending-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"country": "united-states",
"category": "gaming"
}'

The same thing with the official Python client:

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run_input = {
"country": "japan",
"category": "music",
}
run = client.actor("scrapers-hub/youtube-trending-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["rank"], item["video_title"], item["views"], item["author"])

Beyond the API, the Actor connects to Zapier, Make, Google Sheets, Slack, Airtable and any custom endpoint through Apify webhooks, so a finished run can push fresh trending data into your stack automatically.


๐Ÿ“ฐ Newsroom and Editorial Planning

Set category to news-and-politics and run across several countries to see which stories are commanding attention where. The combination of video_title, author and published_time_text shows which outlets broke a story and how quickly it climbed. Editorial teams use this to decide what deserves same-day coverage versus a considered follow-up.

๐ŸŽฎ Gaming Market Intelligence

With category set to gaming, the video_title and author fields reveal which titles and which creators are driving discovery in a given market. Tracking rank for the same video_id across daily runs shows whether a game launch is building momentum or already fading, which is far more informative than a single view count.

๐ŸŽต Music A&R and Playlist Curation

The music category surfaces breakout tracks before they reach mainstream charts. Pairing views with published_time_text isolates songs that accumulated large audiences in days rather than months โ€” exactly the profile A&R scouts and playlist curators look for. The thumbnail_url gives you cover art for internal review decks without extra requests.

๐Ÿ“ฃ Influencer and Creator Discovery

The author field across a category-scoped run is effectively a ranked list of creators currently winning attention in that vertical and market. Brands building influencer shortlists can aggregate author frequency across several days of runs to distinguish consistent performers from one-hit uploads, then use video_url to review the actual content.

๐Ÿ“Š Competitive Content Benchmarking

If your own channel operates in a specific category, running the scraper for that category and your target country gives you a benchmark set. Comparing your engagement ratios against the views, likes and comments of trending peers shows realistically what "good" looks like in your niche rather than against platform-wide averages.

๐ŸŒ Cross-Market Trend Comparison

Run the same category across multiple country values and merge the datasets. Because every row carries its own country, you can pivot on it directly and see which videos trend in several markets simultaneously โ€” a strong indicator of content that travels well and a useful input for localisation decisions.

๐ŸŽจ Creative and Thumbnail Research

The thumbnail_url field lets you assemble a visual board of what currently-trending thumbnails look like in your category. Combined with video_title, this is practical research for title and cover design: you can see the framing, colour and copy conventions that are working right now rather than relying on general advice.


  • Run one country and category per execution. The input accepts a single value for each. To cover several markets, launch separate runs โ€” this keeps the datasets clean and makes failures isolated rather than partial.
  • Schedule at a consistent time each day. Trending lists refresh throughout the day. Fixing the run time removes a major source of noise when you compare snapshots across days.
  • Parse the abbreviated counts once, at ingestion. views, likes and comments arrive as strings such as 28M. Convert them to integers as the first step of your pipeline so every downstream consumer works with numbers.
  • Use video_id as your join key. Titles change and URLs can carry tracking parameters, but video_id is stable. Deduplicate and join daily snapshots on it.
  • Start with all before narrowing. If a specific category returns fewer results than expected for a small market, run all for the same country to confirm the region has a populated trending list at that moment.
  • Keep the raw dataset. Export or copy each run's output before transforming it. Trending lists are ephemeral โ€” once a video drops off, that snapshot is not recoverable from the platform.

๐Ÿ› ๏ธ Troubleshooting

Why did my run return fewer items than I expected? Trending list length varies by country and category. Smaller markets and narrow categories genuinely have shorter lists at some times of day. Try all for the same country to confirm the region is returning data, and check the run log for parsing warnings.

Why are views or likes empty on some rows? Every output field is nullable. YouTube does not display like counts for every video, and some entries omit engagement figures entirely. Treat null as "not published by the platform" rather than as zero, and handle it explicitly in any aggregation.

Why do the numbers look rounded? The scraper captures the abbreviated values the platform renders (28M, 598K). These are the figures YouTube itself displays on the trending page, so they are accurate to the platform's own rounding. Exact integer counts are not exposed there.

The run finished but the dataset is empty. What now? Check that both country and category are set to values from the allowed enum lists โ€” a slug typed by hand (for example usa instead of united-states) will not match. Then re-run; transient network conditions can cause an empty fetch, and the Actor is cheap enough to retry immediately.

Can I get historical trending data for a past date? No. The YouTube trending scraper reads the live trending list at the moment the run executes. There is no historical archive to query. Building a history requires scheduling recurring runs from today forward.


What does the YouTube Trending Scraper actually do? It fetches the current YouTube trending list for a country and category you select, then outputs one structured record per video containing rank, title, video ID, URL, thumbnail, channel, publish recency, views, likes and comments.

Which countries does the YouTube trending scraper support? Twenty-six options in total: World, India, Indonesia, United States, Brazil, Saudi Arabia, France, Japan, Germany, Thailand, United Kingdom, Turkey, Mexico, Philippines, Spain, Vietnam, United Arab Emirates, Russia, South Africa, Canada, Switzerland, Australia, Chile, Netherlands, Italy and South Korea.

Which YouTube categories can I scrape trends for? All, Film & Animation, Autos & Vehicles, Music, Pets & Animals, Sports, Gaming, People & Blogs, Comedy, Entertainment, News & Politics, Howto & Style, and Science & Technology.

Do I need a YouTube API key or a Google account? No. The Actor requires only your Apify token to run through the API, and nothing at all if you launch it from the console. No YouTube credentials are involved.

Can I scrape multiple countries in one run? Not in a single run โ€” country accepts one value. Launch one run per country and merge the datasets afterwards. Each record includes its own country field, which makes merging trivial.

Is the output ordered by trending position? Yes. The rank field carries the explicit trending position, so ordering survives export, filtering and re-sorting in a spreadsheet.

What format can I export the trending data in? JSON, CSV, Excel, XML, HTML table and RSS, all directly from the Apify dataset view or through the API.

Why are view counts returned as text instead of numbers? Because YouTube renders them in abbreviated form on the trending page and the scraper captures what is displayed. Convert 28M to 28000000 in your own pipeline if you need arithmetic.

Does this YouTube trending scraper use a headless browser? No. It runs on direct HTTP requests using httpx, which keeps runs fast and memory usage low compared with browser-based scraping.

How often should I run the YouTube trending scraper? Once a day at a fixed time is the most common pattern and is enough to track rank movement. Teams tracking fast-moving news categories sometimes run every few hours.

Can I get the full video description or comment text? No. The output includes a comments count, not the comment bodies, and there is no description field. The scraper is scoped to the trending listing data.

Does the Actor need proxy configuration? No proxy configuration is exposed in the input, and none is required to run it.

Can I track how a specific video moves up or down the trending chart? Yes, by scheduling recurring runs and joining snapshots on video_id. Comparing rank across days gives you a clean velocity metric.

What happens if YouTube changes its trending page layout? Parsing may return fewer fields or an empty dataset until the Actor is updated. If you see a sudden drop in output quality, report it through the Issues tab so it can be fixed quickly.

Is scraping YouTube trending data legal? The Actor collects only publicly visible listing information that any visitor can see without logging in. You remain responsible for complying with YouTube's Terms of Service and applicable law in how you store and use the data.


๐Ÿ†˜ Support & Feedback

Found a bug, hit an unexpected error, or noticed a field that stopped populating? Open a report in the Issues tab on the Actor page โ€” issues raised there are tracked and prioritised.

Need a custom version of the YouTube trending scraper, additional fields, a different output shape, or a bespoke scraping build for another platform? Email scraperhubapi@gmail.com and describe what you need.

If this Actor saves you time, please leave a review on the Apify Store. Honest feedback helps other users decide and directly shapes what gets improved next.


โš–๏ธ Disclaimer

The YouTube Trending Scraper collects only publicly available information from YouTube's trending pages โ€” data that any visitor can view without signing in or bypassing access controls. It does not access private videos, member-only content, user accounts, or any material behind authentication.

You are responsible for how you use the data this Actor produces. That includes complying with YouTube's Terms of Service, applicable copyright law, and the data protection regulations of your jurisdiction. Where collected data includes information that could identify an individual โ€” for example a creator's channel name in the author field โ€” GDPR, CCPA and equivalent privacy frameworks may apply to your storage and processing of it, and you should ensure you have a lawful basis for that processing.

Thumbnail images and video titles remain the intellectual property of their respective creators and rights holders. The thumbnail_url field is a reference to a publicly hosted asset; republishing those assets may require permission from the copyright owner.

This Actor is not affiliated with, endorsed by, or sponsored by YouTube or Google. If you believe data collected by this scraper relates to you and you would like it removed, contact scraperhubapi@gmail.com and the request will be handled promptly.