# Spotify Profile API

> Retrieve profile from Spotify with a single API request.

- Request: `GET https://fetchgoblin.com/api/data/v1/spotify/profile`
- Cost: 1 credit per successful request. Failed requests are not charged.
- Authentication: `x-api-key` header
- HTML reference: https://fetchgoblin.com/docs/get-v1-spotify-profile
- MCP: call tool `call_endpoint` with `endpoint_id: "get-v1-spotify-profile"` at https://fetchgoblin.com/mcp

## Query parameters

| Parameter | Required | Type | Description |
| --- | --- | --- | --- |
| `url` | yes | string | Public Spotify user profile URL. Example: `https://open.spotify.com/user/2qsnc26tgpkttp2yu4p2lybii` |

## Example request

```sh
curl --request GET 'https://fetchgoblin.com/api/data/v1/spotify/profile?url=https%3A%2F%2Fopen.spotify.com%2Fuser%2F2qsnc26tgpkttp2yu4p2lybii' \
  --header "x-api-key: $FETCHGOBLIN_API_KEY"
```

## Example response

Some platform fields may be absent or null. Every response also includes `credits_charged`, `credits_remaining` and `request_id`.

```json
{
  "success": true,
  "id": "2qsnc26tgpkttp2yu4p2lybii",
  "uri": "spotify:user:2qsnc26tgpkttp2yu4p2lybii",
  "url": "https://open.spotify.com/user/2qsnc26tgpkttp2yu4p2lybii",
  "name": "hiroki",
  "image_url": "https://i.scdn.co/image/ab6775700000ee850dd39e48be9b48b9295c642c",
  "verified": false,
  "follower_count": 65,
  "following_count": 279,
  "public_playlists": [
    {
      "id": "579xtRZeleNlKYHnkLwmAH",
      "name": "garmin",
      "url": "https://open.spotify.com/playlist/579xtRZeleNlKYHnkLwmAH"
    }
  ],
  "recently_played_artists": [
    {
      "id": "5oLb41tSEDtY357HGJCIK9",
      "name": "FAKY",
      "url": "https://open.spotify.com/artist/5oLb41tSEDtY357HGJCIK9"
    }
  ],
  "credits_charged": 1,
  "credits_remaining": 1000,
  "request_id": "00000000-0000-4000-8000-000000000000"
}
```
