# YouTube Music Charts Scraper - Top Songs, Artists & Videos (`seemuapps/youtube-music-charts-scraper`) Actor

Scrape YouTube Music charts: top songs, top artists, top music videos, trending videos and Shorts songs for 68 countries, with ranks, views and chart history.

- **URL**: https://apify.com/seemuapps/youtube-music-charts-scraper.md
- **Developed by:** [Seemu Scraping](https://apify.com/seemuapps) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 chart entries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Music Charts Scraper - Top Songs, Artists & Videos

Export the official YouTube Music charts to JSON, CSV or Excel: weekly **Top Songs**, **Top Artists** and **Top Music Videos**, daily video charts, **Trending Music Videos**, and the **Top Songs on Shorts** chart. Works for the global chart and 68 countries, and can pull historical chart weeks going back to 2016–2019. No login or YouTube account needed.

### What you get

One row per chart entry, with:

- **Chart position**: `rank`, `previousRank`, `rankChange` (positive = moved up), `isNewEntry`, `periodsOnChart` (weeks on chart for weekly charts, days for daily charts)
- **Performance**: `views` for the chart period and `percentViewsChange` against the previous period
- **Song / video details**: `title`, `artists` (name + knowledge-graph ID), `artistNames`, `videoId`, `url`, `musicUrl` (YouTube Music link), `durationSeconds`, `releaseDate`, `label`, `songwriters`, `producers`, `thumbnailUrl`
- **Channel details**: `channelId`, `channelName`, `channelUrl` (uploader for video charts, the artist's channel for the artist chart)
- **Chart context**: `chartType`, `chartName`, `country`, `countryName`, `period`, `chartDate` (the date the chart period ends), `chartUrl`

Export to JSON, CSV, Excel or Google Sheets straight from the Apify console, or pull the data by API.

### Use cases

- **Music market research** – compare what is charting in the US, UK, Brazil, India, Japan and more in one run
- **A\&R and talent scouting** – spot breakout songs and new entries before they peak
- **Label and artist reporting** – track weekly rank, views and weeks on chart for your catalogue
- **Chart history datasets** – build week-by-week chart archives for analysis or dashboards
- **Shorts trend tracking** – find the songs creators are using most on YouTube Shorts

### Supported charts

| Chart | Input value | Periods | History |
|---|---|---|---|
| Top Songs | `topSongs` | weekly | from 2016–2019 (varies by country) |
| Top Artists | `topArtists` | weekly | from 2016–2019 (varies by country) |
| Top Music Videos | `topVideos` | weekly, daily | weekly from 2016–2019, daily from Nov 2023 |
| Top Songs on Shorts | `topShortsSongs` | weekly, daily | from Nov 2023 |
| Trending Music Videos | `trendingVideos` | live ("right now") | current chart only, not published for Global |

Charts have up to 100 entries (Top Songs on Shorts about 50, Trending about 30).

### How to use

1. Pick one or more **Charts**.
2. Enter **Countries** as two-letter codes (`us`, `gb`, `de`, `br`, `jp`, `in`, `mx` …) or `global` for the worldwide chart.
3. Choose **Weekly** or **Daily**. Charts that are only published weekly fall back to weekly automatically.
4. Optionally set a **Historical date** (YYYY-MM-DD). For weekly charts you get the chart week that contains that date; leave it empty for the latest chart.
5. Set **Max entries per chart** (default 100, 0 = all).
6. Run the Actor. Results appear in the **Dataset** tab. A `SUMMARY` record in the **Key-value store** tab lists the resolved chart date and row count for every chart and country, plus anything that was skipped.

### Input example

```json
{
  "charts": ["topSongs", "topArtists"],
  "countries": ["us", "gb", "global"],
  "period": "weekly",
  "date": "2024-01-01",
  "maxItemsPerChart": 100
}
```

### Output example

```json
{
  "chartType": "topSongs",
  "chartName": "Top Songs",
  "country": "us",
  "countryName": "United States",
  "period": "weekly",
  "chartDate": "2026-09-17",
  "rank": 1,
  "previousRank": 2,
  "rankChange": 1,
  "isNewEntry": false,
  "periodsOnChart": 46,
  "title": "Choosin' Texas",
  "artists": [{ "name": "Ella Langley", "id": "/g/11rfbjfzcc" }],
  "artistNames": "Ella Langley",
  "views": 6157231,
  "percentViewsChange": -2.98,
  "videoId": "nUsrYVxrDwI",
  "url": "https://www.youtube.com/watch?v=nUsrYVxrDwI",
  "musicUrl": "https://music.youtube.com/watch?v=xukbqwRuN5w",
  "label": "SAWGOD/Columbia",
  "releaseDate": "2025-10-16",
  "songwriters": ["Ella Langley", "Miranda Lambert", "Luke Dick", "Joybeth Taylor"],
  "producers": ["Ella Langley", "Miranda Lambert", "Ben West"],
  "thumbnailUrl": "https://yt3.googleusercontent.com/...",
  "entityId": "G:jhyzqACqEWY",
  "chartUrl": "https://charts.youtube.com/charts/TopSongs/us/weekly/20260917"
}
```

### Notes

- Weekly charts end on a Thursday; daily charts are usually published with a 1–2 day delay.
- Top Songs on Shorts ranks by usage, so it has no view counts.
- Trending Music Videos has no views, previous rank or history – it is the live chart at the time of the run.
- About 40 smaller markets (e.g. Greece, Croatia, Pakistan, Morocco) have no local charts right now. They are skipped with a warning instead of silently returning the global chart.
- Invalid country codes are skipped with a warning; the run fails with a clear message only if no valid country is left.

### FAQ

**How far back does chart history go?**
Weekly Top Songs, Top Artists and Top Music Videos go back to February 2016 for the global chart and to 2017–2019 for most countries. Daily charts and Shorts charts start in November 2023.

**Can I get a full year of weekly charts?**
Yes – run the Actor once per week you need (for example with a scheduled task or by calling it via API with different dates).

**How fast is it?**
Each chart for each country is a single request. A run covering 4 charts in 5 countries finishes in about 6 seconds.

# Actor input Schema

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

Which charts to scrape. Top Songs and Top Artists are weekly; Top Music Videos and Top Songs on Shorts are weekly or daily; Trending Music Videos is a live chart with no history.

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

Two-letter country codes (e.g. us, gb, de, br, jp, in, mx) or "global" for the worldwide chart. Trending Music Videos is not published for global.

## `period` (type: `string`):

Weekly or daily chart. Daily is only published for Top Music Videos and Top Songs on Shorts; other charts fall back to weekly.

## `date` (type: `string`):

YYYY-MM-DD. Leave empty for the latest chart. For weekly charts, returns the chart week that contains this date. Weekly Top Songs/Artists/Videos history goes back to 2016-2019 depending on country; daily and Shorts charts start in November 2023.

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

Maximum rows per chart and country. Charts have up to 100 entries (Shorts songs 50, trending videos 30). Set 0 for all.

## Actor input object example

```json
{
  "charts": [
    "topSongs",
    "topArtists"
  ],
  "countries": [
    "us",
    "global"
  ],
  "period": "weekly",
  "maxItemsPerChart": 100
}
```

# Actor output Schema

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

One record per chart entry: chartType, country, period, chartDate, rank, previousRank, rankChange, isNewEntry, periodsOnChart, title, artists, views, percentViewsChange, videoId, url, channelId, releaseDate, label, songwriters, thumbnailUrl and more.

## `summary` (type: `string`):

SUMMARY record in the default key-value store: rows per chart and country, resolved chart dates and any skipped charts.

# 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": [
        "topSongs",
        "topArtists"
    ],
    "countries": [
        "us",
        "global"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/youtube-music-charts-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": [
        "topSongs",
        "topArtists",
    ],
    "countries": [
        "us",
        "global",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("seemuapps/youtube-music-charts-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": [
    "topSongs",
    "topArtists"
  ],
  "countries": [
    "us",
    "global"
  ]
}' |
apify call seemuapps/youtube-music-charts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seemuapps/youtube-music-charts-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/4rjVO34lvoPMZATG4/builds/5SlAkfxKLjEeOgHy7/openapi.json
