# Kuaishou Music Ranking API

> Returns ranked music tracks on Kuaishou, including track IDs, titles, hot counts, and audio URLs. Supports filtering by chart type and cursor pagination.

Source: https://www.sandbase.ai/model/kuaishou/app/music-ranking
API reference: https://www.sandbase.ai/model/kuaishou/app/music-ranking/docs

## Facts

- Provider: Kuaishou
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/kuaishou/app/music-ranking`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, kuaishou
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/kuaishou/app/music-ranking` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `count` | integer | no |  |
| `pcursor` | string | no |  |
| `tab_id` | integer | no |  |

## FAQ

### How do I use the Kuaishou Music Ranking API?

Send a POST request to https://api.sandbase.ai/v1/api/kuaishou/app/music-ranking with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Kuaishou Music Ranking API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Kuaishou Music Ranking API accept?

No parameters are required. Optional: count (integer), pcursor (string) and tab_id (integer). The Parameters table and the Playground on this page list every field.

### What does the Kuaishou Music Ranking API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Kuaishou developer account or API key?

No. Kuaishou Music Ranking runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Kuaishou API access separately.

## README

### Kuaishou Music Ranking API

Retrieve music chart leaderboards on Kuaishou by specifying `tab_id` for different rankings, with pagination managed via `pcursor` and `count`.

#### Use cases

- Track trending songs and popular background audio across Kuaishou.
- Identify viral music tracks for social media content planning.
- Retrieve audio URLs and track metadata for platform music rankings.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/kuaishou/app/music-ranking" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `count` | integer | No | Page size, default 20, range 1-50 |
| `tab_id` | integer | No | 100002=hot songs (default), 100063=Pi-plan ranking |
| `pcursor` | string | No | Cursor, empty for first page |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "musics": [
    {
      "audioType": 1,
      "copyrightTimeLimit": 60,
      "duration": 320,
      "finalStatus": 0,
      "hotCount": "1902.1万",
      "id": "5xak4hqnwe7ecw9",
      "name": "我不难过",
      "snippetDuration": 60,
      "type": 4,
      "url": "https://v1-plat-fdl.wsukwai.com/ksc2/pUMOAetCwmckeNtMnU5XWhK1n-Cof_zoeJdTw0B4qvO…"
    }
  ]
}
```

#### Notes

- Set `tab_id` to 100002 for hot songs or 100063 for Pi-plan rankings.
- Use `count` to specify the page size between 1 and 50 tracks.
- Pass an empty string to `pcursor` for the initial page, then use subsequent cursor values for pagination.

#### Related APIs

- [Kuaishou Brand Top List](/model/kuaishou/app/brand-top-list): Returns top brand rankings and related live stream links from Kuaishou.
- [Kuaishou App Share Link](/model/kuaishou/app/generate-share-link): Generates a shareable URL for Kuaishou application content using a specified object identifier.
- [Kuaishou Hot Board Categories](/model/kuaishou/app/hot-board-categories): Returns the active list of hot board categories available in the Kuaishou app.
