VOOZH about

URL: https://apify.com/automation-lab/youtube-trending-videos-scraper

⇱ YouTube Trending Videos Scraper by Country Β· Apify


Pricing

Pay per event

Go to Apify Store

YouTube Trending Videos Scraper

Scrape ranked YouTube Trending videos by country and category with video IDs, titles, channels, views, thumbnails, and source URLs.

Pricing

Pay per event

Rating

0.0

(0)

Developer

πŸ‘ Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

9 days ago

Last modified

Categories

Share

Scrape public YouTube trending-style video results by country, category, and result limit.

Use this actor to monitor what videos are gaining attention, build content research dashboards, and export structured YouTube video metadata without maintaining your own parser.

What does YouTube Trending Videos Scraper do?

YouTube Trending Videos Scraper collects ranked video rows for a selected country and category.

It is designed for recurring monitoring jobs where you need a clean dataset instead of manually opening YouTube and copying titles.

The actor returns video IDs, watch URLs, titles, channel names, published-time text, view counts when available, thumbnails, selected category, selected region, and the source URL used for the run.

It first tries the public YouTube Trending page.

If YouTube returns a logged-out shell with no video renderers, the actor can transparently use a public YouTube search fallback for the same trending category.

Each row includes sourceType so you can see whether the result came from the official page or from the fallback.

Who is it for?

Content strategists

Use the actor to spot video topics, formats, and hooks that are currently popular in a target market.

Social media agencies

Run the actor daily for multiple countries and categories, then compare rising topics across clients and regions.

News and market monitors

Track what public YouTube users are likely seeing around news, sports, entertainment, music, and education topics.

Creator teams

Export titles, thumbnails, durations, channels, and view-count text for inspiration boards and editorial calendars.

Data analysts

Feed ranked video metadata into spreadsheets, BI tools, warehouses, or notification workflows.

Why use this actor?

  • 🎯 Country-aware input using YouTube gl region codes.
  • 🧭 Category presets for general, music, gaming, movies, news, sports, fashion, and learning.
  • πŸ“¦ Structured JSON dataset ready for export.
  • πŸ”— Direct YouTube watch URLs and video IDs.
  • πŸ–ΌοΈ Thumbnail URLs for dashboards.
  • ⏱️ Duration and published-time text when exposed by YouTube.
  • πŸ“Š View-count text plus parsed numeric views when possible.
  • 🧾 Source URL and source type for auditing.
  • βš™οΈ HTTP-only implementation for lower run cost.
  • πŸ§ͺ Conservative default input for cheap first tests.

What data can you extract?

FieldDescription
rankRank within the returned dataset.
videoIdYouTube video identifier.
urlDirect https://www.youtube.com/watch?v=... URL.
titleVideo title.
channelNameChannel name when available.
channelUrlChannel URL when available.
publishedTimeTextHuman-readable freshness text, such as 2 days ago.
viewCountTextHuman-readable views text.
viewCountParsed numeric view count when possible.
durationTextVideo duration text.
thumbnailUrlBest available thumbnail URL.
badgesRenderer badges such as verified labels when available.
categoryCategory input used for the run.
regionCountry code input used for the run.
sourceTypeOfficial trending page or fallback search.
sourceUrlURL fetched for the returned rows.
scrapedAtISO timestamp for the scrape.

How much does it cost to scrape YouTube trending videos?

This actor uses pay-per-event pricing.

There is a small start charge per run and a per-video charge for each saved dataset item.

The default input is intentionally small so you can test the actor cheaply before scheduling larger jobs.

For the latest exact price, check the Pricing tab on the Apify Store page.

How to use YouTube Trending Videos Scraper

  1. Open the actor on Apify.
  2. Choose a country code, for example US, GB, DE, IN, or BR.
  3. Pick a category such as all, music, gaming, or news.
  4. Set maxItems to the number of videos you want.
  5. Keep fallbackToSearch enabled unless you only want official-page rows.
  6. Start the run.
  7. Export the dataset as JSON, CSV, Excel, XML, or RSS.

Input options

region

Two-letter country code used by YouTube.

Examples:

  • US
  • GB
  • DE
  • IN
  • BR
  • CA
  • AU
  • JP

category

Supported values:

  • all
  • music
  • gaming
  • movies
  • news
  • sports
  • fashion
  • learning

maxItems

Maximum number of videos to save.

Use a small value for test runs.

Use a larger value for scheduled monitoring jobs.

language

YouTube interface language, for example en, de, es, fr, or pt.

fallbackToSearch

YouTube sometimes returns a logged-out page with no public video renderers.

When this option is enabled, the actor uses public YouTube search for a matching trending query and records sourceType: youtube_search_fallback.

