# Spotify Playlist

Get a Spotify playlist with its description, owner, cover image and total track count.

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

## 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> |

## Example response

```json
{
    "uri": "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M",
    "name": "Today\u2019s Top Hits",
    "images": {
        "items": [
            {
                "sources": [
                    {
                        "url": "https://i.scdn.co/image/ab67706f0000000271992d3b45eb1297df9c6bf7",
                        "width": null,
                        "height": null
                    }
                ]
            }
        ]
    },
    "content": {
        "totalCount": 50
    },
    "description": "The hottest 50. Cover: Taylor Swift",
    "visualIdentity": {
        "squareCoverImage": {
            "__typename": "VisualIdentityImage",
            "extractedColorSet": {
                "minContrast": {
                    "textBase": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "textSubdued": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "backgroundBase": {
                        "red": 133,
                        "blue": 178,
                        "alpha": 255,
                        "green": 155
                    },
                    "textBrightAccent": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "backgroundTintedBase": {
                        "red": 109,
                        "blue": 152,
                        "alpha": 255,
                        "green": 131
                    }
                },
                "highContrast": {
                    "textBase": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "textSubdued": {
                        "red": 184,
                        "blue": 232,
                        "alpha": 255,
                        "green": 208
                    },
                    "backgroundBase": {
                        "red": 65,
                        "blue": 105,
                        "alpha": 255,
                        "green": 85
                    },
                    "textBrightAccent": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "backgroundTintedBase": {
                        "red": 33,
                        "blue": 71,
                        "alpha": 255,
                        "green": 52
                    }
                },
                "higherContrast": {
                    "textBase": {
                        "red": 255,
                        "blue": 255,
                        "alpha": 255,
                        "green": 255
                    },
                    "textSubdued": {
                        "red": 184,
                        "blue": 232,
                        "alpha": 255,
                        "green": 208
                    },
                    "backgroundBase": {
                        "red": 35,
                        "blue": 73,
                        "alpha": 255,
                        "green": 55
                    },
                    "textBrightAccent": {
                        "red": 30,
                        "blue": 96,
                        "alpha": 255,
                        "green": 215
                    },
                    "backgroundTintedBase": {
                        "red": 67,
                        "blue": 108,
                        "alpha": 255,
                        "green": 88
                    }
                },
                "encoreBaseSetTextColor": {
                    "red": 200,
                    "blue": 248,
                    "alpha": 255,
                    "green": 224
                }
            }
        }
    },
    "search_parameters": {
        "id": "37i9dQZF1DXcBWIGoYBM5M",
        "engine": "spotify_playlist"
    }
}
```

## 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)
