# Spotify Playlist Tracks

Get playlist tracks in exact rank order. One page by default; ask for all=true to walk the whole playlist, 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.

- **Documentation:** [https://scrappa.co/docs/spotify-api/spotify_playlist_tracks](https://scrappa.co/docs/spotify-api/spotify_playlist_tracks)
- **API group:** Spotify API
- **Endpoint:** `GET https://scrappa.co/api/spotify/playlist/tracks`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | <p>Spotify playlist id or full spotify:playlist: URI.</p> |
| `limit` | integer | No | <p>Maximum number of items to return.</p> |
| `all` | boolean | No | <p>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.</p> |

## Example response

```json
{
    "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-fa.spotifycdn.com/image/ab6742d3000052b73d7ced09b65838068fe2ae0a",
                                    "maxWidth": 640,
                                    "maxHeight": 360,
                                    "imageFormat": "JPEG"
                                },
                                {
                                    "url": "https://image-cdn-fa.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": {
        "id": "37i9dQZF1DXcBWIGoYBM5M",
        "engine": "spotify_playlist_tracks"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 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. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
