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

# Get YouTube Trend Chart (weekly)

`GET /api/charts/youtube/trends`

## Request

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

Return the YouTube trend (trending) chart for a given `country_code` and `date`. Rows are projected by `ChartView.getYoutubeTrendChart`, which forwards track-basic-info + chart-info + per-track `rankStats`. 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` union: Chart row ID (legacy).
        - integer
        - string
      - `youtube` union: Internal YouTube row ID.
        - string
        - number, float
      - `youtube_video_id` string, nullable: YouTube video ID.
      - `name` string, nullable: Track name.
      - `artist_name` string, nullable: Track artist name.
      - `youtube_artist` string, nullable: YouTube artist channel link/ID.
      - `youtube_artist_names` string[], nullable: YouTube artist names.
      - `cm_artist` union: Chartmetric artist ID(s).
        - integer
        - integer[]
      - `artist_names` string[], nullable: Track artist names.
      - `artists` object[], nullable: Normalized artist info objects.
        - `id` integer, nullable: Chartmetric artist ID.
        - `name` string, nullable: Artist name.
        - `code2` string, nullable: Artist country code (ISO 3166-1 alpha-2).
      - `isrc` string, nullable: International Standard Recording Code.
      - `cm_track` integer, nullable: Chartmetric track ID.
      - `duration_ms` integer, nullable: Track duration in milliseconds.
      - `explicit` boolean, nullable: Whether the track is flagged as explicit.
      - `composer_name` string, nullable: Composer name(s).
      - `upload_date` string, date-time, nullable: YouTube upload date.
      - `added_at` string, date-time, nullable: Timestamp the row was added to the chart.
      - `peak_date` string, date-time, nullable: Date `peak_rank` was achieved.
      - `image_url` string, nullable: Track image URL.
      - `preview_url` string, nullable: Audio preview URL.
      - `position` integer, nullable: Current chart position (1 = top).
      - `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.
      - `time_on_chart` union: Length of time on the chart (integer count of periods or duration string).
        - integer
        - string
      - `raw_data` unknown
      - `album_names` string[], nullable: Album names.
      - `album` unknown
      - `album_ids` integer[], nullable: Chartmetric album IDs.
      - `album_upc` string[], nullable: Album UPC values.
      - `album_label` string[], nullable: Record labels for the album(s).
      - `genre` string, nullable: Chart genre.
      - `genre_smart_ordered` object[], nullable: Smart-ordered genre tags from Chartmetric's genre classification.
      - `tags` union: YouTube video tags.
        - string
        - unknown[]
          - unknown
      - `track_genre` union: Track genre(s).
        - string
        - unknown[]
          - unknown
      - `spotify_popularity` integer, nullable: Spotify popularity score (0–100).
      - `latest` object, nullable: Latest snapshot of per-row metrics.
      - `score` number, float, nullable: Trend score for the chart row.
      - `license` string, nullable: YouTube license owner (e.g. `WMG`).
      - `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.
      - `youtube_artist_ids` string[], nullable: YouTube artist IDs.
      - `youtube_track_ids` string[], nullable: YouTube track IDs.
      - `release_dates` union[], nullable: Album release dates.
        - union
          - string
          - string, date-time
      - `doc_id` string, nullable: Internal document ID for the chart row.
      - `batch_ids` unknown
      - `rankStats` object[], nullable: Historical rank + view samples.
        - `rank` integer, nullable: Rank at `timestp` (1 = top).
        - `views` integer, nullable: View count at `timestp`.
        - `timestp` string, date-time, nullable: Timestamp of the rank sample.

---

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