Spotify API endpoint
Returns Spotify country hub shelves. The country_code parameter accepts Spotify popular-in country codes from open.spotify.com/popular-in/us.
/spotify/popular-by-countryReturns shelves from Spotify's popular-by-country pages, equivalent to the public https://open.spotify.com/popular-in/{country} pages. Caller-supplied Spotify bearer or client tokens are not required.
country_code (optional): Two-letter Spotify popular-in country code. Defaults to us. The response includes supportedCountries, a full code/name enum derived from Spotify's popular-in alternate links.sections contains country-hub shelves such as CHARTS, POPULAR_ALBUMS, POPULAR_ARTISTS, and TRENDING_SONGS.rank_type and last_updated when present.meta.partialErrors records how many shelves were dropped. The request only fails (503) when no shelf resolves.| Field | Filled in, of 184 checked | Values in the sample |
|---|---|---|
| code | 184 | |
| name | 184 | “Andorra” and 183 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| country_code | string | No | Two-letter Spotify popular-in country code | us | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/spotify/popular-by-country" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"countryCode": "US",
"countryName": "United States",
"hexColor": "#EB1E32",
"sections": [
{
"contentId": "CHARTS",
"title": "Charts",
"totalCount": 1,
"items": [
{
"uri": "spotify:playlist:37i9dQZEVXbLRQDuF5jeBp",
"type": "Playlist",
"title": "Top 50 - USA",
"subtitle": "Spotify",
"description": "Your daily update of the most played tracks right now - USA.",
"externalUrl": "https://open.spotify.com/playlist/37i9dQZEVXbLRQDuF5jeBp"
}
]
}
],
"supportedCountries": [
{
"code": "us",
"name": "United States"
}
],
"meta": {
"operationName": "countryHubsPage",
"sectionCount": 1,
"itemCount": 1,
"fetchedAt": "2026-05-13T19:45:00Z"
}
}Request schema
No body schema
Response schema
#/definitions/spotify.countryHubResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | spotify.CountryHubResponse | No | ||||
| data.countryCode | string | No | US | Country code the hub was loaded for. | ||
| data.countryName | string | No | United States | Name of the country. | ||
| data.hexColor | string | No | #1DB954 | Accent color of the country page, as a hex color code. | ||
| data.meta | object | No | Details about this response. | |||
| data.meta.appVersion | string | No | 1.2.90.403.gf901f20f | Version of the Spotify web player the data was read from. | ||
| data.meta.fetchedAt | string | No | 2026-05-13T20:41:13Z | Time the data was fetched, in UTC (RFC 3339). | ||
| data.meta.itemCount | integer | No | 20 | Number of items returned across all sections. | ||
| data.meta.operationName | string | No | countryHubsPage | Name of the Spotify web player operation that returned the data. | ||
| data.meta.partialErrors | integer | No | 1 | PartialErrors counts upstream GraphQL field errors that were tolerated because usable shelves were still returned (e.g. one broken shelf among several). Zero on a fully clean response. | ||
| data.meta.sectionCount | integer | No | 5 | Number of sections returned. | ||
| data.sections | array | No | Content sections of the country page. | |||
| data.sections[].contentId | string | No | CHARTS | Identifier of the section content, for example `CHARTS`. | ||
| data.sections[].items | array | No | Items returned for this section. | |||
| data.sections[].items[].album | object | No | Album the item appears on. | |||
| data.sections[].items[].album.description | string | No | The official podcast of comedian Joe Rogan. | Description text of the result. | ||
| data.sections[].items[].album.externalUrl | string | No | https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk | Link to the result on open.spotify.com. | ||
| data.sections[].items[].album.imageUrl | string | No | https://i.scdn.co/image/ab67656300005f1f54e6837957803d762a3f4d2b | URL of the main image for the result. | ||
| data.sections[].items[].album.images | array | No | Images available for the result, with their sizes. | |||
| data.sections[].items[].album.images[].height | integer | No | 640 | Image height in pixels. | ||
| data.sections[].items[].album.images[].url | string | No | https://i.scdn.co/image/ab6765630000ba8ab0484f8ee2933eceab32bac0 | URL of the image. | ||
| data.sections[].items[].album.images[].width | integer | No | 640 | Image width in pixels. | ||
| data.sections[].items[].album.publisher | string | No | Joe Rogan | Publisher or creator name of the result. | ||
| data.sections[].items[].album.subtitle | string | No | Joe Rogan | Secondary line shown under the title, such as the artist or creator name. | ||
| data.sections[].items[].album.title | string | No | The Joe Rogan Experience | Result title as Spotify shows it. | ||
| data.sections[].items[].album.type | string | No | Podcast | Kind of result as Spotify labels it, for example `Podcast`. | ||
| data.sections[].items[].album.uri | string | No | spotify:show:4rOoJ6Egrf8K2IrywzwOMk | Spotify URI of the result. | ||
| data.sections[].items[].artists | array | No | Artists credited on the item. | |||
| data.sections[].items[].artists[].description | string | No | The official podcast of comedian Joe Rogan. | Description text of the result. | ||
| data.sections[].items[].artists[].externalUrl | string | No | https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk | Link to the result on open.spotify.com. | ||
| data.sections[].items[].artists[].imageUrl | string | No | https://i.scdn.co/image/ab67656300005f1f54e6837957803d762a3f4d2b | URL of the main image for the result. | ||
| data.sections[].items[].artists[].images | array | No | Images available for the result, with their sizes. | |||
| data.sections[].items[].artists[].images[].height | integer | No | 640 | Image height in pixels. | ||
| data.sections[].items[].artists[].images[].url | string | No | https://i.scdn.co/image/ab6765630000ba8ab0484f8ee2933eceab32bac0 | URL of the image. | ||
| data.sections[].items[].artists[].images[].width | integer | No | 640 | Image width in pixels. | ||
| data.sections[].items[].artists[].publisher | string | No | Joe Rogan | Publisher or creator name of the result. | ||
| data.sections[].items[].artists[].subtitle | string | No | Joe Rogan | Secondary line shown under the title, such as the artist or creator name. | ||
| data.sections[].items[].artists[].title | string | No | The Joe Rogan Experience | Result title as Spotify shows it. | ||
| data.sections[].items[].artists[].type | string | No | Podcast | Kind of result as Spotify labels it, for example `Podcast`. | ||
| data.sections[].items[].artists[].uri | string | No | spotify:show:4rOoJ6Egrf8K2IrywzwOMk | Spotify URI of the result. | ||
| data.sections[].items[].attributes | object | No | [object Object] | Additional key-value attributes Spotify returns for the item. | ||
| data.sections[].items[].description | string | No | Your daily update of the most played tracks right now. | Description text of the item. | ||
| data.sections[].items[].externalUrl | string | No | https://open.spotify.com/playlist/37i9dQZEVXbLRQDuF5jeBpM | Link to the item on open.spotify.com. | ||
| data.sections[].items[].imageUrl | string | No | https://charts-images.scdn.co/assets/locale_en/regional/daily/region_us_default.jpg | URL of the main image for the item. | ||
| data.sections[].items[].images | array | No | Images available for the item, with their sizes. | |||
| data.sections[].items[].images[].height | integer | No | 640 | Image height in pixels. | ||
| data.sections[].items[].images[].url | string | No | https://i.scdn.co/image/ab6765630000ba8ab0484f8ee2933eceab32bac0 | URL of the image. | ||
| data.sections[].items[].images[].width | integer | No | 640 | Image width in pixels. | ||
| data.sections[].items[].owner | object | No | User or account that owns the item. | |||
| data.sections[].items[].owner.description | string | No | The official podcast of comedian Joe Rogan. | Description text of the result. | ||
| data.sections[].items[].owner.externalUrl | string | No | https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk | Link to the result on open.spotify.com. | ||
| data.sections[].items[].owner.imageUrl | string | No | https://i.scdn.co/image/ab67656300005f1f54e6837957803d762a3f4d2b | URL of the main image for the result. | ||
| data.sections[].items[].owner.images | array | No | Images available for the result, with their sizes. | |||
| data.sections[].items[].owner.images[].height | integer | No | 640 | Image height in pixels. | ||
| data.sections[].items[].owner.images[].url | string | No | https://i.scdn.co/image/ab6765630000ba8ab0484f8ee2933eceab32bac0 | URL of the image. | ||
| data.sections[].items[].owner.images[].width | integer | No | 640 | Image width in pixels. | ||
| data.sections[].items[].owner.publisher | string | No | Joe Rogan | Publisher or creator name of the result. | ||
| data.sections[].items[].owner.subtitle | string | No | Joe Rogan | Secondary line shown under the title, such as the artist or creator name. | ||
| data.sections[].items[].owner.title | string | No | The Joe Rogan Experience | Result title as Spotify shows it. | ||
| data.sections[].items[].owner.type | string | No | Podcast | Kind of result as Spotify labels it, for example `Podcast`. | ||
| data.sections[].items[].owner.uri | string | No | spotify:show:4rOoJ6Egrf8K2IrywzwOMk | Spotify URI of the result. | ||
| data.sections[].items[].subtitle | string | No | Spotify | Secondary line shown under the item title. | ||
| data.sections[].items[].title | string | No | Top 50 - USA | Item title as Spotify shows it. | ||
| data.sections[].items[].type | string | No | Playlist | Kind of item as Spotify labels it, for example `Playlist`. | ||
| data.sections[].items[].uri | string | No | spotify:playlist:37i9dQZEVXbLRQDuF5jeBpM | Spotify URI of the item. | ||
| data.sections[].title | string | No | Featured Charts | Section heading as Spotify shows it. | ||
| data.sections[].totalCount | integer | No | 20 | Total number of items in the section on Spotify. | ||
| data.supportedCountries | array | No | Countries Spotify offers a popular-in page for. | |||
| data.supportedCountries[].code | string | No | us | |||
| data.supportedCountries[].name | string | No | United States | Country name in English. | ||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 503 | Spotify upstream request failed | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/spotify/popular-by-country" \
-H "x-api-key: $CRAWLORA_API_KEY"