# QQ Music Charts, Albums and Playlists Scraper (`nimbryxo-studio/qq-music-charts-albums-and-playlists-scraper`) Actor

Search QQ Music songs, fetch top-100 chart rankings, or pull album and playlist track lists with singer, duration, cover art and file-size data, no login required.

- **URL**: https://apify.com/nimbryxo-studio/qq-music-charts-albums-and-playlists-scraper.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## QQ Music Charts, Albums and Playlists Scraper

QQ Music (QQ音乐) is one of mainland China's largest streaming catalogs, run by Tencent. This actor turns a search term, song link, chart, album or playlist into structured track metadata — titles, singers, album art, duration and file-size info — without needing to log in.

### What this actor does

- Searches QQ Music by free-text query, including Chinese-language queries
- Fetches full song metadata from one or more song URLs, optionally including a lyric excerpt
- Pulls any of QQ Music's 20 top-100 chart types (hot songs, new songs, rising, rap, EDM, Douyin hits, anime, game soundtracks, and more), with a summary record plus the full track list
- Fetches an album's or playlist's own metadata together with its full track list, by ID or by URL
- Filters returned songs by duration range, title keyword and singer keyword
- Omits any field the source record didn't carry — no empty strings or nulls in the output
- Never fails silently on a bad song/album/playlist reference — it returns an error record instead so you can see what didn't resolve

### Output: per song (`mode = search / bySongUrl / byToplist / byAlbum / byPlaylist` track rows)

- `mid`, `mediaMid`, `songId` — QQ Music's song identifiers
- `name` — song title
- `singers[]`, `singer` — all credited singers, and the first one as a convenience field
- `singerMids[]`
- `album`, `albumId`, `albumMid`, `coverUrl`
- `durationSec`
- `pubTimeSec`, `pubTimeText` — release time, when QQ Music provides it
- `vid` — linked music-video ID, when one exists
- `size128`, `size320`, `sizeFlac` — file size in bytes for each available audio quality
- `payPlay`, `payDownload`, `payStatus` — whether the track requires a paid plan to stream or download
- `lyric` — first part of the LRC lyric text, only when `includeLyric` is on (mode=bySongUrl)
- `sourceUrl`, `scrapedAt`, `recordType: "song"`

### Output: per chart (`mode = byToplist`, summary record)

- `toplistId`, `name`
- `listenCount`
- `coverUrl`
- `updateFrequency`, `updateTime`
- `sourceUrl`, `scrapedAt`, `recordType: "toplist"`

### Output: per album (`mode = byAlbum`, summary record)

- `albumId`, `albumMid`, `name`, `singer`
- `timePublic` — release date
- `genre`, `language`, `description`, `company`
- `trackCount`
- `sourceUrl`, `scrapedAt`, `recordType: "album"`

### Output: per playlist (`mode = byPlaylist`, summary record)

- `playlistId`, `name`, `coverUrl`
- `creatorName`, `creatorUin`, `creatorAvatarUrl`
- `listenerCount`, `visitCount`, `songCount`
- `description`, `tags[]`
- `createTimeMs`, `updateTimeMs`
- `sourceUrl`, `scrapedAt`, `recordType: "playlist"`

### Output: per unresolved reference (`recordType: "error"`)

