APIs / Apps and media / Spotify

1 credit per call18 endpoints1 datapointsChecked working 6 Dec 2026

Spotify API

Spotify API for tracks, albums, artists, playlists, podcasts and charts as JSON. 18 endpoints, one key, from 1 credit per successful call.

Spotify
GET/v1/spotify/search?q=daft+punk
{
  "search_parameters": {
    "engine": "spotify_search",
    "q": "daft punk",
    "limit": 20,
    "offset": 0
  },
  "query": "daft punk",
  "limit": 20,
  "offset": 0,
  "tracks": {
    "items": [
      {
        "item": {
          "__typename": "TrackResponseWrapper",
          "data": {
            "__typename": "Track",
            "albumOfTrack": "…",
            "artists": "…",
            "associationsV3": "…",
            "contentRating": "…",
            "duration": "…",
            "id": "0DiWol3AO6WpXZgp0goxAV",
            "trackMediaType": "AUDIO",
            "name": "One More Time",
            "playability": "…",
            "uri": "spotify:track:0DiWol3AO6WpXZgp0goxAV",
            "visualIdentity": "…"
          }
        }
      },
      {
        "item": {
          "__typename": "TrackResponseWrapper",
          "data": {
            "__typename": "Track",
            "albumOfTrack": "…",
            "artists": "…",
            "associationsV3": "…",
            "contentRating": "…",
            "duration": "…",
            "id": "69kOkLUCkxIZYexIgSG8rq",
            "trackMediaType": "AUDIO",
            "name": "Get Lucky (feat. Pharrell Williams and Nile Rodgers)",
            "playability": "…",
            "uri": "spotify:track:69kOkLUCkxIZYexIgSG8rq",
            "visualIdentity": "…"
          }
        }
      },
      {
        "item": {
          "__typename": "TrackResponseWrapper",
          "data": {
            "__typename": "Track",
            "albumOfTrack": "…",
            "artists": "…",
            "associationsV3": "…",
            "contentRating": "…",
            "duration": "…",
            "id": "1pKYYY0dkg23sQQXi0Q5zN",
            "trackMediaType": "AUDIO",
            "name": "Around the World",
            "playability": "…",
            "uri": "spotify:track:1pKYYY0dkg23sQQXi0Q5zN",
            "visualIdentity": "…"
          }
        }
      }
    ],
    "totalCount": 30
  },
  "albums": {
    "__typename": "AlbumOrPrereleasePage",
    "items": [
      {
        "__typename": "AlbumResponseWrapper",
        "data": {
          "__typename": "Album",
          "artists": {
            "items": [
              "…"
            ]
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "date": {
            "year": 2013
          },
          "isAlbumPreRelease": false,
          "name": "Random Access Memories",
          "playability": {
            "playable": true,
            "reason": "PLAYABLE"
          },
          "type": "ALBUM",
          "uri": "spotify:album:4m2880jivSbbyEGAKfITCa",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "AlbumResponseWrapper",
        "data": {
          "__typename": "Album",
          "artists": {
            "items": [
              "…"
            ]
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "date": {
            "year": 2001
          },
          "isAlbumPreRelease": false,
          "name": "Discovery",
          "playability": {
            "playable": true,
            "reason": "PLAYABLE"
          },
          "type": "ALBUM",
          "uri": "spotify:album:2noRn2Aes5aoNVsU6iWThc",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "AlbumResponseWrapper",
        "data": {
          "__typename": "Album",
          "artists": {
            "items": [
              "…"
            ]
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "date": {
            "year": 2010
          },
          "isAlbumPreRelease": false,
          "name": "TRON: Legacy - The Complete Edition (Original Motion Picture Soundtrack)",
          "playability": {
            "playable": true,
            "reason": "PLAYABLE"
          },
          "type": "ALBUM",
          "uri": "spotify:album:3AMXFnwHWXCvNr5NCCpLZI",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      }
    ],
    "totalCount": 41
  },
  "artists": {
    "items": [
      {
        "__typename": "ArtistResponseWrapper",
        "data": {
          "__typename": "Artist",
          "onPlatformReputationTrait": {
            "verification": "…"
          },
          "profile": {
            "name": "Daft Punk"
          },
          "uri": "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi",
          "visualIdentity": {
            "squareCoverImage": "…"
          },
          "visuals": {
            "avatarImage": "…"
          }
        }
      },
      {
        "__typename": "ArtistResponseWrapper",
        "data": {
          "__typename": "Artist",
          "onPlatformReputationTrait": {
            "verification": "…"
          },
          "profile": {
            "name": "Pharrell Williams"
          },
          "uri": "spotify:artist:2RdwBSPQiwcmiDo9kixcl8",
          "visualIdentity": {
            "squareCoverImage": "…"
          },
          "visuals": {
            "avatarImage": "…"
          }
        }
      },
      {
        "__typename": "ArtistResponseWrapper",
        "data": {
          "__typename": "Artist",
          "onPlatformReputationTrait": {
            "verification": "…"
          },
          "profile": {
            "name": "Tame Impala"
          },
          "uri": "spotify:artist:5INjqkS1o8h1imAzPqGZBb",
          "visualIdentity": {
            "squareCoverImage": "…"
          },
          "visuals": {
            "avatarImage": "…"
          }
        }
      }
    ],
    "totalCount": 40
  },
  "playlists": {
    "items": [
      {
        "__typename": "PlaylistResponseWrapper",
        "data": {
          "__typename": "Playlist",
          "description": "Best hits of this awesome band!",
          "format": "",
          "images": {
            "items": [
              "…"
            ]
          },
          "name": "Daft Punk Greatest Hits",
          "ownerV2": {
            "__typename": "UserResponseWrapper",
            "data": "…"
          },
          "uri": "spotify:playlist:2jTy5QwqWJ1ZUv2XeJPYbn",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "PlaylistResponseWrapper",
        "data": {
          "__typename": "Playlist",
          "attributes": [
            "…",
            "…",
            "…"
          ],
          "description": "<a href=spotify:playlist:37i9dQZF1EIWrM8JSlHPeE>Modjo</a>, <a href=spotify:playlist:37i9dQZF1EIYuUepGmHW88>Stardust</a> and <a href=spotify:playlist:37i9dQZF1EIYUy69jOuh8V>M83</a>",
          "format": "artist-mix-reader",
          "images": {
            "items": [
              "…"
            ]
          },
          "name": "Daft Punk Mix",
          "ownerV2": {
            "__typename": "UserResponseWrapper",
            "data": "…"
          },
          "uri": "spotify:playlist:37i9dQZF1EIZvbvrhfHXQ5",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "PlaylistResponseWrapper",
        "data": {
          "__typename": "Playlist",
          "attributes": [
            "…",
            "…",
            "…"
          ],
          "description": "With Modjo, Gorillaz, Pharrell Williams and more",
          "format": "inspiredby-mix",
          "images": {
            "items": [
              "…"
            ]
          },
          "name": "Daft Punk Radio",
          "ownerV2": {
            "__typename": "UserResponseWrapper",
            "data": "…"
          },
          "uri": "spotify:playlist:37i9dQZF1E4ow1baELNnKm",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      }
    ],
    "totalCount": 44
  },
  "podcasts": {
    "items": [
      {
        "__typename": "PodcastResponseWrapper",
        "data": {
          "__typename": "Podcast",
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "mediaType": "AUDIO",
          "name": "DAFT PUNK sur NRJ",
          "publisher": {
            "name": "NRJ France"
          },
          "topics": {
            "items": [
              "…"
            ]
          },
          "uri": "spotify:show:5sunx6io6NFjRgqpJp9vQX",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "PodcastResponseWrapper",
        "data": {
          "__typename": "Podcast",
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "mediaType": "AUDIO",
          "name": "Daft Punk, le secret des robots",
          "publisher": {
            "name": "Amazon Originals"
          },
          "topics": {},
          "uri": "spotify:show:0wxzoqBV4cE4F0i2hbBw4k",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "PodcastResponseWrapper",
        "data": {
          "__typename": "Podcast",
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "mediaType": "AUDIO",
          "name": "Daft Punk",
          "publisher": {
            "name": "Gabo Jolly"
          },
          "topics": {
            "items": [
              "…"
            ]
          },
          "uri": "spotify:show:7BJuiIp6JWJa8HBVIZCGua",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      }
    ],
    "totalCount": 40
  },
  "episodes": {
    "items": [
      {
        "__typename": "EpisodeResponseWrapper",
        "data": {
          "__typename": "Episode",
          "contentRating": {
            "label": "NONE"
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "description": "Inspired by one of the all-time dance floor breakdown bangers, Castle and JAG review all the things they're down to do (or not do) one more time, while simultaneously dissecting the revolutionary 2000 Daft Punk jam - \"One More Time\". Advert…",
          "duration": {
            "totalMilliseconds": 2205169
          },
          "mediaTypes": [
            "AUDIO"
          ],
          "name": "Daft Punk - One More Time",
          "playability": {
            "reason": "PLAYABLE"
          },
          "playedState": {
            "playPositionMilliseconds": 0,
            "state": "NOT_STARTED"
          },
          "podcastV2": {
            "__typename": "PodcastResponseWrapper",
            "data": "…"
          },
          "releaseDate": {
            "isoString": "2023-07-26T09:03:00Z",
            "precision": "MINUTE"
          },
          "restrictions": {
            "paywallContent": false
          },
          "uri": "spotify:episode:7xLhoHVipRcIPBJ41PX0Ds",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "EpisodeResponseWrapper",
        "data": {
          "__typename": "Episode",
          "contentRating": {
            "label": "NONE"
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "description": "Our dissection of Daft Punk’s Discovery continues with “Digital Love,” a dreamlike love story where harmony and sound design beautifully mirror its theme of unrequited love. Cole claims the song is now one of his favorites of all time as a …",
          "duration": {
            "totalMilliseconds": 2227072
          },
          "mediaTypes": [
            "VIDEO",
            "AUDIO"
          ],
          "name": "E5 - Dissecting \"Digital Love\" by Daft Punk",
          "playability": {
            "reason": "PLAYABLE"
          },
          "playedState": {
            "playPositionMilliseconds": 0,
            "state": "NOT_STARTED"
          },
          "podcastV2": {
            "__typename": "PodcastResponseWrapper",
            "data": "…"
          },
          "releaseDate": {
            "isoString": "2026-04-14T10:01:00Z",
            "precision": "MINUTE"
          },
          "restrictions": {
            "paywallContent": false
          },
          "uri": "spotify:episode:7kzmWfDCzfKi8TE6ijAKqp",
          "videoPreviewThumbnail": {
            "__typename": "VideoThumbnailImage",
            "imagePreview": "…"
          },
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      },
      {
        "__typename": "EpisodeResponseWrapper",
        "data": {
          "__typename": "Episode",
          "contentRating": {
            "label": "NONE"
          },
          "coverArt": {
            "extractedColors": "…",
            "sources": [
              "…",
              "…",
              "…"
            ]
          },
          "description": "Rob shares a list of the 10 most repetitive songs of the '90s, before diving into Daft Punk and their electronic hit “Around the World.” Later, Rob is joined by Pitchfork features editor Ryan Dombal to discuss meeting Daft Punk without thei…",
          "duration": {
            "totalMilliseconds": 4989257
          },
          "mediaTypes": [
            "AUDIO"
          ],
          "name": "“Around the World”—Daft Punk",
          "playability": {
            "reason": "PLAYABLE"
          },
          "playedState": {
            "playPositionMilliseconds": 0,
            "state": "NOT_STARTED"
          },
          "podcastV2": {
            "__typename": "PodcastResponseWrapper",
            "data": "…"
          },
          "releaseDate": {
            "isoString": "2023-07-12T07:00:00Z",
            "precision": "MINUTE"
          },
          "restrictions": {
            "paywallContent": false
          },
          "uri": "spotify:episode:11RCGpFQc8lrk1oJLbTdgk",
          "visualIdentity": {
            "squareCoverImage": "…"
          }
        }
      }
    ],
    "totalCount": 40
  },
  "genres": {
    "items": [
      {
        "__typename": "GenreResponseWrapper",
        "data": {
          "__typename": "Genre",
          "image": {
            "extractedColors": "…",
            "sources": [
              "…"
            ]
          },
          "name": "The First Ladies of KZN",
          "uri": "spotify:genre:0JQ5IMCbQBLnXYtJiRi57N"
        }
      },
      {
        "__typename": "GenreResponseWrapper",
        "data": {
          "__typename": "Genre",
          "image": {
            "extractedColors": "…",
            "sources": [
              "…"
            ]
          },
          "name": "Proudly South African Playlists",
          "uri": "spotify:genre:0JQ5IMCbQBLnuhPQGnKLgE"
        }
      },
      {
        "__typename": "GenreResponseWrapper",
        "data": {
          "__typename": "Genre",
          "image": {
            "extractedColors": "…",
            "sources": [
              "…"
            ]
          },
          "name": "Remembering Lucky Dube",
          "uri": "spotify:genre:0JQ5IMCbQBLqcm8YcZ3YOn"
        }
      }
    ],
    "totalCount": 20
  }
}
200 OKJSONX-Credits-Used: 1
Recorded 12 Nov 2026 and shortened.

Sample data

What one call returns

A recorded run of search: the fields and shapes you will get, shortened to 3 items.

#itemobject
1{2 fields}
2{2 fields}
3{2 fields}

Recorded 12 Nov 2026 · 3 items shown · 1 datapoints per itemGET /v1/spotify/search?q=daft+punk

1 datapoints

Other

  • itemobject

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/spotify/search?q=daft+punk" \
  -H "X-API-Key: $API_KEY"

Spotify · 18 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/spotify/album
id
search_parameters__typenamecopyrightcourtesyLinedateisPreRelease+14 more
1–2 credits
GET/v1/spotify/album-tracks
id+2 optional
search_parametersalbum_idreturnedtruncatedtracks
1–20 credits
GET/v1/spotify/artist
id
search_parameters__typenamediscographygoodsheaderImageid+11 more
1–2 credits
GET/v1/spotify/artist-discography
id+2 optional
search_parameters__typenamediscography
1 credit
GET/v1/spotify/artist-related
id
search_parametersartist_idrelated
1 credit
GET/v1/spotify/artist-top-tracks
id
search_parametersartisttop_tracks
1 credit
GET/v1/spotify/charts
key+2 optional
JSON1–10 credits
GET/v1/spotify/discovery-audio-mix-seed
track_id
search_parameterstrack_idmix
1 credit
GET/v1/spotify/episode
id
search_parameters__typenameaudiocontentRatingcoverArtdescription+16 more
1 credit
GET/v1/spotify/get-many
none+2 optional
search_parametersresultslookups
1–100 credits
GET/v1/spotify/playlist
id
search_parameters__typenamecontentabuseReportingEnabledattributesbasePermission+13 more
1 credit
GET/v1/spotify/playlist-tracks
id+2 optional
search_parametersplaylist_idreturnedtruncatedtracks
1–10 credits
GET/v1/spotify/search
q+2 optional
search_parameterstracksalbumsartistsplaylistspodcasts+2 more
1 credit
GET/v1/spotify/search-suggestions
q
search_parameterssuggestions
1 credit
GET/v1/spotify/show
id
search_parameters__typenameconsumptionOrderV2contentRatingV2contentTypecoverArt+15 more
1 credit
GET/v1/spotify/show-episodes
id+2 optional
search_parametersshow_idreturnedtruncatedepisodes
1–20 credits
GET/v1/spotify/track
id
search_parameters__typenameassociationsV3contentRatingdurationid+12 more
1 credit
GET/v1/spotify/track-colors
image_uri
search_parametersimage_uricolors
1 credit

Overview

About the Spotify API

What you can get

The Spotify API returns public Spotify catalogue data as JSON through 18 endpoints. Most look up one item by its id.

  • Search: search for q, with limit and offset, and search-suggestions for a partial q.
  • Music: a track, an album and its album-tracks, and an artist with artist-top-tracks, artist-related and artist-discography (with limit and offset).
  • Playlists: a playlist and its playlist-tracks.
  • Podcasts: a show, its show-episodes, and a single episode.
  • Charts: charts by key, with limit.
  • In bulk: get-many takes an ids[] array and a type.
  • Extras: discovery-audio-mix-seed for a track_id, and track-colors for an image_uri.

The list endpoints album-tracks, playlist-tracks, show-episodes and charts also take all.

How a call works

Look an item up by its Spotify ID: GET /v1/spotify/artist?id=... with your key in the X-API-Key header, then call artist-top-tracks or artist-discography with the same id. search takes a name or keywords in q. Most calls cost 1 credit. The list endpoints charge by what they return: album-tracks and show-episodes 1 credit per 50 items, playlist-tracks and charts 1 per 100; get-many costs 1 credit per id found. Failed calls cost nothing.

Apps and mediaJSONRESTMCP

More apps and media APIs

Use cases

Track an artist's top tracks and new releases

Use the Spotify API to track an artist's top tracks and new releases

Monitor a playlist's tracks over time

Use the Spotify API to monitor a playlist's tracks over time

Pull podcast shows and episodes into a catalogue

Use the Spotify API to pull podcast shows and episodes into a catalogue

Follow chart positions for a market

Use the Spotify API to follow chart positions for a market

FAQ

Questions

Do I need a Spotify developer account?

No. You call this Spotify API with your Perceptlayer key in the `X-API-Key` header, so there's no Spotify app or access token to set up. The same key works for every API in the catalogue.

How much does the Spotify API cost?

Most calls cost one credit. `album-tracks` and `show-episodes` cost one credit per 50 items returned, `playlist-tracks` and `charts` one per 100 tracks, and `get-many` one per id found, or two for an id that needs a second lookup. New accounts get free credits to start, and credit packs bring the price down as you scale.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Is this the official Spotify API?

No. Perceptlayer is an independent service and is not affiliated with Spotify. It returns Spotify data as JSON with a Perceptlayer key, so there is no Spotify developer account, app review or partner approval to get first. It only reads data: if Spotify has an official API and you need to act on your own Spotify account, such as posting, managing orders or reading private data, use that one.

Should I build a Spotify scraper instead?

You can, but a Spotify scraper is code you maintain: page changes break it, requests get blocked, and Spotify's terms govern how you collect data. The Spotify API gives you 18 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the Spotify API with 100 free credits

No credit card. Failed calls are never billed.