# YouTube Trending Scraper - Charts, Shorts & Music (`scrapesage/youtube-trending-scraper`) Actor

Scrape YouTube trending videos and the official YouTube Charts for 68 countries: rank, previous rank, places climbed, views, channel, artists and release date. Covers trending videos, top music videos, top Shorts tracks, top songs and top artists. No API key and no browser.

- **URL**: https://apify.com/scrapesage/youtube-trending-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Social media, Videos, AI
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.28 / 1,000 chart entry scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Trending Scraper - Charts, Shorts & Music

> **Disclaimer:** This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Google LLC or any of its subsidiaries. All trademarks mentioned are the property of their respective owners. "YouTube" is referenced only to describe the publicly available website this Actor collects data from.

Scrape **YouTube trending videos** and the **official YouTube Charts** across **68 countries** and export them to JSON, CSV or Excel: **chart rank, the rank last period, how many places an entry climbed, view counts, channel, artists, songwriters, producers and release dates**.

**No API key. No browser. No login.** Pick the charts and the countries, and results stream into a dataset.

### Why this YouTube trending scraper?

**YouTube retired the old Trending page.** `youtube.com/feed/trending` still loads, but its grid is empty - the only text left on it is *"Try searching to get started"*. Any scraper still pointed at that page returns zero rows.

