Spotify

Search Spotify

Search Spotify for tracks, artists, albums, playlists, podcasts, episodes and audiobooks.

GET/v1/spotify/search
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
querystringrequiredquery

Search text, such as a song, artist, podcast or playlist name (for example `my first million`).

min 1 chars · max 512 chars

Response fields
80

Endpoint-specific response payload.

dataquery
string

Search query string evaluated for this response.

min 1 chars

Matching Spotify tracks, up to 20.

datatracks[]trackId
string

Stable Spotify track identifier.

min 1 chars

datatracks[]title
string

Track title.

min 1 chars

datatracks[]trackUrl
string

Canonical public Spotify track URL.

min 1 chars

datatracks[]durationMs
integernullable

Track duration in milliseconds when available.

≥ 0

datatracks[]explicit
boolean

Whether the track is marked explicit.

datatracks[]playable
booleannullable

Whether the track is playable on Spotify when available.

Album the track belongs to when available.

datatracks[]albumalbumId
string

Spotify album id. Pass it to the Spotify album endpoint for the full tracklist.

min 1 chars

datatracks[]albumtitle
string

Album title.

min 1 chars

datatracks[]albumcoverArtUrl
stringnullable

Best available square cover image URL when available.

Artists credited on the track.

datatracks[]artists[]artistId
string

Spotify artist id.

min 1 chars

datatracks[]artists[]displayName
string

Artist display name.

min 1 chars

Matching Spotify artists, up to 20.

dataartists[]artistId
string

Stable Spotify artist identifier.

min 1 chars

dataartists[]displayName
string

Artist display name.

min 1 chars

dataartists[]profileUrl
string

Canonical public Spotify artist profile URL.

min 1 chars

dataartists[]avatarUrl
stringnullable

Best available square avatar image URL when available.

dataartists[]verified
booleannullable

Whether the artist is marked as verified when available.

Matching Spotify albums, up to 20.

dataalbums[]albumId
string

Stable Spotify album identifier.

min 1 chars

dataalbums[]title
string

Album title.

min 1 chars

dataalbums[]albumType
string

Release type (album, single, compilation, etc.).

one of: album, single, compilation, ep, unknown

dataalbums[]releaseYear
integernullable

Release year when available.

dataalbums[]coverArtUrl
stringnullable

Best available square cover image URL when available.

dataalbums[]albumUrl
string

Canonical public Spotify album URL.

min 1 chars

Artists credited on the album.

dataalbums[]artists[]artistId
string

Spotify artist id.

min 1 chars

dataalbums[]artists[]displayName
string

Artist display name.

min 1 chars

Matching Spotify playlists, up to 20.

dataplaylists[]playlistId
string

Stable Spotify playlist identifier.

min 1 chars

dataplaylists[]title
string

Playlist title.

min 1 chars

dataplaylists[]description
stringnullable

Playlist description as plain text when available.

dataplaylists[]coverArtUrl
stringnullable

Best available playlist cover image URL when available.

dataplaylists[]playlistUrl
string

Canonical public Spotify playlist URL.

min 1 chars

Playlist owner when available.

dataplaylists[]owneruserId
string

Spotify user id of the owner.

min 1 chars

dataplaylists[]ownerdisplayName
stringnullable

Owner display name when available.

dataplaylists[]ownerprofileUrl
string

Public Spotify profile URL of the owner.

min 1 chars

Matching Spotify podcasts, up to 20.

datapodcasts[]podcastId
string

Stable Spotify podcast identifier. Pass it to the Spotify podcast endpoints.

min 1 chars

datapodcasts[]title
string

Podcast title.

min 1 chars

datapodcasts[]publisher
stringnullable

Podcast publisher when available.

datapodcasts[]coverArtUrl
stringnullable

Best available square cover image URL when available.

datapodcasts[]podcastUrl
string

Canonical public Spotify podcast URL.

min 1 chars

datapodcasts[]mediaType
string

Media format: audio, video, mixed (audio and video episodes) or unknown.

one of: audio, video, mixed, unknown

Topics Spotify lists for the podcast (may be empty).

datapodcasts[]topics[]
stringoptional

min 1 chars

Matching Spotify podcast episodes, up to 20.

dataepisodes[]episodeId
string

Stable Spotify episode identifier.

min 1 chars

dataepisodes[]title
string

Episode title.

min 1 chars

dataepisodes[]description
stringnullable

Episode description as plain text when available.

dataepisodes[]durationMs
integernullable

Episode duration in milliseconds when available.

≥ 0

dataepisodes[]releaseDate
stringnullable

Release date and time as an ISO 8601 string when available.

dataepisodes[]explicit
boolean

Whether the episode is marked explicit.

dataepisodes[]coverArtUrl
stringnullable

Best available square cover image URL when available.

dataepisodes[]episodeUrl
string

Canonical public Spotify episode URL.

min 1 chars

Podcast the episode belongs to when available.

dataepisodes[]podcastpodcastId
string

Spotify podcast id.

min 1 chars

dataepisodes[]podcasttitle
string

Podcast title.

min 1 chars

dataepisodes[]podcastpublisher
stringnullable

Podcast publisher when available.

Matching Spotify audiobooks, up to 20.

dataaudiobooks[]audiobookId
string

Stable Spotify audiobook identifier.

min 1 chars

dataaudiobooks[]title
string

Audiobook title.

min 1 chars

Author names (may be empty).

dataaudiobooks[]authors[]
stringoptional

min 1 chars

dataaudiobooks[]description
stringnullable

Audiobook description as plain text when available.

dataaudiobooks[]durationMs
integernullable

Audiobook length in milliseconds when available.

≥ 0

dataaudiobooks[]publishDate
stringnullable

Publish date as an ISO 8601 string when available.

dataaudiobooks[]coverArtUrl
stringnullable

Best available cover image URL when available.

dataaudiobooks[]audiobookUrl
string

Canonical public Spotify audiobook URL.

min 1 chars

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metastale
booleanoptional

Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.

one of: true

metafetchedAt
stringoptional

When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

Code example

curl "https://api.socialfetch.dev/v1/spotify/search?query=my%20first%20million" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Spotify search results.