# Spotify — Zapi reference > Search tracks, albums, and artists on Spotify. Returns metadata + 30s preview URLs. Full audio is DRM-protected. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/music/spotify - Endpoint catalog: https://zpi.web.id/category/music - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Spotify **Category:** music · **Slug:** `spotify` **Detail page:** https://zpi.web.id/api/music/spotify Search tracks, albums, and artists on Spotify. Returns metadata + 30s preview URLs. Full audio is DRM-protected. **Tags:** music, metadata, search, preview ### Search Search the catalog by text query. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/music:spotify/search` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `q` | string | query | yes | Search query | | `type` | enum(track|album|artist|all) | query | no | Filter: track\|album\|artist\|all. Default all | | `page` | number | query | no | Page 1-based, 20 items per page. Default 1 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/music:spotify/search?q=blinding%20lights&type=track&page=1" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/music:spotify/search?q=blinding%20lights&type=track&page=1", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/music:spotify/search?q=blinding%20lights&type=track&page=1", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "page": 1, "count": 20, "items": [ { "uri": "spotify:track:0VjIjW4GlUZAMYd2vXMi3b", "url": "https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b", "album": "After Hours", "image": "https://i.scdn.co/image/ab67616d00001e028863bc11d2aa12b54f5aeb36", "title": "Blinding Lights", "artist": "The Weeknd", "trackId": "0VjIjW4GlUZAMYd2vXMi3b", "albumUri": "spotify:album:4yP0hdKOZPNshxUOjY0cZj", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ" ], "durationMs": 200040 }, { "uri": "spotify:track:6qYkmqFsXbj8CQjAdbYz07", "url": "https://open.spotify.com/track/6qYkmqFsXbj8CQjAdbYz07", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e02a3eff72f62782fb589a492f9", "title": "Blinding Lights", "artist": "The Weeknd", "trackId": "6qYkmqFsXbj8CQjAdbYz07", "albumUri": "spotify:album:3sL9Myf7JF1k9TbrXE46ou", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ" ], "durationMs": 200045 }, { "uri": "spotify:track:3KkXRkHbMCARz0aVfEt68P", "url": "https://open.spotify.com/track/3KkXRkHbMCARz0aVfEt68P", "album": "Spider-Man: Into the Spider-Verse (Soundtrack From & Inspired by the Motion Picture)", "image": "https://i.scdn.co/image/ab67616d00001e02e2e352d89826aef6dbd5ff8f", "title": "Sunflower - Spider-Man: Into the Spider-Verse", "artist": "Post Malone, Swae Lee", "trackId": "3KkXRkHbMCARz0aVfEt68P", "albumUri": "spotify:album:35s58BRTGAEWztPo9WqCIs", "playable": true, "artistIds": [ "246dkjvS1zLTtiykXe5h60", "1zNqQNIdeOUZHb8zbZRFMX" ], "durationMs": 158040 }, { "uri": "spotify:track:7qiZfU4dY1lWllzX7mPBI3", "url": "https://open.spotify.com/track/7qiZfU4dY1lWllzX7mPBI3", "album": "÷ (Deluxe)", "image": "https://i.scdn.co/image/ab67616d00001e02ba5db46f4b838ef6027e6f96", "title": "Shape of You", "artist": "Ed Sheeran", "trackId": "7qiZfU4dY1lWllzX7mPBI3", "albumUri": "spotify:album:3T4tUhGYeRNVUGevb0wThu", "playable": true, "artistIds": [ "6eUKZXaKkcviH0Ku9w2n3V" ], "durationMs": 233712 }, { "uri": "spotify:track:7MXVkk9YMctZqd1Srtv4MB", "url": "https://open.spotify.com/track/7MXVkk9YMctZqd1Srtv4MB", "album": "Starboy", "image": "https://i.scdn.co/image/ab67616d00001e024718e2b124f79258be7bc452", "title": "Starboy", "artist": "The Weeknd, Daft Punk", "trackId": "7MXVkk9YMctZqd1Srtv4MB", "albumUri": "spotify:album:2ODvWsOgouMbaA5xf0RkJe", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ", "4tZwfgrHOc3mvqYlEYSvVi" ], "durationMs": 230453 }, { "uri": "spotify:track:5QO79kh1waicV47BqGRL3g", "url": "https://open.spotify.com/track/5QO79kh1waicV47BqGRL3g", "album": "After Hours", "image": "https://i.scdn.co/image/ab67616d00001e028863bc11d2aa12b54f5aeb36", "title": "Save Your Tears", "artist": "The Weeknd", "trackId": "5QO79kh1waicV47BqGRL3g", "albumUri": "spotify:album:4yP0hdKOZPNshxUOjY0cZj", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ" ], "durationMs": 215626 }, { "uri": "spotify:track:4Dvkj6JhhA12EX05fT7y2e", "url": "https://open.spotify.com/track/4Dvkj6JhhA12EX05fT7y2e", "album": "Harry's House", "image": "https://i.scdn.co/image/ab67616d00001e0282ce362511fb3d9dda6578ee", "title": "As It Was", "artist": "Harry Styles", "trackId": "4Dvkj6JhhA12EX05fT7y2e", "albumUri": "spotify:album:5r36AJ6VOJtp00oxSkBZ5h", "playable": true, "artistIds": [ "6KImCVD70vtIoJWnq6nGn3" ], "durationMs": 167303 }, { "uri": "spotify:track:4xoUj7el3FsZtpjTXBo5eo", "url": "https://open.spotify.com/track/4xoUj7el3FsZtpjTXBo5eo", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e02a607fdaf33067979f772b72e", "title": "Blinding Lights - slowed to perfection", "artist": "TommyMuzzic", "trackId": "4xoUj7el3FsZtpjTXBo5eo", "albumUri": "spotify:album:0zeTkHoEfrUJnuVV2JJ192", "playable": true, "artistIds": [ "2XqXXH9xPa1zucIOtZ3u3A" ], "durationMs": 251599 }, { "uri": "spotify:track:39LLxExYz6ewLAcYrzQQyP", "url": "https://open.spotify.com/track/39LLxExYz6ewLAcYrzQQyP", "album": "Future Nostalgia", "image": "https://i.scdn.co/image/ab67616d00001e02c88bae7846e62a8ba59ee0bd", "title": "Levitating", "artist": "Dua Lipa", "trackId": "39LLxExYz6ewLAcYrzQQyP", "albumUri": "spotify:album:7fJJK56U9fHixgO0HQkhtI", "playable": true, "artistIds": [ "6M2wZ9GZgrQXHCFfjv46we" ], "durationMs": 203807 }, { "uri": "spotify:track:5OGxg1400HmCYVRHuccZWw", "url": "https://open.spotify.com/track/5OGxg1400HmCYVRHuccZWw", "album": "Live At SoFi Stadium", "image": "https://i.scdn.co/image/ab67616d00001e02308f9319a3d6f6737f43b3fc", "title": "Blinding Lights - Live", "artist": "The Weeknd", "trackId": "5OGxg1400HmCYVRHuccZWw", "albumUri": "spotify:album:1OARrXe5sB0gyy3MhQ8h92", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ" ], "durationMs": 253365 }, { "uri": "spotify:track:4eQO9RHTjYT1O9DTuZLj9v", "url": "https://open.spotify.com/track/4eQO9RHTjYT1O9DTuZLj9v", "album": "After Hours (Deluxe)", "image": "https://i.scdn.co/image/ab67616d00001e02ef017e899c0547766997d874", "title": "Blinding Lights", "artist": "The Weeknd", "trackId": "4eQO9RHTjYT1O9DTuZLj9v", "albumUri": "spotify:album:742eAldb4AJKLoPgJhGRE7", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ" ], "durationMs": 200045 }, { "uri": "spotify:track:66aMnwdhkEc1V0AAnyYchX", "url": "https://open.spotify.com/track/66aMnwdhkEc1V0AAnyYchX", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e02823928998239171c2ed2025e", "title": "Blinding Lights", "artist": "Teddy Swims", "trackId": "66aMnwdhkEc1V0AAnyYchX", "albumUri": "spotify:album:4vh9LW3igRT6NayBnmb8fZ", "playable": true, "artistIds": [ "33qOK5uJ8AR2xuQQAhHump" ], "durationMs": 214874 }, { "uri": "spotify:track:2uJw7yR61snp7s39YmUyhf", "url": "https://open.spotify.com/track/2uJw7yR61snp7s39YmUyhf", "album": "Blinding Memories of Somebody (Piano Version)", "image": "https://i.scdn.co/image/ab67616d00001e02fccf14717ce47337429a2d3e", "title": "Blinding Lights - Piano Version", "artist": "Oscar Lento", "trackId": "2uJw7yR61snp7s39YmUyhf", "albumUri": "spotify:album:6yR6vdpMAyioyBjf06sq30", "playable": true, "artistIds": [ "6nLF52FpYyNb4mJMaXFggH" ], "durationMs": 158858 }, { "uri": "spotify:track:7MXgrcOQAJ5VwSNUL0lDd3", "url": "https://open.spotify.com/track/7MXgrcOQAJ5VwSNUL0lDd3", "album": "Blinding Lights (Remix)", "image": "https://i.scdn.co/image/ab67616d00001e024abb0f8259dc9f2feb0dfe18", "title": "Blinding Lights (with ROSALÍA) - Remix", "artist": "The Weeknd, ROSALÍA", "trackId": "7MXgrcOQAJ5VwSNUL0lDd3", "albumUri": "spotify:album:7B70Z32Ha84aMT6TOnW410", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ", "7ltDVBr6mKbRvohxheJ9h1" ], "durationMs": 216123 }, { "uri": "spotify:track:0cQJGoRki2avKVodXEmr0d", "url": "https://open.spotify.com/track/0cQJGoRki2avKVodXEmr0d", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e02d05452b40e91b57aadffd16b", "title": "Blinding Lights", "artist": "Loi", "trackId": "0cQJGoRki2avKVodXEmr0d", "albumUri": "spotify:album:6pQZPa398NswBXGYyqHH7y", "playable": true, "artistIds": [ "574qIjE9UTvfSvtnIrdLaE" ], "durationMs": 147368 }, { "uri": "spotify:track:5k5p7GJXYBgxsBklryE3MO", "url": "https://open.spotify.com/track/5k5p7GJXYBgxsBklryE3MO", "album": "blinding lights", "image": "https://i.scdn.co/image/ab67616d00001e02f9b66f0de00a0cb57dbf5e7f", "title": "blinding lights", "artist": "main character melodies", "trackId": "5k5p7GJXYBgxsBklryE3MO", "albumUri": "spotify:album:5ZltHmYPe8nmGuaeoK9AvQ", "playable": true, "artistIds": [ "5ZriKcqfMbukob27Q2Vi5B" ], "durationMs": 123000 }, { "uri": "spotify:track:68kQQv6idXUcXIf1n59Y3i", "url": "https://open.spotify.com/track/68kQQv6idXUcXIf1n59Y3i", "album": "Blinding Lights (Major Lazer Remix)", "image": "https://i.scdn.co/image/ab67616d00001e02cddd966766ba3b2bc20fa991", "title": "Blinding Lights - Major Lazer Remix", "artist": "The Weeknd, Major Lazer", "trackId": "68kQQv6idXUcXIf1n59Y3i", "albumUri": "spotify:album:74hsEs8mQoNkB6NwgrgV3s", "playable": true, "artistIds": [ "1Xyo4u8uXC1ZmMpatF05PJ", "738wLrAtLtCtFOLvQBXOXp" ], "durationMs": 197961 }, { "uri": "spotify:track:0ozyv9adSVDED8Emhd8hfu", "url": "https://open.spotify.com/track/0ozyv9adSVDED8Emhd8hfu", "album": "Blinding Lights (Piano Version)", "image": "https://i.scdn.co/image/ab67616d00001e02fbed92420acc0b9cedfce7f6", "title": "Blinding Lights - Piano Version", "artist": "Flying Fingers, Piano Tribute Players", "trackId": "0ozyv9adSVDED8Emhd8hfu", "albumUri": "spotify:album:2ektqBOgstESA5KX3CxdYU", "playable": true, "artistIds": [ "1jUIOsS9vK91Nc9qYvpEab", "4Xx6QMLTWppMwdABkN0Afj" ], "durationMs": 121000 }, { "uri": "spotify:track:0lyj9SQRKOg5hEOUzkmwZd", "url": "https://open.spotify.com/track/0lyj9SQRKOg5hEOUzkmwZd", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e0207067430a13bf424b48cb3cb", "title": "Blinding Lights", "artist": "Adrienne Clotard", "trackId": "0lyj9SQRKOg5hEOUzkmwZd", "albumUri": "spotify:album:3kUQ3M6Dw3X8bD2aDxlpJg", "playable": true, "artistIds": [ "48yNGJAgVQrkppL5jK0wn1" ], "durationMs": 188285 }, { "uri": "spotify:track:1iiY7nosB0s7L8KiozCba5", "url": "https://open.spotify.com/track/1iiY7nosB0s7L8KiozCba5", "album": "Blinding Lights", "image": "https://i.scdn.co/image/ab67616d00001e02c77361c5801fd36675c6b468", "title": "Blinding Lights", "artist": "Claytin", "trackId": "1iiY7nosB0s7L8KiozCba5", "albumUri": "spotify:album:60rLM56nTYuEYK4UYb07y9", "playable": true, "artistIds": [ "6ejnoGLjl7ECsHeoS3un5U" ], "durationMs": 192443 } ], "total": 1000, "hasMore": true, "nextPage": 2 } ``` --- ### Track Detail Fetch full metadata for a single track by ID or URL. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/music:spotify/track/:id` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `id` | string | path | yes | Track ID (22-char base62), URI form, or full track URL | **cURL:** ```bash curl "https://api.zpi.web.id/v1/music:spotify/track/:id" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/music:spotify/track/:id", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/music:spotify/track/:id", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "url": "https://open.spotify.com/track/11dFghVXANMlKmJXsNCbNl", "image": "https://image-cdn-ak.spotifycdn.com/image/ab67616d0000b2733188158b6cfdc17994be4c5f", "title": "Cut To The Feeling", "artist": "Carly Rae Jepsen", "artists": [ { "id": "6sFIWsNpZYqfjUpaCgueju", "url": "https://open.spotify.com/artist/6sFIWsNpZYqfjUpaCgueju", "name": "Carly Rae Jepsen" } ], "preview": "https://p.scdn.co/mp3-preview/c011f4a360ae0ec93b366b5f328a17b2c5ae118d", "trackId": "11dFghVXANMlKmJXsNCbNl", "hasVideo": false, "durationMs": 207959, "isExplicit": false, "isPlayable": true, "releaseDate": "2017-05-26", "isNineteenPlus": false } ``` --- ### Album Detail Fetch album info with its tracklist. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/music:spotify/album/:id` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `id` | string | path | yes | Album ID (22-char base62), URI form, or full album URL | **cURL:** ```bash curl "https://api.zpi.web.id/v1/music:spotify/album/:id" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/music:spotify/album/:id", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/music:spotify/album/:id", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "url": "https://open.spotify.com/album/4yP0hdKOZPNshxUOjY0cZj", "image": "https://image-cdn-ak.spotifycdn.com/image/ab67616d0000b2738863bc11d2aa12b54f5aeb36", "title": "After Hours", "artist": "The Weeknd", "tracks": [ { "url": "https://open.spotify.com/track/6b5P51m8xx2XA6U7sdNZ5E", "title": "Alone Again", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/77e54c6064335e259d0f571768af5f96c22304d4", "trackId": "6b5P51m8xx2XA6U7sdNZ5E", "durationMs": 250053, "isExplicit": true, "trackNumber": 1 }, { "url": "https://open.spotify.com/track/2K9Ovn1o2bTGqbsABGC6m3", "title": "Too Late", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/2b7a3f91db7e2ce0526b45bc878c5277eb3df28a", "trackId": "2K9Ovn1o2bTGqbsABGC6m3", "durationMs": 239973, "isExplicit": true, "trackNumber": 2 }, { "url": "https://open.spotify.com/track/6kWxIqQDsKFYCJGbU4AjCX", "title": "Hardest To Love", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/0271808f406491a32f3ca28e11aa5faf600adf88", "trackId": "6kWxIqQDsKFYCJGbU4AjCX", "durationMs": 211400, "isExplicit": true, "trackNumber": 3 }, { "url": "https://open.spotify.com/track/4BGZF4oLbTL0pWm7C18pbv", "title": "Scared To Live", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/1682f650068ad5659508370192cc7854b454d166", "trackId": "4BGZF4oLbTL0pWm7C18pbv", "durationMs": 191306, "isExplicit": true, "trackNumber": 4 }, { "url": "https://open.spotify.com/track/3WlbeuhfRSqU7ylK2Ui5U7", "title": "Snowchild", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/145a6811b2f7d2489e50c1845ed47cfb5d8c4d8d", "trackId": "3WlbeuhfRSqU7ylK2Ui5U7", "durationMs": 247186, "isExplicit": true, "trackNumber": 5 }, { "url": "https://open.spotify.com/track/1sOW4PuG5X3Ie3EXUhAopJ", "title": "Escape From LA", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/098a07649cf6db99f150930fd732c2733cc2be90", "trackId": "1sOW4PuG5X3Ie3EXUhAopJ", "durationMs": 355960, "isExplicit": true, "trackNumber": 6 }, { "url": "https://open.spotify.com/track/6bnF93Rx87YqUBLSgjiMU8", "title": "Heartless", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/ffe5646cbee66e2a1bf7e0472cfed0ad777232b4", "trackId": "6bnF93Rx87YqUBLSgjiMU8", "durationMs": 198266, "isExplicit": true, "trackNumber": 7 }, { "url": "https://open.spotify.com/track/3orEOtd8CPL8GFlpRpKuoE", "title": "Faith", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/dd93b587cac54ed11b207dd704236fde6516512e", "trackId": "3orEOtd8CPL8GFlpRpKuoE", "durationMs": 283226, "isExplicit": true, "trackNumber": 8 }, { "url": "https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b", "title": "Blinding Lights", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/51c08d92815cce4ac2de94a7335a430b81234624", "trackId": "0VjIjW4GlUZAMYd2vXMi3b", "durationMs": 200040, "isExplicit": false, "trackNumber": 9 }, { "url": "https://open.spotify.com/track/7szuecWAPwGoV1e5vGu8tl", "title": "In Your Eyes", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/ad4adb8a7c82359d511f7d9900d9f3742e0d2932", "trackId": "7szuecWAPwGoV1e5vGu8tl", "durationMs": 237520, "isExplicit": true, "trackNumber": 10 }, { "url": "https://open.spotify.com/track/5QO79kh1waicV47BqGRL3g", "title": "Save Your Tears", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/4bb5ee4441a2342502372f80f78a92cf3fe22549", "trackId": "5QO79kh1waicV47BqGRL3g", "durationMs": 215626, "isExplicit": true, "trackNumber": 11 }, { "url": "https://open.spotify.com/track/40U8d12pC5UHqmHwXjHjjl", "title": "Repeat After Me (Interlude)", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/14171ddd9559bd25ed882ff1f62c9ad16a4c0f93", "trackId": "40U8d12pC5UHqmHwXjHjjl", "durationMs": 195813, "isExplicit": true, "trackNumber": 12 }, { "url": "https://open.spotify.com/track/2p8IUWQDrpjuFltbdgLOag", "title": "After Hours", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/2375bc6998d765b02b229ff44e5c3d7b75fff74a", "trackId": "2p8IUWQDrpjuFltbdgLOag", "durationMs": 361026, "isExplicit": false, "trackNumber": 13 }, { "url": "https://open.spotify.com/track/2BcnxwxBuar5wjCaLqm5N3", "title": "Until I Bleed Out", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/6afac5b510ec7203bcfa68c2c06bf89b36f1ed54", "trackId": "2BcnxwxBuar5wjCaLqm5N3", "durationMs": 190173, "isExplicit": true, "trackNumber": 14 } ], "albumId": "4yP0hdKOZPNshxUOjY0cZj", "isExplicit": false, "popularity": 0, "totalTracks": 14 } ``` --- ### Artist Detail Fetch artist profile with top tracks and discography. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/music:spotify/artist/:id` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `id` | string | path | yes | Artist ID (22-char base62), URI form, or full artist URL | | `albumsLimit` | number | query | no | Number of albums to fetch (1-50). Default 20 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/music:spotify/artist/:id?albumsLimit=20" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/music:spotify/artist/:id?albumsLimit=20", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/music:spotify/artist/:id?albumsLimit=20", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "url": "https://open.spotify.com/artist/1Xyo4u8uXC1ZmMpatF05PJ", "name": "The Weeknd", "image": "https://image-cdn-fa.spotifycdn.com/image/ab6761610000e5ebc1719ac9e6a75c1c25835018", "artistId": "1Xyo4u8uXC1ZmMpatF05PJ", "followers": 0, "topTracks": [ { "url": "https://open.spotify.com/track/7MXVkk9YMctZqd1Srtv4MB", "title": "Starboy", "artist": "The Weeknd, Daft Punk", "preview": "https://p.scdn.co/mp3-preview/57c1238d183c40da3157c2892346f58445b1377c", "trackId": "7MXVkk9YMctZqd1Srtv4MB", "durationMs": 230453, "isExplicit": true }, { "url": "https://open.spotify.com/track/7CyPwkp0oE8Ro9Dd5CUDjW", "title": "One Of The Girls (with JENNIE, Lily Rose Depp)", "artist": "The Weeknd, JENNIE, Lily-Rose Depp", "preview": "https://p.scdn.co/mp3-preview/e5bb7776aff44435b938eb084b2eca23e6c7f5ed", "trackId": "7CyPwkp0oE8Ro9Dd5CUDjW", "durationMs": 244684, "isExplicit": false }, { "url": "https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b", "title": "Blinding Lights", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/51c08d92815cce4ac2de94a7335a430b81234624", "trackId": "0VjIjW4GlUZAMYd2vXMi3b", "durationMs": 200040, "isExplicit": false }, { "url": "https://open.spotify.com/track/0FIDCNYYjNvPVimz5icugS", "title": "Timeless (feat Playboi Carti)", "artist": "The Weeknd, Playboi Carti", "preview": "https://p.scdn.co/mp3-preview/c27493ac0bcb3deb72a8e814ab6c7e8686cd2324", "trackId": "0FIDCNYYjNvPVimz5icugS", "durationMs": 256000, "isExplicit": true }, { "url": "https://open.spotify.com/track/2LBqCSwhJGcFQeTHMVGwy3", "title": "Die For You", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/e2e1b4ba70ff241ce2ce7283a8f4c3cb086ac0bd", "trackId": "2LBqCSwhJGcFQeTHMVGwy3", "durationMs": 260253, "isExplicit": false }, { "url": "https://open.spotify.com/track/5J4ZkQpzMUFojo1CtAZYpn", "title": "Love Me Harder", "artist": "Ariana Grande, The Weeknd", "preview": "https://p.scdn.co/mp3-preview/16f1d643c2378d5f2911042bacb5bb00aba766e7", "trackId": "5J4ZkQpzMUFojo1CtAZYpn", "durationMs": 236133, "isExplicit": false }, { "url": "https://open.spotify.com/track/7fBv7CLKzipRk6EC6TWHOB", "title": "The Hills", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/30a8d26fa2b2e9a5a01007d71783510180e677ab", "trackId": "7fBv7CLKzipRk6EC6TWHOB", "durationMs": 242253, "isExplicit": true }, { "url": "https://open.spotify.com/track/5QO79kh1waicV47BqGRL3g", "title": "Save Your Tears", "artist": "The Weeknd", "preview": "https://p.scdn.co/mp3-preview/4bb5ee4441a2342502372f80f78a92cf3fe22549", "trackId": "5QO79kh1waicV47BqGRL3g", "durationMs": 215626, "isExplicit": true }, { "url": "https://open.spotify.com/track/1oFAF1hdPOickyHgbuRjyX", "title": "Save Your Tears (Remix) (with Ariana Grande) - Bonus Track", "artist": "The Weeknd, Ariana Grande", "preview": "https://p.scdn.co/mp3-preview/111eb776b2884b2940e31b769f5dd99e8cc6ce6c", "trackId": "1oFAF1hdPOickyHgbuRjyX", "durationMs": 191013, "isExplicit": false }, { "url": "https://open.spotify.com/track/0VO8gYVDSwM1Qdd2GsMoYK", "title": "Moth To A Flame (with The Weeknd)", "artist": "Swedish House Mafia, The Weeknd", "preview": "https://p.scdn.co/mp3-preview/1115f3c666a5ec714e6c3a29121c863720c4059c", "trackId": "0VO8gYVDSwM1Qdd2GsMoYK", "durationMs": 234000, "isExplicit": false } ], "popularity": 0, "albumsCount": 0, "topTracksCount": 10 } ``` --- _Generated: 2026-08-02T14:26:04.530Z_