This Actor reads **[YouTube Charts](https://charts.youtube.com)**, YouTube's own live replacement, so it keeps returning data - and the charts carry movement columns the old page never had.

| Data | Old trending page | This Actor |
|---|---|---|
| Currently trending videos | ❌ retired | ✅ |
| **Rank, previous rank, places climbed** | ❌ | ✅ |
| **Periods on chart** | ❌ | ✅ |
| **View growth vs the previous period** | ❌ | ✅ |
| Top music videos, daily and weekly | ❌ | ✅ |
| **Shorts charts - the tracks driving Shorts** | ❌ | ✅ |
| Top songs and top artists | ❌ | ✅ |
| **Songwriters, producers, label** | ❌ | ✅ |
| 68 country markets in one run | partial | ✅ |
| Monitor mode - only new chart entries | ❌ | ✅ |

### The charts you can pull

| Chart | Rows | Period | What it is |
|---|---:|---|---|
| `trendingVideos` | 30 | daily | The trending chart - YouTube's replacement for the Trending page |
| `topVideos` | 100 | daily | Top music videos by views |
| `topVideosWeekly` | 100 | weekly | Top music videos, weekly |
| `topShorts` | 50 | daily | Tracks most used in Shorts **(22 markets - see below)** |
| `topShortsWeekly` | 50 | weekly | Tracks most used in Shorts, weekly **(22 markets)** |
| `topSongs` | 100 | weekly | Top songs |
| `topArtists` | 100 | weekly | Top artists |

Pick any combination of charts × countries in one run - 3 charts × 5 countries is 15 pulls and one dataset.

### What makes a row

| Field | Notes |
|---|---|
| `rank`, `previousRank`, `rankChange` | **rank movement is built in** - `rankChange` is positive when an entry climbed |
| `periodsOnChart` | how many periods it has been charting - spot long-runners at a glance |
| `viewsChangePercent` | view growth against the previous period |
| `viewCount` | the views behind the ranking |
| `title`, `videoId`, `videoUrl` | the entry and a direct link |
| `channelName`, `channelId`, `channelUrl` | the uploader |
| `artists`, `songwriters`, `songProducers`, `label` | full music credits on the music charts |
| `releaseDate`, `thumbnailUrl`, `durationSeconds` | |
| `country`, `countryCode`, `chartLabel`, `chartDate` | so multi-country runs stay unambiguous |

### Use cases

- **A\&R and music discovery** - watch `rankChange` and `viewsChangePercent` on the song and Shorts charts to catch tracks while they are still climbing.
- **Label and catalogue reporting** - songwriter, producer and label credits on every music row make chart performance attributable without a second lookup.
- **Media and trend monitoring** - a daily snapshot of what a market is actually watching, per country, in one table.
- **Creator and competitor analytics** - channel-level presence across markets and how long entries hold their position.
- **Market-entry research** - compare the same chart across 68 countries to see where an artist, genre or format travels.
- **LLM and dashboard pipelines** - clean, typed JSON with real dates, ready to load without scraping HTML.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) - the free plan is enough to try this Actor.
2. Open the **YouTube Trending Scraper**, tick the **charts** and the **countries** you want, and click **Start**.
3. Watch chart entries stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML or RSS - or pull results programmatically through the [Apify API](https://docs.apify.com/api/v2).

### Country coverage - 68 markets

Argentina · Australia · Austria · Belgium · Bolivia · Brazil · Canada · Chile · Colombia · Costa Rica · Czechia · Denmark · Dominican Republic · Ecuador · Egypt · El Salvador · Estonia · Finland · France · Germany · Guatemala · Honduras · Hong Kong · Hungary · Iceland · India · Indonesia · Ireland · Israel · Italy · Japan · Kenya · Luxembourg · Malaysia · Mexico · Netherlands · New Zealand · Nicaragua · Nigeria · Norway · Panama · Paraguay · Peru · Philippines · Poland · Portugal · Romania · Russia · Saudi Arabia · Serbia · Singapore · South Africa · South Korea · Spain · Sweden · Switzerland · Taiwan · Tanzania · Thailand · Turkey · Uganda · Ukraine · United Arab Emirates · United Kingdom · United States · Uruguay · Vietnam · Zimbabwe

The country list is a dropdown, so an unsupported market is rejected before the run starts instead of silently returning nothing.

#### The Shorts charts cover 22 of those markets

Five of the seven charts are published in **all 68** markets. The two **Shorts** charts are published only in:

Argentina · Australia · Brazil · Canada · Colombia · Egypt · France · Germany · India · Indonesia · Japan · Mexico · Nigeria · Philippines · Saudi Arabia · South Korea · Thailand · Turkey · United Arab Emirates · United Kingdom · United States · Vietnam

Ask for a Shorts chart in any other market and the Actor skips it, says so in the run status, and **charges nothing** - it does not spend a request or report it as a failure.

### Filters and modes

- **Only rising entries** - keep just the climbers. *(Trending videos carry no previous rank, so this filter empties that chart - use it on the music charts.)*
- **Minimum rank climb** - e.g. only entries that jumped 10+ places.
- **Monitor mode** - remembers what it already returned and emits only new chart entries on the next run.
- **Max rows per chart** - a cap; it can only lower YouTube's own row counts, never raise them.
- **Output fields** - pick exactly the columns you want.

Filtered and already-seen rows are **never charged**.

### Output

One row per chart entry:

```json
{
    "type": "chartEntry",
    "chart": "topSongs",
    "chartLabel": "Top songs (weekly)",
    "period": "weekly",
    "chartDate": "2026-09-03",
    "country": "United States",
    "countryCode": "us",
    "entryKind": "track",
    "rank": 1,
    "previousRank": 2,
    "rankChange": 1,
    "periodsOnChart": 44,
    "viewsChangePercent": 11,
    "viewCount": 6191532,
    "title": "Choosin' Texas",
    "artists": ["Ella Langley"],
    "songwriters": ["Ella Langley", "Miranda Lambert", "Luke Dick", "Joybeth Taylor"],
    "label": "SAWGOD/Columbia",
    "videoUrl": "https://www.youtube.com/watch?v=nUsrYVxrDwI",
    "releaseDate": "2025-10-16"
}
```

### Good to know

- **YouTube sets the row counts**, not this Actor: 30 trending videos, 50 Shorts tracks, 100 for the other charts. *Max rows per chart* can only lower them.
- **Only the latest chart is published.** YouTube Charts does not serve historical dates on this endpoint, so there is no "trending on 3 March" mode. Run it on a schedule to build your own history - that is what monitor mode is for.
- **Smaller markets publish shorter lists.** Iceland, Luxembourg, Estonia, Norway, Denmark and Ireland regularly return fewer than 30 trending entries. That is YouTube's data, not a truncation.
- **The Shorts charts are limited to 22 markets** (listed above). Every other chart covers all 68.
- **`trendingVideos` has no `previousRank`** - YouTube publishes position only for that chart. The music charts carry full movement.
- **No podcast chart.** YouTube lists one internally but publishes nothing to it, so it is not offered here rather than shipped as an empty option.

### How much does it cost to scrape YouTube?

This Actor uses Apify's **pay-per-event** pricing: you are charged only for the results it delivers, with no monthly rental and no start fee. The events it can charge are:

- **Chart entry scraped** - Charged once per chart row written to your dataset - rank, previous rank, places climbed, title, channel or artist, views, release date and links. Rows removed by your filters, rows already seen in monitor mode, and chart pulls that returned nothing are never charged.

The current price of each event is shown on the **Pricing** tab of this page. Set a maximum total charge on the run if you want a hard cap on spend, and use the input limits to control how much the Actor fetches.

### Automate & schedule

Run this Actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** - start runs, fetch datasets and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** - official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** - run it hourly, daily or weekly and keep your dataset current.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** - trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/youtube-trending-scraper').call({
    "charts": [
        "trendingVideos"
    ],
    "countries": [
        "us",
        "gb"
    ],
    "maxItemsPerChart": 30
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} records`);
```

