Get YouTube Trend Chart (weekly)

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
    Type: string
    min length:  
    2
    max length:  
    2
    required

    ISO 3166-1 alpha-2 country code (2 letters, e.g. 'US', 'BR', 'GB').

  • date
    Type: string Format: date-time

    Date for the time-slice (YYYY-MM-DD). Required unless latest=true.

  • offset
    Type: integer
    min:  
    0

    Number of items to skip from the start of the result set; pair with limit to paginate.

  • latest
    Type: boolean

    If true, use the most recently available date and ignore date.

Responses
  • application/json
Request Example for get/api/charts/youtube/trends
curl 'https://api.chartmetric.com/api/charts/youtube/trends?country_code=' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "obj": {
    "length": 1,
    "data": [
      {
        "id": 27599255,
        "youtube": 27599255,
        "youtube_video_id": "uLHqpjW3aDs",
        "name": "Roddy Ricch - The Box [Official Audio]",
        "artist_name": "Roddy Ricch",
        "youtube_artist": "/g/11fhvxdh1f",
        "youtube_artist_names": [
          "Roddy Ricch"
        ],
        "cm_artist": 839964,
        "artist_names": [
          "Roddy Ricch"
        ],
        "isrc": "USAT21906978",
        "cm_track": 27599255,
        "position": 1,
        "velocity": 0,
        "pre_rank": 1,
        "peak_rank": 1,
        "peak_date": "2020-01-09T00:00:00.000Z",
        "added_at": "2020-02-06T00:00:00.000Z",
        "upload_date": "2019-12-06T05:05:28.000Z",
        "time_on_chart": "8",
        "image_url": null,
        "code2s": [
          "US"
        ],
        "rankStats": [
          {
            "rank": 1,
            "views": 18400000,
            "timestp": "2020-01-30T00:00:00.000Z"
          }
        ]
      }
    ]
  }
}