Skip to content
Scrappa Get API key
Spotify API 1 credit/request

Spotify Charts

GET https://scrappa.co/api/spotify/charts/{key}

Get a ranked Spotify editorial chart as an ordered track list. Charts are ordinary curated playlists, so ranks are preserved exactly. One page by default; ask for all=true to walk the whole chart, where each page is a separate upstream lookup charged separately. The walk stops at 1,000 items or a 20-second budget, whichever comes first, and truncated=true says so. The path segment after /charts/ is the chart key; read search_parameters.available_keys to discover them.

Spotify Charts 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/spotify/charts/{key}
Auth header
x-api-key
Cost
1 credit/request
key = example
Response preview
200 OK
{
    "chart": {
        "key": "todays-top-hits",
        "name": "Today's Top Hits"
    },
    "tracks": [
        {
            "uri": "spotify:track:11hcBLPtbMp4aQI6zGQLub",
            "__typename": "Entity",
            "playability": {
                "reason": "PLAYABLE",
                "playable": true
            },
            "identityTrait": {
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

2 optional filters available.

key string Required

Chart key, one of todays-top-hits, sextou, top-christian-hits or top-gospel-tracks. This chart response returns the resolved key list under search_parameters.available_keys.

Example value example
limit integer Optional

Maximum number of items to return.

Example value 10
all boolean Optional

Walk the whole list. Cannot be combined with limit. Each page is a separate upstream lookup and is charged separately; the walk stops at 1,000 items or a 20-second budget, whichever comes first, and truncated=true says so.

Example value true

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

chart tracks returned truncated playlist_id total_count search_parameters

Common tracks fields

uri __typename playability identityTrait
JSON Response
200 OK
{
    "chart": {
        "key": "todays-top-hits",
        "name": "Today's Top Hits"
    },
    "tracks": [
        {
            "uri": "spotify:track:11hcBLPtbMp4aQI6zGQLub",
            "__typename": "Entity",
            "playability": {
                "reason": "PLAYABLE",
                "playable": true
            },
            "identityTrait": {
                "name": "Patient Zero",
                "type": "Song",
                "__typename": "IdentityTrait",
                "description": "",
                "contributors": {
                    "items": [
                        {
                            "uri": "spotify:artist:06HL4z0CvFAxyc27GXpf02",
                            "name": "Taylor Swift"
                        }
                    ],
                    "totalCount": 1
                },
                "contentHierarchyParent": {
                    "uri": "spotify:album:4hF2gTGuPYlykYuphDxi8J",
                    "__typename": "Entity",
                    "identityTrait": {
                        "name": "The Life of a Showgirl: The Encore",
                        "__typename": "IdentityTrait"
                    },
                    "publishingMetadataTrait": {
                        "__typename": "PublishingMetadataTrait",
                        "firstPublishedAt": {
                            "isoString": "2026-09-25",
                            "precision": "DAY"
                        }
                    }
                }
            },
            "visualIdentityTrait": {
                "__typename": "VisualIdentityTrait",
                "squareCoverImage": {
                    "image": {
                        "data": {
                            "sources": [
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d00001e02cf3de6b538d8b1ed73a4d5d1",
                                    "maxWidth": 300,
                                    "maxHeight": 300,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d00004851cf3de6b538d8b1ed73a4d5d1",
                                    "maxWidth": 64,
                                    "maxHeight": 64,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d0000b273cf3de6b538d8b1ed73a4d5d1",
                                    "maxWidth": 640,
                                    "maxHeight": 640,
                                    "imageFormat": "JPEG"
                                }
                            ],
                            "__typename": "ImageV2"
                        }
                    },
                    "extractedColorSet": {
                        "minContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundBase": {
                                "red": 232,
                                "blue": 104,
                                "alpha": 255,
                                "green": 8
                            },
                            "textBrightAccent": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundTintedBase": {
                                "red": 183,
                                "blue": 75,
                                "alpha": 255,
                                "green": 0
                            }
                        },
                        "highContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 255,
                                "blue": 202,
                                "alpha": 255,
                                "green": 187
                            },
                            "backgroundBase": {
                                "red": 156,
                                "blue": 62,
                                "alpha": 255,
                                "green": 0
                            },
                            "textBrightAccent": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundTintedBase": {
                                "red": 96,
                                "blue": 31,
                                "alpha": 255,
                                "green": 0
                            }
                        },
                        "higherContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 255,
                                "blue": 202,
                                "alpha": 255,
                                "green": 187
                            },
                            "backgroundBase": {
                                "red": 101,
                                "blue": 33,
                                "alpha": 255,
                                "green": 0
                            },
                            "textBrightAccent": {
                                "red": 30,
                                "blue": 96,
                                "alpha": 255,
                                "green": 215
                            },
                            "backgroundTintedBase": {
                                "red": 146,
                                "blue": 69,
                                "alpha": 255,
                                "green": 51
                            }
                        },
                        "encoreBaseSetTextColor": {
                            "red": 255,
                            "blue": 182,
                            "alpha": 255,
                            "green": 159
                        }
                    }
                },
                "sixteenByNineCoverImage": {
                    "image": {
                        "data": {
                            "sources": [
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab6742d3000052b76ca413a1f520797f0b1068d1",
                                    "maxWidth": 640,
                                    "maxHeight": 360,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab6742d3000053b76ca413a1f520797f0b1068d1",
                                    "maxWidth": 1280,
                                    "maxHeight": 720,
                                    "imageFormat": "JPEG"
                                }
                            ],
                            "__typename": "ImageV2"
                        }
                    }
                }
            },
            "consumptionExperienceTrait": {
                "formats": [
                    "FORMAT_AUDIO",
                    "FORMAT_VIDEO",
                    "FORMAT_LOSSLESS"
                ],
                "duration": {
                    "seconds": 225,
                    "nanoSeconds": 0
                },
                "__typename": "ConsumptionExperienceTrait",
                "contentRatings": []
            }
        },
        {
            "uri": "spotify:track:4EoJ151oQ5jY48z4RhSE96",
            "__typename": "Entity",
            "playability": {
                "reason": "PLAYABLE",
                "playable": true
            },
            "identityTrait": {
                "name": "the cure",
                "type": "Song",
                "__typename": "IdentityTrait",
                "description": "",
                "contributors": {
                    "items": [
                        {
                            "uri": "spotify:artist:1McMsnEElThX1knmY4oliG",
                            "name": "Olivia Rodrigo"
                        }
                    ],
                    "totalCount": 1
                },
                "contentHierarchyParent": {
                    "uri": "spotify:album:6zme2NwcaBxbn3mWOcMY8y",
                    "__typename": "Entity",
                    "identityTrait": {
                        "name": "the cure",
                        "__typename": "IdentityTrait"
                    },
                    "publishingMetadataTrait": {
                        "__typename": "PublishingMetadataTrait",
                        "firstPublishedAt": {
                            "isoString": "2026-05-22",
                            "precision": "DAY"
                        }
                    }
                }
            },
            "visualIdentityTrait": {
                "__typename": "VisualIdentityTrait",
                "squareCoverImage": {
                    "image": {
                        "data": {
                            "sources": [
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d00001e0279e480cbab8c7b86d277841a",
                                    "maxWidth": 300,
                                    "maxHeight": 300,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d0000485179e480cbab8c7b86d277841a",
                                    "maxWidth": 64,
                                    "maxHeight": 64,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.spotifycdn.com/image/ab67616d0000b27379e480cbab8c7b86d277841a",
                                    "maxWidth": 640,
                                    "maxHeight": 640,
                                    "imageFormat": "JPEG"
                                }
                            ],
                            "__typename": "ImageV2"
                        }
                    },
                    "extractedColorSet": {
                        "minContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundBase": {
                                "red": 175,
                                "blue": 160,
                                "alpha": 255,
                                "green": 144
                            },
                            "textBrightAccent": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundTintedBase": {
                                "red": 150,
                                "blue": 135,
                                "alpha": 255,
                                "green": 120
                            }
                        },
                        "highContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 229,
                                "blue": 213,
                                "alpha": 255,
                                "green": 197
                            },
                            "backgroundBase": {
                                "red": 103,
                                "blue": 89,
                                "alpha": 255,
                                "green": 75
                            },
                            "textBrightAccent": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "backgroundTintedBase": {
                                "red": 68,
                                "blue": 56,
                                "alpha": 255,
                                "green": 43
                            }
                        },
                        "higherContrast": {
                            "textBase": {
                                "red": 255,
                                "blue": 255,
                                "alpha": 255,
                                "green": 255
                            },
                            "textSubdued": {
                                "red": 229,
                                "blue": 213,
                                "alpha": 255,
                                "green": 197
                            },
                            "backgroundBase": {
                                "red": 71,
                                "blue": 59,
                                "alpha": 255,
                                "green": 45
                            },
                            "textBrightAccent": {
                                "red": 30,
                                "blue": 96,
                                "alpha": 255,
                                "green": 215
                            },
                            "backgroundTintedBase": {
                                "red": 105,
                                "blue": 92,
                                "alpha": 255,
                                "green": 78
                            }
                        },
                        "encoreBaseSetTextColor": {
                            "red": 216,
                            "blue": 200,
                            "alpha": 255,
                            "green": 184
                        }
                    }
                },
                "sixteenByNineCoverImage": {
                    "image": {
                        "data": {
                            "sources": [
                                {
                                    "url": "https://image-cdn-ak.spotifycdn.com/image/ab6742d3000052b73d7ced09b65838068fe2ae0a",
                                    "maxWidth": 640,
                                    "maxHeight": 360,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-ak.spotifycdn.com/image/ab6742d3000053b73d7ced09b65838068fe2ae0a",
                                    "maxWidth": 1280,
                                    "maxHeight": 720,
                                    "imageFormat": "JPEG"
                                }
                            ],
                            "__typename": "ImageV2"
                        }
                    }
                }
            },
            "consumptionExperienceTrait": {
                "formats": [
                    "FORMAT_AUDIO",
                    "FORMAT_VIDEO",
                    "FORMAT_LOSSLESS"
                ],
                "duration": {
                    "seconds": 297,
                    "nanoSeconds": 0
                },
                "__typename": "ConsumptionExperienceTrait",
                "contentRatings": [
                    "CONTENT_RATING_EXPLICIT"
                ]
            }
        }
    ],
    "returned": 2,
    "truncated": true,
    "playlist_id": "37i9dQZF1DXcBWIGoYBM5M",
    "total_count": 50,
    "search_parameters": {
        "key": "todays-top-hits",
        "limit": 50,
        "engine": "spotify_chart",
        "available_keys": [
            "todays-top-hits",
            "sextou",
            "top-christian-hits",
            "top-gospel-tracks"
        ]
    }
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

404

Not Found

No Spotify data exists for the requested id or chart key. Failed requests are never charged.

422

Validation Error

A required parameter is missing or invalid. See the errors object for the offending field.

503

Upstream Unavailable

Spotify could not be reached or returned an unusable response. This is a failed request and is never charged; it is safe to retry.

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.