Disable it if your workflow requires only official Trending-page rows.

Example input

{
"region":"US",
"category":"all",
"maxItems":25,
"language":"en",
"fallbackToSearch":true
}

Example output

{
"rank":1,
"videoId":"dQw4w9WgXcQ",
"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title":"Example trending video title",
"channelName":"Example Channel",
"channelUrl":"https://www.youtube.com/@example",
"publishedTimeText":"1 day ago",
"viewCountText":"1.2M views",
"viewCount":1200000,
"durationText":"12:34",
"thumbnailUrl":"https://i.ytimg.com/vi/example/hqdefault.jpg",
"badges":[],
"category":"all",
"region":"US",
"sourceType":"youtube_search_fallback",
"sourceUrl":"https://www.youtube.com/results?...",
"scrapedAt":"2026-06-13T00:00:00.000Z"
}

Tips for best results

  • Start with maxItems: 25 to validate your workflow.
  • Schedule daily or hourly runs for trend monitoring.
  • Store sourceType in your downstream table so you can filter official-page rows separately.
  • Compare the same category across multiple regions.
  • Use videoId as a stable deduplication key.
  • Keep thumbnails for editorial review boards.
  • Use viewCount for numeric sorting when YouTube exposes view text.

Common workflows

Daily content briefing

Schedule one run every morning for your target country.

Send the dataset to Slack, email, Google Sheets, or a BI dashboard.

Regional comparison

Run the actor for US, GB, DE, IN, and BR.

Join the results by timestamp and compare titles, channels, and categories.

Creator inspiration board

Export titles and thumbnails into a spreadsheet.

Review hooks, formats, durations, and channels during planning meetings.

News monitoring

Use the news category and a small result limit.

Alert your team when new high-interest topics appear.

Integrations

You can connect this actor to:

  • Google Sheets exports for editorial planning.
  • Make or Zapier for alerting workflows.
  • Slack or Discord notifications for daily trend digests.
  • BigQuery, Snowflake, or PostgreSQL for historical trend analysis.
  • Apify webhooks for event-driven automation.
  • Actor tasks for scheduled country/category monitoring.

API usage

Node.js

import{ ApifyClient }from'apify-client';
const client =newApifyClient({token: process.env.APIFY_TOKEN});
const run =await client.actor('automation-lab/youtube-trending-videos-scraper').call({
region:'US',
category:'all',
maxItems:25,
language:'en',
fallbackToSearch:true,
});
const{ items }=await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
import os
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/youtube-trending-videos-scraper').call(run_input={
'region':'US',
'category':'all',
'maxItems':25,
'language':'en',
'fallbackToSearch':True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

cURL

curl-X POST "https://api.apify.com/v2/acts/automation-lab~youtube-trending-videos-scraper/runs?token=$APIFY_TOKEN"\
-H'Content-Type: application/json'\
-d'{"region":"US","category":"all","maxItems":25,"language":"en","fallbackToSearch":true}'

MCP integration

Use Apify MCP to run this actor from Claude Code, Claude Desktop, or compatible MCP clients.

MCP endpoint:

https://mcp.apify.com/?tools=automation-lab/youtube-trending-videos-scraper

Claude Code setup:

$claude mcp add apify-youtube-trending https://mcp.apify.com/?tools=automation-lab/youtube-trending-videos-scraper

Claude Desktop JSON config:

{
"mcpServers":{
"apify-youtube-trending":{
"url":"https://mcp.apify.com/?tools=automation-lab/youtube-trending-videos-scraper"
}
}
}

Example prompts:

  • "Run the YouTube Trending Videos Scraper for US music and summarize the top 10 titles."
  • "Collect trending gaming videos for GB and export the dataset URL."
  • "Compare US and IN trending video titles from two actor runs."

Reliability notes

YouTube changes renderer structures over time.

This actor walks multiple common renderer types and skips incomplete rows instead of failing on a single malformed item.

The sourceType field is important because YouTube's public logged-out Trending page may not always expose video renderers from every network or region.

When that happens, the fallback keeps the workflow productive while remaining transparent.

Limitations

  • The actor does not log in to YouTube.
  • The actor does not use private cookies or user accounts.
  • Likes and comments are not guaranteed from public list pages.
  • View counts can be missing or approximate.
  • Official category URLs may vary by country and YouTube experiment.
  • Search fallback results are trending-style search results, not guaranteed official Trending rankings.

Legality

This actor collects public information visible without a YouTube account.

You are responsible for using the data in a way that complies with applicable laws, YouTube's terms, and privacy requirements.

Do not use the actor to collect private, personal, or account-only data.

FAQ