- `errorCode` — e.g. `BAD_URL`, `NOT_FOUND`, `INVALID_INPUT`
- `errorMessage` — human-readable reason
- `inputValue` — the song URL, album ID, playlist ID or toplist ID that didn't resolve
- `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `search` | `search`, `bySongUrl`, `byToplist`, `byAlbum` or `byPlaylist` |
| `searchQuery` | string | `周杰伦` | Free-text search query (mode=search) |
| `songUrls` | array | `[]` | QQ Music song URLs to fetch (mode=bySongUrl) |
| `toplistId` | string | – | Chart to fetch — one of 20 QQ Music top-100 charts (mode=byToplist) |
| `includeToplistInfo` | boolean | `true` | Emit the chart's summary record before its tracks (mode=byToplist) |
| `albumId` | integer | – | Numeric album ID (mode=byAlbum) |
| `albumUrls` | array | `[]` | Album URLs, as an alternative to `albumId` (mode=byAlbum) |
| `playlistId` | string | – | Playlist disstid (mode=byPlaylist) |
| `playlistUrls` | array | `[]` | Playlist URLs, as an alternative to `playlistId` (mode=byPlaylist) |
| `includeLyric` | boolean | `false` | Attach a lyric excerpt to each song record (mode=bySongUrl) |
| `minDurationSec` | integer | – | Drop songs shorter than this |
| `maxDurationSec` | integer | – | Drop songs longer than this |
| `containsKeyword` | string | – | Keep only songs whose title contains this substring |
| `singerKeyword` | string | – | Keep only songs whose first singer contains this substring |
| `maxItems` | integer | `30` | Hard cap on emitted records, including error records (1–1000) |

#### Example: search by artist name

```json
{
  "mode": "search",
  "searchQuery": "周杰伦",
  "maxItems": 20
}
```

#### Example: a specific chart with its tracks

```json
{
  "mode": "byToplist",
  "toplistId": "26",
  "includeToplistInfo": true,
  "maxItems": 100
}
```

#### Example: album tracks by ID

```json
{
  "mode": "byAlbum",
  "albumId": 20612,
  "maxItems": 50
}
```

#### Example: song lookup with lyrics

```json
{
  "mode": "bySongUrl",
  "songUrls": ["https://y.qq.com/n/ryqq/songDetail/001Bbywq2gicae"],
  "includeLyric": true
}
```

### Use cases

- **Music data research** — collect structured chart history for Mandarin-pop and C-pop analysis
- **Playlist curation tools** — pull track lists from public playlists into your own catalog
- **A\&R and trend tracking** — monitor which songs are rising on QQ Music's charts
- **Catalog enrichment** — attach QQ Music album art, duration and singer credits to an existing song database
- **Lyric research** — fetch LRC excerpts alongside track metadata for a known set of songs

### FAQ

**Is this affiliated with QQ Music or Tencent?**
No. This is an independent actor that reads QQ Music's publicly available song, chart, album and playlist pages; it is not operated by or affiliated with Tencent or QQ Music.

**Why do some playlists return zero tracks?**
Some user-created playlists on QQ Music only serve their track list to logged-in accounts. When that happens, this actor still returns the playlist's own summary record with a `songCount` of whatever is visible publicly, rather than failing the run.

**What's in `size128`, `size320` and `sizeFlac`?**
These are the file sizes, in bytes, for each audio quality QQ Music offers for that track. A quality tier that the track doesn't have available is simply omitted.

**Why would I get an `error` record instead of song/album/playlist data?**
If a song URL, album ID or playlist ID you supplied doesn't resolve to a real QQ Music record, the actor returns an error record carrying the offending input rather than silently skipping it.

**Can I fetch artist pages directly?**
No — this actor covers search, song, chart, album and playlist lookups; it does not expose a dedicated artist/singer mode.

**Do I need a QQ account or API key?**
No login or key is required for any mode.

**How fresh are the chart rankings?**
Each run reads QQ Music's live chart and catalog pages, so rankings and track lists reflect whatever QQ Music is currently showing.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

## `searchQuery` (type: `string`):

Free-text query (mode=search).

## `songUrls` (type: `array`):

QQ Music song URLs, e.g. `https://y.qq.com/n/ryqq/songDetail/001Bbywq2gicae`.

## `toplistId` (type: `string`):

QQ Music chart to fetch (top 100 tracks).

## `includeToplistInfo` (type: `boolean`):

Emit the toplist summary record before its tracks (mode=byToplist).

## `albumId` (type: `integer`):

QQ Music album id, e.g. 20612.

## `albumUrls` (type: `array`):

QQ Music album URLs as an alternative to albumId.

## `playlistId` (type: `string`):

QQ Music playlist disstid (long number), e.g. 5315973668.

## `playlistUrls` (type: `array`):

QQ Music playlist URLs as an alternative to playlistId.

## `includeLyric` (type: `boolean`):

Attach first 2000 chars of the LRC lyric to song records.

## `minDurationSec` (type: `integer`):

Drop songs shorter than this.

## `maxDurationSec` (type: `integer`):

Drop songs longer than this.

## `containsKeyword` (type: `string`):

Only keep songs whose title contains this substring (case-insensitive).

## `singerKeyword` (type: `string`):

Only keep songs whose primary singer contains this substring.

## `maxItems` (type: `integer`):

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "searchQuery": "周杰伦",
  "songUrls": [],
  "includeToplistInfo": true,
  "albumUrls": [],
  "playlistUrls": [],
  "includeLyric": false,
  "maxItems": 30
}
```

# Actor output Schema

## `items` (type: `string`):

Dataset containing all scraped QQ Music records (recordType: song | toplist | album | playlist | error).

# 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 = {
    "mode": "search",
    "searchQuery": "周杰伦",
    "songUrls": [],
    "includeToplistInfo": true,
    "albumUrls": [],
    "playlistUrls": [],
    "includeLyric": false,
    "maxItems": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/qq-music-charts-albums-and-playlists-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 = {
    "mode": "search",
    "searchQuery": "周杰伦",
    "songUrls": [],
    "includeToplistInfo": True,
    "albumUrls": [],
    "playlistUrls": [],
    "includeLyric": False,
    "maxItems": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/qq-music-charts-albums-and-playlists-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 '{
  "mode": "search",
  "searchQuery": "周杰伦",
  "songUrls": [],
  "includeToplistInfo": true,
  "albumUrls": [],
  "playlistUrls": [],
  "includeLyric": false,
  "maxItems": 30
}' |
apify call nimbryxo-studio/qq-music-charts-albums-and-playlists-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/qq-music-charts-albums-and-playlists-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/kTth1HFbgbG2gD8n5/builds/2zkyO7JuUlBrrKJDW/openapi.json
