# Spotify Artist Top Tracks

Get an artist's most popular tracks. This reads the artist overview response and costs no additional lookup.

- **Documentation:** [https://scrappa.co/docs/spotify-api/spotify_artist_top_tracks](https://scrappa.co/docs/spotify-api/spotify_artist_top_tracks)
- **API group:** Spotify API
- **Endpoint:** `GET https://scrappa.co/api/spotify/artist/top-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 artist id or full spotify:artist: URI.</p> |

## Example response

```json
{
    "artist": {
        "id": "4tZwfgrHOc3mvqYlEYSvVi",
        "name": "Daft Punk"
    },
    "top_tracks": {
        "items": [
            {
                "uid": "5d99bb101e828b296cc3",
                "track": {
                    "id": "0DiWol3AO6WpXZgp0goxAV",
                    "uri": "spotify:track:0DiWol3AO6WpXZgp0goxAV",
                    "name": "One More Time",
                    "artists": {
                        "items": [
                            {
                                "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi",
                                "profile": {
                                    "name": "Daft Punk"
                                }
                            }
                        ]
                    },
                    "duration": {
                        "totalMilliseconds": 320357
                    },
                    "playcount": "981812332",
                    "discNumber": 1,
                    "playability": {
                        "reason": "PLAYABLE",
                        "playable": true
                    },
                    "albumOfTrack": {
                        "uri": "spotify:album:2noRn2Aes5aoNVsU6iWThc",
                        "coverArt": {
                            "sources": [
                                {
                                    "url": "https://i.scdn.co/image/ab67616d00001e021e81bff9807a9e629fce5ade"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d000048511e81bff9807a9e629fce5ade"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d0000b2731e81bff9807a9e629fce5ade"
                                }
                            ]
                        }
                    },
                    "contentRating": {
                        "label": "NONE"
                    },
                    "associationsV3": {
                        "videoAssociations": {
                            "totalCount": 0
                        }
                    }
                }
            },
            {
                "uid": "7e2bde934c60abb38dd2",
                "track": {
                    "id": "2Foc5Q5nqNiosCNqttzHof",
                    "uri": "spotify:track:2Foc5Q5nqNiosCNqttzHof",
                    "name": "Get Lucky (Radio Edit) [feat. Pharrell Williams and Nile Rodgers]",
                    "artists": {
                        "items": [
                            {
                                "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi",
                                "profile": {
                                    "name": "Daft Punk"
                                }
                            },
                            {
                                "uri": "spotify:artist:2RdwBSPQiwcmiDo9kixcl8",
                                "profile": {
                                    "name": "Pharrell Williams"
                                }
                            },
                            {
                                "uri": "spotify:artist:3yDIp0kaq9EFKe07X1X2rz",
                                "profile": {
                                    "name": "Nile Rodgers"
                                }
                            }
                        ]
                    },
                    "duration": {
                        "totalMilliseconds": 247632
                    },
                    "playcount": "1453948438",
                    "discNumber": 1,
                    "playability": {
                        "reason": "PLAYABLE",
                        "playable": true
                    },
                    "albumOfTrack": {
                        "uri": "spotify:album:2ePFIvZKMe8zefATp9ofFA",
                        "coverArt": {
                            "sources": [
                                {
                                    "url": "https://i.scdn.co/image/ab67616d00001e0219a88dd5c7118e87d7b1619e"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d0000485119a88dd5c7118e87d7b1619e"
                                },
                                {
                                    "url": "https://i.scdn.co/image/ab67616d0000b27319a88dd5c7118e87d7b1619e"
                                }
                            ]
                        }
                    },
                    "contentRating": {
                        "label": "NONE"
                    },
                    "associationsV3": {
                        "videoAssociations": {
                            "totalCount": 0
                        }
                    }
                }
            }
        ]
    },
    "search_parameters": {
        "id": "4tZwfgrHOc3mvqYlEYSvVi",
        "engine": "spotify_artist_top_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)
