Social Fetch
Spotify

Get Spotify track

Get a Spotify track by id or track URL.

GET/v1/spotify/track
1credit
x-api-key*stringheader

API key (`sfk_...`)

Parameters
2
trackIdstringquery

Optional Spotify track id for the request.

min 1 chars · max 128 chars

urlstringquery

Optional Spotify track URL for the request.

min 1 chars · max 4096 chars

Response fields
32

Endpoint-specific response payload.

datalookupStatus
string

Whether the track was found.

one of: found, not_found

Track details when available.

datatrackplatform
string

Platform for this track.

one of: spotify

datatracktrackId
string

Stable Spotify track identifier.

min 1 chars

datatracktitle
string

Track title.

min 1 chars

datatrackdurationMs
integer

Track duration in milliseconds.

≥ 0

datatracktrackNumber
integeroptional

Track number on the album when available.

≥ 0

datatrackexplicit
booleanoptional

Whether the track is marked explicit when available.

datatrackplayable
boolean

Whether the track is playable in the current context.

datatrackplayCount
integeroptional

Play count when available.

≥ 0

datatrackmediaType
stringoptional

Media type when available.

min 1 chars

datatrackpreviewUrl
stringoptional

Short audio preview URL when available.

min 1 chars

datatracktrackUrl
string

Canonical public Spotify track URL.

min 1 chars

Album details when available.

dataalbumalbumId
string

Spotify album identifier.

min 1 chars

dataalbumtitle
string

Album title.

min 1 chars

dataalbumalbumType
stringoptional

Album type when available.

min 1 chars

dataalbumreleaseYear
integeroptional

Release year when available.

dataalbumreleaseDateIso
stringoptional

Release date ISO string when available.

min 1 chars

dataalbumcoverArtUrl
stringnullableoptional

Best available album cover image URL when available.

dataalbumalbumUrl
stringoptional

Canonical public Spotify album URL when available.

min 1 chars

dataalbumtrackCount
integeroptional

Number of tracks on the album when available.

≥ 0

Artists credited on the track (may be empty).

dataartists[]artistId
string

Spotify artist identifier.

min 1 chars

dataartists[]displayName
string

Artist display name.

min 1 chars

dataartists[]avatarUrl
stringnullableoptional

Best available artist avatar URL when available.

dataartists[]profileUrl
stringoptional

Canonical public Spotify artist profile URL when available.

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

Code example

curl "https://api.socialfetch.dev/v1/spotify/track?trackId=1ITJflybJsfarsUtiBvkfK" \
  -H "x-api-key: YOUR_API_KEY"

Responses

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

On this page

No Headings