Search tracks, albums, and artists via the iTunes catalog. Returns metadata + 30s preview URLs.
searchpassing, 1.7strackpassing, 0.7salbumpassing, 0.9sartistpassing, 1.1s/v1/music:apple-music/search5m cache5 paramschecking key…// npm i zpi-sdk
import { ZpiClient } from "zpi-sdk";
const client = new ZpiClient({ apiKey: "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" });
const data = await client.run("music:apple-music", "search", {
"q": "stereo love",
"type": "track",
"limit": 25,
"page": 1,
"country": "US"
});
console.log(data);curl -X GET "https://api.zpi.web.id/v1/music:apple-music/search?q=stereo+love&type=track&limit=25&page=1&country=US" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"/v1/music:apple-music/searchSearch the catalog by text query.qstringrequiredtypeenumoptionallimitnumberoptionalpagenumberoptionalcountrystringoptionalcurl -X GET "https://api.zpi.web.id/v1/music:apple-music/search?q=stereo+love&type=track&limit=25&page=1&country=US" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"page": 1,
"count": 25,
"items": [
{
"url": "https://music.apple.com/us/album/stereo-love/351996342?i=351996354&uo=4",
"type": "track",
"album": "Stereo Love - EP",
"genre": "Dance",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music/4e/4b/01/mzi.npqfzwyn.jpg/1000x1000bb.jpg",
"title": "Stereo Love",
"artist": "Edward Maya & Vika Jigulina",
"albumId": 351996342,
"country": "USA",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/b1/75/f2/b175f28c-19af-4461-b8c9-bf3df63ed690/mzaf_698653242872365367.plus.aac.p.m4a",
"trackId": 351996354,
"artistId": 318015722,
"discNumber": 1,
"durationMs": 247810,
"isExplicit": false,
"releaseDate": "2009-09-17T07:00:00Z",
"trackNumber": 2,
"isStreamable": true
},
{
"url": "https://music.apple.com/us/album/stereo-love-radio-edit/1712039608?i=1712039609&uo=4",
"type": "track",
"album": "Stereo Love",
"genre": "Dance",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music116/v4/45/33/38/4533387a-c8b5-ac5d-fef7-318af8ac9dee/617465238451.jpg/1000x1000bb.jpg",
"title": "Stereo Love (Radio Edit)",
"artist": "Edward Maya & Vika Jigulina",
"albumId": 1712039608,
"country": "USA",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview116/v4/10/09/c4/1009c40d-7727-5bb0-bb6c-357fe4e6faf6/mzaf_13826604688655549992.plus.aac.p.m4a",
"trackId": 1712039609,
"artistId": 318015722,
"discNumber": 1,
"durationMs": 185120,
"isExplicit": false,
"releaseDate": "2010-01-31T12:00:00Z",
"trackNumber": 1,
"isStreamable": true
},
{
"url": "https://music.apple.com/us/album/stereo-love-feat-vika-jigulina-tiktok/1746904739?i=1746905207&uo=4",
"type": "track",
"album": "Stereo Love Deluxe (feat. Vika Jigulina)",
"genre": "Pop",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/be/bb/19/bebb1911-10d6-1223-d32c-99f4ac63e822/6420565479716.jpg/1000x1000bb.jpg",
"title": "Stereo Love (feat. Vika Jigulina) [TikTok]",
"artist": "Edward Maya",
"albumId": 1746904739,
"country": "USA",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview221/v4/a7/82/7c/a7827cd1-e327-234f-15bb-c090d901c8e8/mzaf_3216352783463090977.plus.aac.p.m4a",
"trackId": 1746905207,
"artistId": 318015722,
"discNumber": 1,
"durationMs": 215500,
"isExplicit": false,
"releaseDate": "2024-06-05T12:00:00Z",
"trackNumber": 5,
"isStreamable": true
}
],
"query": "stereo love",
"hasMore": false
}/v1/music:apple-music/track/:idFetch full metadata for a single track by ID or URL.idstringrequiredin pathcountrystringoptionalcurl -X GET "https://api.zpi.web.id/v1/music:apple-music/track/351996354?country=US" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"url": "https://music.apple.com/us/album/stereo-love/351996342?i=351996354&uo=4",
"album": "Stereo Love - EP",
"genre": "Dance",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music/4e/4b/01/mzi.npqfzwyn.jpg/1000x1000bb.jpg",
"price": 1.29,
"title": "Stereo Love",
"artist": "Edward Maya & Vika Jigulina",
"albumId": 351996342,
"country": "USA",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/b1/75/f2/b175f28c-19af-4461-b8c9-bf3df63ed690/mzaf_698653242872365367.plus.aac.p.m4a",
"trackId": 351996354,
"albumUrl": "https://music.apple.com/us/album/stereo-love/351996342?i=351996354&uo=4",
"artistId": 318015722,
"currency": "USD",
"artistUrl": "https://music.apple.com/us/artist/edward-maya/318015722?uo=4",
"discCount": 1,
"discNumber": 1,
"durationMs": 247810,
"isExplicit": false,
"trackCount": 6,
"releaseDate": "2009-09-17T07:00:00Z",
"trackNumber": 2,
"isStreamable": true
}/v1/music:apple-music/album/:idFetch album info with its tracklist.idstringrequiredin pathcountrystringoptionalcurl -X GET "https://api.zpi.web.id/v1/music:apple-music/album/1499378108?country=US" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"url": "https://music.apple.com/us/album/after-hours/1499378108?uo=4",
"type": "Album",
"genre": "R&B/Soul",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music125/v4/6f/bc/e6/6fbce6c4-c38c-72d8-4fd0-66cfff32f679/20UMGIM12176.rgb.jpg/1000x1000bb.jpg",
"price": 11.99,
"title": "After Hours",
"artist": "The Weeknd",
"tracks": [
{
"url": "https://music.apple.com/us/album/alone-again/1499378108?i=1499378115&uo=4",
"title": "Alone Again",
"artist": "The Weeknd",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/82/52/4d/82524d29-5e72-7988-3157-35cfa1fdf8a3/mzaf_9428890031202476397.plus.aac.p.m4a",
"trackId": 1499378115,
"artistId": 479756766,
"discNumber": 1,
"durationMs": 250057,
"isExplicit": true,
"trackNumber": 1,
"isStreamable": true
},
{
"url": "https://music.apple.com/us/album/too-late/1499378108?i=1499378125&uo=4",
"title": "Too Late",
"artist": "The Weeknd",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/ff/73/cc/ff73cc6f-ef5c-b3bb-c5ef-93802f3f95b0/mzaf_14572003710782904344.plus.aac.p.m4a",
"trackId": 1499378125,
"artistId": 479756766,
"discNumber": 1,
"durationMs": 239980,
"isExplicit": true,
"trackNumber": 2,
"isStreamable": true
},
{
"url": "https://music.apple.com/us/album/hardest-to-love/1499378108?i=1499378134&uo=4",
"title": "Hardest To Love",
"artist": "The Weeknd",
"preview": "https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview211/v4/c3/d4/3c/c3d43c94-ed8b-f8ce-bdd1-c2039a7f7dcf/mzaf_15057603390522654879.plus.aac.p.m4a",
"trackId": 1499378134,
"artistId": 479756766,
"discNumber": 1,
"durationMs": 211402,
"isExplicit": true,
"trackNumber": 3,
"isStreamable": true
}
],
"albumId": 1499378108,
"country": "USA",
"artistId": 479756766,
"currency": "USD",
"artistUrl": "https://music.apple.com/us/artist/the-weeknd/479756766?uo=4",
"copyright": "℗ 2020 The Weeknd XO, Inc., marketed by Republic Records, a division of UMG Recordings, Inc.",
"isExplicit": true,
"trackCount": 14,
"releaseDate": "2020-03-20T07:00:00Z",
"totalDurationMs": 3377560,
"contentAdvisoryRating": "Explicit"
}/v1/music:apple-music/artist/:idFetch artist profile with top tracks and discography.idstringrequiredin pathlimitnumberoptionalcountrystringoptionalcurl -X GET "https://api.zpi.web.id/v1/music:apple-music/artist/479756766?limit=25&country=US" \
-H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"{
"url": "https://music.apple.com/us/artist/the-weeknd/479756766?uo=4",
"name": "The Weeknd",
"type": "Artist",
"genre": "R&B/Soul",
"albums": [
{
"url": "https://music.apple.com/us/album/hurry-up-tomorrow/1793654348?uo=4",
"type": "Album",
"genre": "R&B/Soul",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music211/v4/49/9b/6e/499b6e2d-648f-1a4e-31b8-fb7f06a8123c/25UMGIM09490.rgb.jpg/1000x1000bb.jpg",
"price": 9.99,
"title": "Hurry Up Tomorrow",
"albumId": 1793654348,
"country": "USA",
"currency": "USD",
"copyright": "℗ 2025 The Weeknd XO Music ULC, marketed by Republic Records, a division of UMG Recordings, Inc.",
"isExplicit": true,
"trackCount": 22,
"releaseDate": "2025-01-31T08:00:00Z"
},
{
"url": "https://music.apple.com/us/album/timeless-single/1770380869?uo=4",
"type": "Album",
"genre": "R&B/Soul",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music221/v4/40/77/cb/4077cbd1-b6a0-d8df-b9d3-e9a339dbc0ea/24UM1IM04061.rgb.jpg/1000x1000bb.jpg",
"price": 1.29,
"title": "Timeless - Single",
"albumId": 1770380869,
"country": "USA",
"currency": "USD",
"copyright": "℗ 2024 The Weeknd XO Music ULC, marketed by Republic Records, a division of UMG Recordings, Inc.",
"isExplicit": true,
"trackCount": 1,
"releaseDate": "2024-09-27T07:00:00Z"
},
{
"url": "https://music.apple.com/us/album/the-idol-episode-5-part-1-music-from-the-hbo/1694779180?uo=4",
"type": "Album",
"genre": "Soundtrack",
"image": "https://is1-ssl.mzstatic.com/image/thumb/Music116/v4/92/91/eb/9291eb77-060f-125f-ee0d-bdc720fa6971/23UMGIM74968.rgb.jpg/1000x1000bb.jpg",
"price": 1.99,
"title": "The Idol Episode 5 Part 1 (Music from the HBO Original Series) - Single",
"albumId": 1694779180,
"country": "USA",
"currency": "USD",
"copyright": "℗ 2023 The Weeknd XO, Inc., marketed by Republic Records, a division of UMG Recordings, Inc.",
"isExplicit": true,
"trackCount": 2,
"releaseDate": "2023-06-30T07:00:00Z"
}
],
"genreId": 15,
"artistId": 479756766,
"albumCount": 23
}