Apple Music

Search Apple Music

Search the Apple Music catalog by keyword.

GET/v1/apple-music/search
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
querystringrequiredquery

Search query text for Apple Music catalog results.

min 1 chars · max 512 chars

typestringoptionalquery

Catalog result type to return. Omit to search across types (treated as all).

one of: all, song, album, artist, playlist, station, music_video, radio_episode

Response fields
56

Endpoint-specific response payload.

dataquery
string

Search query string evaluated for this response.

min 1 chars

datatype
string

Result type applied for this response.

one of: all, song, album, artist, playlist, station, music_video, radio_episode

Matching Apple Music artists.

dataartists[]artistId
string

Stable Apple Music artist identifier.

min 1 chars

dataartists[]displayName
string

Artist display name.

min 1 chars

dataartists[]url
stringnullable

Canonical public Apple Music artist URL when available.

dataartists[]artworkUrl
stringnullable

Best available square artwork image URL when available.

Matching Apple Music albums.

dataalbums[]albumId
string

Stable Apple Music album identifier.

min 1 chars

dataalbums[]title
string

Album title.

min 1 chars

dataalbums[]artistName
stringnullable

Primary artist display name when available.

dataalbums[]url
stringnullable

Canonical public Apple Music album URL when available.

dataalbums[]trackCount
integernullable

Number of tracks on the album when available.

≥ 0

dataalbums[]artworkUrl
stringnullable

Best available square artwork image URL when available.

dataalbums[]explicit
booleannullable

Whether the album is marked explicit when available.

Matching Apple Music songs.

datasongs[]trackId
string

Stable Apple Music song identifier.

min 1 chars

datasongs[]title
string

Song title.

min 1 chars

datasongs[]artistName
stringnullable

Primary artist display name when available.

datasongs[]url
stringnullable

Canonical public Apple Music song URL when available.

datasongs[]durationMs
integernullable

Track duration in milliseconds when available.

≥ 0

datasongs[]artworkUrl
stringnullable

Best available square artwork image URL when available.

datasongs[]explicit
booleannullable

Whether the track is marked explicit when available.

datasongs[]previewUrl
stringnullable

Short audio preview URL when available.

Matching Apple Music playlists.

dataplaylists[]playlistId
string

Stable Apple Music playlist identifier.

min 1 chars

dataplaylists[]title
string

Playlist title.

min 1 chars

dataplaylists[]url
stringnullable

Canonical public Apple Music playlist URL when available.

dataplaylists[]artworkUrl
stringnullable

Best available square artwork image URL when available.

Matching Apple Music stations.

datastations[]stationId
string

Stable Apple Music station identifier.

min 1 chars

datastations[]title
string

Station title.

min 1 chars

datastations[]url
stringnullable

Canonical public Apple Music station URL when available.

datastations[]artworkUrl
stringnullable

Best available square artwork image URL when available.

Matching Apple Music music videos.

datamusicVideos[]musicVideoId
string

Stable Apple Music music video identifier.

min 1 chars

datamusicVideos[]title
string

Music video title.

min 1 chars

datamusicVideos[]artistName
stringnullable

Primary artist display name when available.

datamusicVideos[]url
stringnullable

Canonical public Apple Music music video URL when available.

datamusicVideos[]artworkUrl
stringnullable

Best available square artwork image URL when available.

datamusicVideos[]explicit
booleannullable

Whether the music video is marked explicit when available.

Matching Apple Music radio episodes.

dataradioEpisodes[]radioEpisodeId
string

Stable Apple Music radio episode identifier.

min 1 chars

dataradioEpisodes[]title
string

Radio episode title.

min 1 chars

dataradioEpisodes[]artistName
stringnullable

Primary artist display name when available.

dataradioEpisodes[]url
stringnullable

Canonical public Apple Music radio episode URL when available.

dataradioEpisodes[]artworkUrl
stringnullable

Best available square artwork image URL when available.

dataradioEpisodes[]explicit
booleannullable

Whether the radio episode is marked explicit when available.

datatotalResults
integer

Count of result rows returned in this response across all sections.

≥ 0

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/apple-music/search?query=taylor%20swift" \
  -H "x-api-key: $SOCIALFETCH_API_KEY"

Responses

Search results for the requested query.