### Integrate with any app

Connect the dataset to thousands of apps - no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** - multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** - push new records straight into your CRM or spreadsheet.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** - get notified when a scheduled run finds something new.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** - auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** - pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** - trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. You can call this Actor from Claude, ChatGPT or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** - describe the data you need and let the assistant run this Actor for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Related Actors in the same category:

- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** - Channels, Videos & Creator Leads
- **[Instagram Reels Scraper](https://apify.com/scrapesage/instagram-reels-scraper)** - Plays, Views & Analytics
- **[TikTok Scraper](https://apify.com/scrapesage/tiktok-scraper)** - Profiles, Videos, Stats & Creator Leads
- **[Bilibili Scraper](https://apify.com/scrapesage/bilibili-scraper)** - Videos, Trending, Comments & Creator Leads
- **[Douban Scraper](https://apify.com/scrapesage/douban-scraper)** - Movies, TV, Books, Music & Reviews

### Tips

- **Build your own history.** The endpoint only serves the current chart, so put the Actor on a daily [Schedule](https://docs.apify.com/platform/schedules) and append each dataset - `chart` + `countryCode` + `chartDate` + `rank` is the key.
- **Catch climbers early** by combining *Only rising entries* with a *Minimum rank climb* of 10 or more on `topSongs` and `topShorts`.
- **One run, many markets.** Tick several countries rather than scheduling one run per country; every row carries `country` and `countryCode`.
- **Shorts first.** For music discovery the Shorts charts usually move before the song charts do.
- **Trim your columns.** Set the output fields to what you actually use and the CSV lands ready for a spreadsheet.

### FAQ

**How is this Actor billed?** Pay-per-event: you pay only for the results it delivers, with no monthly rental and no start fee. The per-event price is shown on the Pricing tab.

**Can I schedule it and get results automatically?** Yes - create a [Schedule](https://docs.apify.com/platform/schedules) and add a [webhook](https://docs.apify.com/platform/integrations/webhooks) or an integration (Google Sheets, Slack, Make, Zapier) to push each run's dataset wherever you need it.

**Which export formats are available?** Every run's dataset can be downloaded as JSON, CSV, Excel (XLSX), XML, HTML or RSS from the Apify Console or the API.

**Can I run it from code or an AI agent?** Yes - through the [Apify API](https://docs.apify.com/api/v2) and client libraries, or from Claude, ChatGPT and other assistants via the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp).

**Is it legal to scrape YouTube?** This Actor collects publicly available data only. You are responsible for using the output in compliance with applicable laws (including data-protection law where personal data is involved) and the source's terms. See **Data & lawful use** and the **Disclaimer** below.

**Is this an official YouTube tool?** No. It is an independent, third-party Actor with no affiliation to, endorsement by or sponsorship from Google LLC. See the **Disclaimer** below.

### Data & lawful use

This Actor reads only what YouTube Charts publishes to logged-out visitors: it does not log in, create accounts, use cookies, or reach anything behind a sign-in. Channel names, artist names and songwriting or production credits are published by YouTube, but they relate to identifiable people, so treat the output as personal data. If you are in the EU or UK you are the data controller for what you do with it: have a lawful basis (usually legitimate interest for research, market analytics or A\&R), honour access and deletion requests, and do not use the output for spam or unsolicited messaging.

Under [Apify's Standard Actor Contract](https://docs.apify.com/legal/standard-actor-contract), which governs your use of this Actor, you are the controller of any personal data in your input and output and scrapesage acts only as your processor: that data is processed solely to run your job, written only to your own Apify storage, never used for any other purpose and never shared onward. If you need help with a data-subject request that involves this Actor's output, open an issue on the Issues tab.

### Disclaimer

**This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Google LLC or any of its subsidiaries. All trademarks mentioned are the property of their respective owners.**

"YouTube" and any related marks are the property of their respective owners and are used here only in a descriptive, nominative sense - to identify the publicly accessible website from which this Actor collects data. This Actor is not an official YouTube product, is not authorised or certified by Google LLC, and does not distribute YouTube software. It collects only publicly available information; you are responsible for ensuring your use of that data complies with applicable laws, regulations and the terms of the source website.

### Need help?

Open an issue on the Actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome - this Actor is actively maintained.

# Actor input Schema

## `charts` (type: `array`):

Which YouTube charts to pull. Leave empty to run a small sample (US trending videos).

## `countries` (type: `array`):

Which countries to pull each chart for. YouTube publishes charts for these 68 markets only.

## `maxItemsPerChart` (type: `integer`):

Upper bound per chart+country pull. YouTube publishes 30 trending videos, 50 Shorts tracks and 100 for the other charts.

## `onlyRisingEntries` (type: `boolean`):

Keep only entries that climbed the chart since the previous period. Trending videos carry no previous rank, so this filter empties that chart.

## `minRankChange` (type: `integer`):

Keep only entries that climbed at least this many places. 0 disables the filter.

## `outputFields` (type: `array`):

Limit the columns written to the dataset. Leave empty for every field.

## `language` (type: `string`):

Language code for chart labels, e.g. en, es, de.

## `monitorMode` (type: `boolean`):

Remember entries already returned and emit only new ones on the next run. Nothing is charged for skipped rows.

## `monitorStoreName` (type: `string`):

Named key-value store holding the memory for monitor mode.

## `maxConcurrency` (type: `integer`):

How many chart pulls to run at once.

## `proxyConfiguration` (type: `object`):

Apify Proxy. The datacenter pool included with every plan is enough - this Actor reads a public JSON endpoint and needs no residential traffic.

## Actor input object example

```json
{
  "charts": [
    "trendingVideos"
  ],
  "countries": [
    "us"
  ],
  "maxItemsPerChart": 100,
  "onlyRisingEntries": false,
  "minRankChange": 0,
  "language": "en",
  "monitorMode": false,
  "monitorStoreName": "youtube-trending-monitor",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Every chart row scraped by this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "charts": [
        "trendingVideos"
    ],
    "countries": [
        "us"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/youtube-trending-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "charts": ["trendingVideos"],
    "countries": ["us"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/youtube-trending-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "charts": [
    "trendingVideos"
  ],
  "countries": [
    "us"
  ]
}' |
apify call scrapesage/youtube-trending-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapesage/youtube-trending-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZoertUpWqGP7zVDxl/builds/bsrZOQPxNl5QbXGIU/openapi.json
