Skip to content

Spotify Get Artist Top Tracks

Get an artist's top tracks by country. This endpoint is a proxy to the official Get Artist's Top Tracks endpoint.

Endpoint

GET https://api.recoupable.com/api/spotify/artist/topTracks

Parameters

NameTypeRequiredDescription
idstringYesThe Spotify ID of the artist.
marketstringNoAn ISO 3166-1 alpha-2 country code. If provided, only tracks available in that market are returned. When a valid user token is sent, the user's country takes priority.

Request Examples

cURL
curl -X GET "https://api.recoupable.com/api/spotify/artist/topTracks?id=0TnOYISbd1XYRBk9myaseg&market=ES"

Example Response

{
  "tracks": [
    {
      "album": {
        "album_type": "compilation",
        "total_tracks": 9,
        "available_markets": ["CA", "BR", "IT"],
        "external_urls": {
          "spotify": "string"
        },
        "href": "string",
        "id": "2up3OPMp9Tb4dAKM2erWXQ",
        "images": [
          {
            "url": "https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228",
            "height": 300,
            "width": 300
          }
        ],
        "name": "string",
        "release_date": "1981-12",
        "release_date_precision": "year",
        "restrictions": {
          "reason": "market"
        },
        "type": "album",
        "uri": "spotify:album:2up3OPMp9Tb4dAKM2erWXQ",
        "artists": [
          {
            "external_urls": {
              "spotify": "string"
            },
            "href": "string",
            "id": "string",
            "name": "string",
            "type": "artist",
            "uri": "string"
          }
        ]
      },
      "artists": [
        {
          "external_urls": {
            "spotify": "string"
          },
          "href": "string",
          "id": "string",
          "name": "string",
          "type": "artist",
          "uri": "string"
        }
      ],
      "available_markets": ["string"],
      "disc_number": 0,
      "duration_ms": 0,
      "explicit": false,
      "external_ids": {
        "isrc": "string",
        "ean": "string",
        "upc": "string"
      },
      "external_urls": {
        "spotify": "string"
      },
      "href": "string",
      "id": "string",
      "is_playable": false,
      "linked_from": {},
      "restrictions": {
        "reason": "string"
      },
      "name": "string",
      "popularity": 0,
      "preview_url": "string",
      "track_number": 0,
      "type": "track",
      "uri": "string",
      "is_local": false
    }
  ]
}

Response Properties

PropertyTypeDescription
tracksarrayArray of track objects.
tracks[].albumobjectThe album the track appears on.
tracks[].artistsarrayArtists who performed the track.
tracks[].available_marketsarrayMarkets in which the track is available.
tracks[].disc_numberintDisc number the track is on.
tracks[].duration_msintTrack length in milliseconds.
tracks[].explicitbooleanWhether the track has explicit lyrics.
tracks[].external_idsobjectKnown external IDs for the track.
tracks[].external_urlsobjectKnown external URLs for the track.
tracks[].hrefstringLink to the Web API endpoint with full details.
tracks[].idstringSpotify ID for the track.
tracks[].is_playablebooleanIf true, the track is playable in the given market.
tracks[].linked_fromobjectInformation about the originally requested track when track relinking is applied.
tracks[].restrictionsobjectContent restriction information.
tracks[].namestringTrack name.
tracks[].popularityintPopularity score (0-100).
tracks[].preview_urlstringURL to a 30 second preview, if available.
tracks[].track_numberintTrack number on the album.
tracks[].typestringThe object type, always "track".
tracks[].uristringThe Spotify URI for the track.
tracks[].is_localbooleanWhether the track is from a local file.

For full details, see the official Spotify documentation.