List Chart Countries for Platform

Return the country codes with available chart data for the given platform. Query params (chart_type, type, duration) are needed for platforms whose chart countries vary by chart type / duration (e.g. Airplay, Amazon, Apple Music, iTunes, Spotify, TikTok, YouTube). Platforms with a single chart type (Deezer, Shazam, SoundCloud) do not need these params. The handler wraps the response in { obj: { countries } } where countries depends on the platform — usually an array of ISO 3166-1 alpha-2 codes.

Path Parameters
  • platform
    Type: string enum
    required

    Chart platform (e.g. airplay, amazon, applemusic, deezer, itunes, shazam, soundcloud, spotify, tiktok, youtube).

    values
    • airplay
    • amazon
    • applemusic
    • deezer
    • itunes
Query Parameters
  • chart_type

    Chart type within the platform. Required for platforms whose country list varies by chart type; rejected for platforms with a single chart type (e.g. Deezer, Shazam, SoundCloud).

    • Type: string enum

      Chart type within the platform. Required for platforms whose country list varies by chart type; rejected for platforms with a single chart type (e.g. Deezer, Shazam, SoundCloud).

      values
      • tracks
      • artists
  • duration

    Chart duration. Required for platform=airplay, and for platform=youtube with chart_type=shorts. Forbidden otherwise.

    • Type: string enum

      Chart duration. Required for platform=airplay, and for platform=youtube with chart_type=shorts. Forbidden otherwise.

      values
      • daily
      • weekly
  • type

    Chart sub-type. Required for platform=amazon (new_album, new_track, popular_album, popular_track) and for platform=applemusic with chart_type=tracks (top, daily, city).

    • Type: string enum

      Chart sub-type. Required for platform=amazon (new_album, new_track, popular_album, popular_track) and for platform=applemusic with chart_type=tracks (top, daily, city).

      values
      • popular_track
      • new_track
      • popular_album
      • new_album
Responses
  • application/json
Request Example for get/api/charts/{platform}/countries
curl https://api.chartmetric.com/api/charts/airplay/countries \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "obj": {
    "countries": [
      "US",
      "GB",
      "BR",
      "JP",
      "KR"
    ]
  }
}