Social Fetch
Spotify

Get Spotify track

Get a Spotify track by id or track URL.

Operation

GET/v1/spotify/track

Headers

x-api-keystringrequired(header)

API key (`sfk_...`)

Parameters

trackIdstring(query)

Optional Spotify track id for the request.

min 1 chars · max 128 chars

urlstring(query)

Optional Spotify track URL for the request.

min 1 chars · max 4096 chars

Response fields

data
objectrequired

Endpoint-specific response payload.

datalookupStatus
stringrequired

Whether the track was found or not found.

one of: found, not_found

datatrack
objectrequirednullable

Track details when available.

datatrackplatform
stringrequired

Platform for this track.

one of: spotify

datatracktrackId
stringrequired

Stable Spotify track identifier.

min 1 chars

datatracktitle
stringrequired

Track title.

min 1 chars

datatrackdurationMs
integerrequired

Track duration in milliseconds.

≥ 0

datatracktrackNumber
integer

Track number on the album when available.

≥ 0

datatrackexplicit
boolean

Whether the track is marked explicit when available.

datatrackplayable
booleanrequired

Whether the track is playable in the current context.

datatrackplayCount
integer

Play count when available.

≥ 0

datatrackmediaType
string

Media type when available (e.g. AUDIO).

min 1 chars

datatrackpreviewUrl
string

Short audio preview URL when available.

min 1 chars

datatracktrackUrl
stringrequired

Canonical public Spotify track URL.

min 1 chars

dataalbum
objectrequirednullable

Album details when available.

dataalbumalbumId
stringrequired

Spotify album identifier.

min 1 chars

dataalbumtitle
stringrequired

Album title.

min 1 chars

dataalbumalbumType
string

Album type when available (e.g. ALBUM, SINGLE).

min 1 chars

dataalbumreleaseYear
integer

Release year when available.

dataalbumreleaseDateIso
string

Release date ISO string when available.

min 1 chars

dataalbumcoverArtUrl
stringnullable

Best available album cover image URL when available.

dataalbumalbumUrl
string

Canonical public Spotify album URL when available.

min 1 chars

dataalbumtrackCount
integer

Number of tracks on the album when available.

≥ 0

dataartists
arrayrequired

Artists credited on the track (may be empty).

dataartists[]artistId
stringrequired

Spotify artist identifier.

min 1 chars

dataartists[]displayName
stringrequired

Artist display name.

min 1 chars

dataartists[]avatarUrl
stringnullable

Best available artist avatar URL when available.

dataartists[]profileUrl
string

Canonical public Spotify artist profile URL when available.

min 1 chars

meta
objectrequired

Metadata describing the request and billing outcome.

metarequestId
stringrequired

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integerrequired

Credits charged for this request.

≥ 0

metaversion
stringrequired

Public API version that served the response.

one of: v1

Code example

Responses

Lookup result. Check `data.lookupStatus` for `found` or `not_found`.

Error codes

bad_requestinsufficient_creditsinternal_errorlookup_failedtemporarily_unavailableunauthorized

On this page