Sources › Music › Spotify › Search

Spotify Search API

Search the catalog by text query.

SpotifyGET /searchAll plans2 Zap

Request

GET
https://api.zapi.ink/v1/music:spotify/search

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.

Parameters

NameTypeInRequiredDescription
qstringqueryYesSearch query Example: blinding lights
typeenum: track | album | artist | allqueryNoFilter: track|album|artist|all. Default all Example: track
pagenumberqueryNoPage 1-based, 20 items per page. Default 1 Example: 1

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/music:spotify/search?q=blinding+lights&type=track&page=1" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/music:spotify/search?q=blinding+lights&type=track&page=1", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/music:spotify/search",
    params={"q":"blinding lights","type":"track","page":"1"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "music:spotify",
  "data": {
    "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
      }
    ],
    "total": 1000,
    "hasMore": true,
    "nextPage": 2
  },
  "timestamp": "2026-05-27T13:27:15Z"
}

Frequently asked questions

How do I call the Spotify Search API?

Send a GET request to https://api.zapi.ink/v1/music:spotify/search?q=blinding+lights with your Zapi key in the x-api-key header. Parameters — required: q; optional: type, page. The response is JSON in the { project, data, timestamp } envelope.

What does the Spotify Search API return?

Search the catalog by text query. The example response has the fields page, count, items, total, hasMore, nextPage. Each item in items has fields such as uri, url, album, image, title, artist, trackId, albumUri.

Is the Spotify Search API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 2 Zap. Paid plans raise the limits.

Can an AI assistant call the Spotify Search API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "spotify" and endpoint "search".

What other Spotify API endpoints are there?

It has 3 endpoints. Besides Search: Track Detail, Album Detail.