# YouTube Charts: top songs, artists, videos, trending, shorts (`steadydata/youtube-charts`) Actor

The official YouTube Charts for any country, up to 100 countries per run: top songs, top artists, top music videos (weekly or daily), trending videos, top Shorts songs and (US) top podcast shows with rank, previous rank, periods on chart, views, artists, video id and channel. Pay per chart entry.

- **URL**: https://apify.com/steadydata/youtube-charts.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, Marketing, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 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.
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?

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 Charts: top songs, artists, videos, trending, shorts

The official YouTube Charts for any country, up to 100 countries per run: top songs, top artists, top music videos (weekly or daily), trending videos, top Shorts songs and (US) top podcast shows with rank, previous rank, periods on chart, views, artists, video id and channel. Pay per chart entry.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- One request per country and chart: the same call charts.youtube.com makes for its own page returns the whole list at once. Measured on the platform: three countries, sixty entries, for a hundredth of a cent, no browser and no proxy tricks.
- The official charts, not a guess: rank, previous rank, periods on chart and the week-over-week change in views come from YouTube's own chart data, plus the artists, video id, channel, release date and label. Six lists in one actor: top songs, top artists, top music videos (weekly or daily), trending videos, top Shorts songs, for any country or worldwide, and the US top podcast shows by watch time (show, channel, episodes, genre, playlist link).

### Who this is for

List country codes in `countries` (up to 100 per run, or `global`), pick the `chartType` and the `period`, and set `maxEntriesPerCountry` (default 100). Every row carries the country, chart, period and its end date, rank, previous rank, periods on chart, title, artists, video id, channel name and id, link, views, change in views, release date, duration, label, episodes and genre (podcasts) and artwork.

### Who this is not for

Top songs and top artists exist weekly only; asking for daily on those quietly delivers the weekly list (the `period` column says which). Trending videos is a list of 30 without view counts or a period end date, Top Shorts songs carries no view counts either, and the podcast chart exists for the US only (other countries come back as a free error row). Channel name, channel id and duration are filled for video lists; label only where YouTube shows one. A country YouTube has no chart for comes back as one free `INVALID_COUNTRY` error row.

### Input example

```json
{
    "countries": [
        "us",
        "nl"
    ],
    "chartType": "songs",
    "period": "weekly",
    "maxEntriesPerCountry": 100
}
```

### Output example

- `country`
- `chartType`
- `period`
- `periodEnd`
- `rank`
- `previousRank`
- `periodsOnChart`
- `title`
- `artists`
- `videoId`
- `channelName`
- `channelId`
- `url`
- `viewCount`
- `viewsChangePercent`
- `releaseDate`
- `durationSeconds`
- `label`
- `episodes`
- `genre`
- `thumbnailUrl`

Error codes: `INVALID_COUNTRY`, `NO_CHART`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "country": "us",
  "chartType": "songs",
  "period": "weekly",
  "periodEnd": "2026-09-10",
  "rank": 1,
  "previousRank": 20,
  "periodsOnChart": 2,
  "title": "SaWaDiKa",
  "artists": [
    "LISA"
  ],
  "videoId": "FyS5dAywkEo",
  "channelName": null,
  "channelId": null,
  "url": "https://www.youtube.com/watch?v=FyS5dAywkEo",
  "viewCount": 11068911,
  "viewsChangePercent": 4.09,
  "releaseDate": "2026-08-27",
  "durationSeconds": null,
  "label": "Lloud Co./RCA Records",
  "episodes": null,
  "genre": null,
  "thumbnailUrl": "https://yt3.googleusercontent.com/lph_AYE9fU1VteHx7zG6DGesN-NvVDTs79j1q4DCHZS980-UryiOlKlLgtDkIBr2niDVO0WZdTg2fnA=w180-h180-l90-rj",
  "status": "ok"
}
```

### Related actors from steadydata

- [youtube-video-details](https://apify.com/steadydata/youtube-video-details): the full details of the charting videos
- [youtube-channel-videos](https://apify.com/steadydata/youtube-channel-videos): every video of a charting artist's channel
- [google-trends-compare](https://apify.com/steadydata/google-trends-compare): which charting artist is searched for more

### Pricing

Pay per event: one `chart-entry` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Is this the same as the old YouTube Trending page?** YouTube retired the Trending page in 2025; the charts service is what replaced it, and the `trending` list here is its trending videos list.

**How fresh is it?** Weekly lists end on the Thursday YouTube publishes; daily lists carry yesterday's date. `periodEnd` tells you exactly.

**Can I get the whole top 100?** Yes, that is the default per country; trending has 30 and Shorts 50 entries.

**Which countries work?** Every country YouTube Charts publishes, plus `global`. A code without a chart is a free error row, so try freely.

**Do I get the video pages too?** Feed the `videoId` column to the YouTube Video Details actor below for descriptions, tags and statistics.

**Is personal data collected?**
`viewsChangePercent` is YouTube's week-over-week (or day-over-day) change; `previousRank` is empty for new entries; `periodEnd` is the last day of the charted period.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/youtube-charts/changelog.md

# Actor input Schema

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

Two-letter country codes, one per row, up to 100: us, gb, nl, de, br, in, jp. Use 'global' for the worldwide chart.

## `chartType` (type: `string`):

Top songs and top artists are weekly; music videos and Shorts songs come weekly or daily; trending videos is a list of 30 without view counts; podcast shows (by watch time) exist for the US only.

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

Weekly or daily; charts that only exist weekly (songs, artists) ignore daily.

## `maxEntriesPerCountry` (type: `integer`):

Cost ceiling per country, in chart order; the chart has 100 entries.

## Actor input object example

```json
{
  "countries": [
    "us",
    "nl"
  ],
  "chartType": "songs",
  "period": "weekly",
  "maxEntriesPerCountry": 100
}
```

# Actor output Schema

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

No description

# 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 = {
    "countries": [
        "us",
        "nl"
    ]
};

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

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

```

## MCP server setup

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

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/9JRIMwvob8acf9Tta/builds/CtGHi5qSUSgKJUCaf/openapi.json
