---
title: "Get YouTube Top-Track Chart (weekly)"
method: GET
path: "/api/charts/youtube/tracks"
tags: ["Charts"]
---

# Get YouTube Top-Track Chart (weekly)

`GET /api/charts/youtube/tracks`

## Request

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

Return the YouTube weekly top-track chart for a given `country_code` and `date`. Each row merges track-basic-info with the chart row and carries both `rankStats` (rank history) and `viewStats` (views history). Data is updated weekly on Thursdays.

## Query parameters

- `country_code` string, required: ISO 3166-1 alpha-2 country code (2 letters, e.g. 'US', 'BR', 'GB').
- `date` string, date-time: Date for the time-slice (YYYY-MM-DD). Required unless `latest=true`.
- `offset` integer: Number of items to skip from the start of the result set; pair with `limit` to paginate.
- `latest` boolean: If true, use the most recently available date and ignore `date`.

## Response `200`

Success

- object
  - `obj` object, required
    - `length` integer, required: Number of chart rows in `data`.
    - `data` object[], required: Chart rows ordered by rank (1 = highest).
      - `id` string, nullable: YouTube video ID.
      - `youtube_track_id` string, nullable: YouTube track ID.
      - `youtube_artist` string, nullable: YouTube artist channel link/ID.
      - `youtube_artist_name` string, nullable: YouTube artist name.
      - `youtube_artist_cm_artist` integer, nullable: Chartmetric artist ID for the YouTube artist.
      - `artist_name` string, nullable: Track artist name.
      - `youtube_artist_ids` string[], nullable: YouTube artist IDs.
      - `youtube_track_ids` string[], nullable: YouTube track IDs.
      - `youtube_artist_names` string[], nullable: YouTube artist names.
      - `position` integer, nullable: Current chart position (1 = top).
      - `rank` integer, nullable: Current chart rank. Same value as `position`.
      - `view_count` integer, nullable: Total view count.
      - `added_at` string, date-time, nullable: Timestamp the track was added to the chart.
      - `upload_date` string, date-time, nullable: YouTube upload date.
      - `license` string, nullable: YouTube license owner (e.g. `WMG`, `UMG`).
      - `velocity` number, float, nullable: Rank-velocity signal (positive = climbing).
      - `pre_rank` integer, nullable: Position on the previous chart period.
      - `peak_rank` integer, nullable: Best (lowest-numbered) rank reached.
      - `peak_date` string, date-time, nullable: Date `peak_rank` was achieved.
      - `time_on_chart` union: Length of time on the chart (integer count of periods or duration string).
        - integer
        - string
      - `type` integer, nullable: Chart sub-type code (legacy).
      - `raw_data` unknown
      - `rankStats` object[], nullable: Historical rank samples.
        - `rank` integer, nullable: Rank at `timestp` (1 = top).
        - `timestp` string, date-time, nullable: Timestamp of the rank sample.
      - `viewStats` object[], nullable: Historical view-count samples.
        - `views` integer, nullable: View count at `timestp`.
        - `timestp` string, date-time, nullable: Timestamp of the view-count sample.
      - `cm_track` integer, nullable: Chartmetric track ID.
      - `name` string, nullable: Track name.
      - `isrc` string, nullable: International Standard Recording Code.
      - `image_url` string, nullable: Track or album cover image URL.
      - `cm_artist` union: Chartmetric artist ID(s) — single value or array depending on platform.
        - integer
        - integer[]
      - `artist_names` string[], nullable: Track artist names.
      - `code2s` string[], nullable: Country codes per artist (ISO 3166-1 alpha-2).
      - `artist_images` string[], nullable: Artist profile image URLs.
      - `artist_covers` string[], nullable: Artist cover image URLs.
      - `album_ids` integer[], nullable: Chartmetric album IDs.
      - `album_names` string[], nullable: Album names.
      - `album_upc` string[], nullable: Album UPC values.
      - `album_label` string[], nullable: Record labels for the album(s).
      - `release_dates` string[], nullable: Album release dates.
      - `artists` object[], nullable: Normalized artist info objects for the track.
        - `id` integer, nullable: Chartmetric artist ID.
        - `name` string, nullable: Artist name.
        - `code2` string, nullable: Artist country code (ISO 3166-1 alpha-2).
        - `image_url` string, nullable: Artist image URL.
        - `career_stage` string, nullable: Artist career stage (e.g. `undiscovered`, `developing`, `mid-level`, `mainstream`, `superstar`, `legendary`).
      - `album` union: Album info object (or array of objects) associated with the track.
        - object[]
        - object
      - `duration_ms` integer, nullable: Track duration in milliseconds.
      - `explicit` boolean, nullable: Whether the track is flagged as explicit.
      - `preview_url` string, nullable: Audio preview URL.
      - `track_genre` union: Track genre(s) — string or array of strings.
        - string
        - unknown[]
          - unknown
      - `spotify_popularity` integer, nullable: Spotify popularity score (0–100).

---

[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)
