---
title: "List Top Tracks in a City"
method: GET
path: "/api/city/{id}/{domain}/top-tracks"
tags: ["City"]
---

# List Top Tracks in a City

`GET /api/city/{id}/{domain}/top-tracks`

## Request

- Base URL: `https://api.chartmetric.com`
- URL: `https://api.chartmetric.com/api/city/{id}/{domain}/top-tracks`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/docs/api/city/:id/:domain/top-tracks/get.ts> (a function with typed inputs; its response is checked against the schema)

Top tracks in a city for a given platform (`domain` in `youtube | shazam | radio`). Each item merges per-platform stats with basic track metadata (cm_track, artists, album info, genre tags). `position_stats` is only populated when `domain=shazam`. `count` is surfaced as a string when the underlying aggregate returns a `BIGINT`.

## Path parameters

- `id` integer, required: Chartmetric city ID.
- `domain` 'youtube' | 'radio' | 'shazam', required: Platform whose audience signal ranks the tracks (one of `youtube | shazam | radio`).

## Response `200`

Success

- object
  - `obj` object[], required
    - `isrc` string, required: International Standard Recording Code identifying the track.
    - `count` union: Local audience signal in this city for the requested `domain`: YouTube daily views or Shazam/radio occurrences. Returned as a string when the underlying aggregate is `BIGINT`.
      - integer
      - string
    - `position_stats` object[], nullable: Chart position history for this track in the city; only populated when `domain=shazam`.
      - `timestp` string, date-time, nullable: Timestamp of the chart sample.
      - `position` integer, nullable: Track position on the chart at this timestamp (1 is highest).
    - `id` integer, nullable: Chartmetric track ID. Same value as `cm_track`.
    - `name` string, nullable: Track title.
    - `image_url` string, nullable: URL of the track artwork.
    - `description` string, nullable: Free-form description for the track, when available.
    - `created_at` string, date-time, nullable: Timestamp the track was first ingested into Chartmetric (ISO 8601).
    - `modified_at` string, date-time, nullable: Timestamp the track metadata was last updated (ISO 8601).
    - `tags` union: Genre tags for the track; either a comma-separated string or an array of tag strings depending on the upstream payload.
      - string
      - string[]
    - `cm_track` integer, nullable: Chartmetric track ID.
    - `cm_artist` integer[], nullable: Chartmetric artist IDs credited on this track.
    - `artist_names` string[], nullable: Display names of the credited artists, aligned with `cm_artist`.
    - `code2s` string[], nullable: ISO 3166-1 alpha-2 country codes of the credited artists, aligned with `cm_artist`.
    - `artist_images` string[], nullable: Profile image URLs of the credited artists, aligned with `cm_artist`.
    - `artist_covers` string[], nullable: Cover/banner image URLs of the credited artists, aligned with `cm_artist`.
    - `artists` object[], nullable: Credited artists as `{id, name}` objects; equivalent to zipping `cm_artist` with `artist_names`.
      - `id` integer, nullable: Chartmetric artist ID.
      - `name` string, nullable: Artist display name.
    - `spotify_track_ids` string[], nullable: Spotify track IDs linked to this Chartmetric track.
    - `spotify_album_ids` string[], nullable: Spotify album IDs the track appears on.
    - `spotify_duration_ms` integer, nullable: Track duration on Spotify in milliseconds.
    - `itunes_track_ids` string[], nullable: iTunes/Apple Music track IDs linked to this Chartmetric track.
    - `itunes_album_ids` string[], nullable: iTunes/Apple Music album IDs the track appears on.
    - `storefronts` string[], nullable: ISO 3166-1 alpha-2 country codes of Apple Music storefronts where the iTunes IDs are valid.
    - `deezer_track_ids` string[], nullable: Deezer track IDs linked to this Chartmetric track.
    - `deezer_album_ids` integer[], nullable: Deezer album IDs the track appears on.
    - `deezer_duration` integer, nullable: Track duration on Deezer in seconds.
    - `amazon_track_ids` string[], nullable: Amazon Music track IDs linked to this Chartmetric track.
    - `amazon_album_ids` string[], nullable: Amazon Music album IDs the track appears on.
    - `album_ids` integer[], nullable: Chartmetric album IDs the track appears on.
    - `album_names` string[], nullable: Album titles aligned with `album_ids`.
    - `album_upc` string[], nullable: Universal Product Codes of the albums the track appears on.
    - `album_label` string[], nullable: Record labels of the albums the track appears on.
    - `release_dates` string[], nullable: Release dates of the albums the track appears on (ISO 8601), aligned with `album_ids`.

---

[API](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api.md) - [All operations](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chartmetric/apis/chartmetric-developer-api/revisions/94dac96833a3?raw)
