API · Apple Music
GET /applemusic/search
Search Apple Music for artists, albums, songs and music videos.
| Request | GET /v1/applemusic/search |
| Operation id | applemusic.search.all |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Search Apple Music for artists, albums, songs and music videos.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | yes | Search words. Example: taylor swift. |
type | string | no | Kinds to search: artist, album, song, music-video. |
limit | integer | no | Results per kind (default 10). |
country | string | no | Storefront, ISO 3166-1 alpha-2 in any case (default us, or the link’s). uk reads as gb. Example: gb. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | Matches by kind. | AppleMusicSearchResponse |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | No Apple Music item by that id in that storefront. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | Apple Music is temporarily unavailable. Retryable; nothing was charged. | Error |
AppleMusicSearchResponse fields
| Field | Type | Description |
|---|---|---|
artists | AppleMusicArtist[] | |
albums | AppleMusicAlbum[] | |
songs | AppleMusicTrack[] | |
music_videos | AppleMusicTrack[] |
Errors use one shape everywhere; see Errors for every code and what to do.