# Apple Music Charts API

> Returns ranked most-played songs, albums and music videos for an Apple Music storefront.

Category: Music & Audio. Region: global. 3 endpoints at `https://api.hoshime.com/v1/applecharts/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/applecharts
## GET /v1/applecharts/topSongs

Most played songs of an Apple Music storefront, ranked.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | no | Two-letter Apple Music storefront code, such as us, gb or jp. (default us) |
| `limit` | integer | no | Items per page, 1 to 100. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `artistId` (string), `artistName` (string), `artworkUrl` (string), `contentAdvisory` (string), `genres` (Genre[]), `genres[].name` (string), `id` (string), `name` (string), `rank` (integer (int64)), `releaseDate` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/applecharts/topSongs" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/applecharts/topAlbums

Most played albums of an Apple Music storefront, ranked.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | no | Two-letter Apple Music storefront code, such as us, gb or jp. (default us) |
| `limit` | integer | no | Items per page, 1 to 100. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `artistId` (string), `artistName` (string), `artworkUrl` (string), `contentAdvisory` (string), `genres` (Genre[]), `genres[].name` (string), `id` (string), `name` (string), `rank` (integer (int64)), `releaseDate` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/applecharts/topAlbums" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/applecharts/topMusicVideos

Most played music videos of an Apple Music storefront, ranked.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | no | Two-letter Apple Music storefront code, such as us, gb or jp. (default us) |
| `limit` | integer | no | Items per page, 1 to 100. (default 25) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `commentCount` (integer (int64)), `contentAdvisory` (string), `description` (string), `durationSeconds` (integer (int64)), `genres` (Genre[]), `genres[].name` (string), `id` (string), `likeCount` (integer (int64)), `publishedAt` (string), `rank` (integer (int64)), `thumbnails` (Image[]), `thumbnails[].height` (any), `thumbnails[].url` (string), `thumbnails[].width` (any), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/applecharts/topMusicVideos" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