Does it require a YouTube API key?

No.

The actor uses public web pages and does not require your YouTube Data API quota.

Why do I see youtube_search_fallback in sourceType?

It means YouTube returned no video renderers on the logged-out Trending page for that request, so the actor used public search for the selected trending category.

Can I scrape multiple countries in one run?

The current version accepts one country per run.

Create multiple Apify tasks if you want a scheduled multi-country monitor.

Can I get likes and comments?

List pages do not reliably expose likes or comment counts.

Use the video URL with a separate video detail actor if you need those metrics.

Why are some view counts null?

YouTube sometimes hides or localizes view text.

The actor keeps the raw viewCountText and parses viewCount only when the text is available and recognizable.

Troubleshooting

The dataset has fewer rows than requested

YouTube may expose fewer public renderers for the selected country/category.

Try a broader category such as all, enable fallbackToSearch, or reduce maxItems.

The run fails with no videos extracted

Try a different region, confirm fallbackToSearch is enabled, and rerun with a small maxItems value.

Related scrapers

Explore other Automation Lab YouTube and social media actors:

Changelog

0.1

Initial version with country/category input, ranked video output, official-page parser, and transparent public search fallback.

You might also like

Youtube Trending Scraper

scrapelabsapi/youtube-trending-scraper

🎬 YouTube Trending Scraper (youtube-trending-scraper) collects real-time trending videos by country & categoryβ€”titles, channels, views, likes, tags, publish date, thumbnails & URLs. ⚑ JSON/CSV export for research, competitor analysis & SEO. 🧩 API-ready, fast & scalable.

Youtube Trending Scraper

scrapeengine/youtube-trending-scraper

πŸ“ˆ YouTube Trending Scraper (youtube-trending-scraper) extracts real-time trending videos by country & categoryβ€”titles, channels, views, likes, tags, thumbnails, publish date & URLs. πŸ”Ž Ideal for content strategy, SEO & competitor analysis. ⚑ Fast, reliable, API/CSV-ready.

YouTube Trending Videos Scraper

maximedupre/youtube-trending-videos-scraper

Scrape ranked videos from YouTube-owned category pages and charts by region. Export video IDs, URLs, titles, channels, view counts, thumbnails, source labels, and ranks. No YouTube login, cookies, or API key needed.

πŸ‘ User avatar

Maxime DuprΓ©

4

Youtube Trending Scraper

scrapemesh/youtube-trending-scraper

πŸ“ˆ YouTube Trending Scraper (youtube-trending-scraper) pulls real-time trending videos by country/regionβ€”titles, channels, views, likes, category, rank, publish date & thumbnails. πŸ” Ideal for content strategy, market research, and competitor analysis. πŸš€ Export to CSV/JSON.

Youtube Trending Scraper

scraply/youtube-trending-scraper

πŸŽ₯ YouTube Trending Scraper (youtube-trending-scraper) pulls real-time trending videos by country & category β€” titles, channels, views, thumbnails, publish date & more. πŸ“Š Export CSV/JSON for analytics. πŸ”₯ Perfect for content research, SEO, competitors & trend insights. πŸš€ Fast, reliable, API-ready.

YouTube Trending Videos/Shorts Scraper πŸ“Ί

easyapi/youtube-trending-videos-shorts-scraper

Extract trending videos, shorts and recently trending videos from YouTube's trending page. Get comprehensive video data including titles, views, channels, thumbnails, and more. Perfect for content analysis, trend tracking and market research.

Youtube Trending Scraper

scrapepilotapi/youtube-trending-scraper

YouTube Trending Scraper extracts videos from the YouTube trending page. It collects video titles, URLs, channels, views, likes, publish dates, thumbnails, and ranking data. Ideal for trend discovery, content research, competitor analysis, and video analytics.

Youtube Trending Scraper

scrapium/youtube-trending-scraper

πŸ“Š YouTube Trending Scraper (youtube-trending-scraper) extracts real-time trending videos by region & categoryβ€”titles, channels, views, likes, tags, thumbnails, dates & URLs. πŸ”Ž Ideal for SEO, content strategy, analytics & newsroom research. ⚑ Fast, reliable CSV/JSON exports.

YouTube Trending Scraper

powerai/youtube-trending-scraper

Export YouTube trending videos for a regionβ€”titles, channels, stats, thumbnails, and descriptions in one run.

Youtube Trending Scraper

api-empire/youtube-trending-scraper

YouTube Trending Scraper extracts real-time trending videos from YouTube. Collect titles, thumbnails, creators, categories, views, likes, and metadata. Ideal for trend research, content planning, competitor analysis, and workflows needing structured YouTube trending data.