Spotify
GET /v1/spotify/search

Spotify Search API

Search Spotify programmatically and get structured, ranked results.

2 credits per request
TL;DR
Search Spotify programmatically and get structured, ranked results. The Spotify Search API (Spotify) is a single authenticated GET request to /v1/spotify/search that responds with clean JSON and costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the Spotify Search API?

The Spotify Search API lets you search and return matching results for Spotify search with a single REST call. No OAuth, no infrastructure to maintain, and no platform SDKs — send the request, get clean structured JSON back. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh.

What you get

  • Ranked, structured result list
  • Title, URL, author, and thumbnail per result when available
  • Engagement metrics where the platform exposes them
  • Configurable result limit

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
curl "https://api.captapi.com/v1/spotify/search?q=lofi%20beats" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "success": true,
  "data": {
    "platform": "spotify",
    "query": "lofi beats",
    "type": "tracks",
    "totalReturned": 5,
    "results": [
      {
        "platform": "spotify",
        "type": "track",
        "uri": "1S7FNazOUQc21EaQyh5nJT",
        "url": "https://open.spotify.com/track/1S7FNazOUQc21EaQyh5nJT",
        "name": "Nightmote - Lofi Remix",
        "artists": [
          "Yoylecake Michael",
          "111robloxdude"
        ],
        "album": "Nightmote (Lofi Remix)",
        "durationMs": 207620,
        "image": "https://i.scdn.co/image/ab67616d0000b2735d372fc451453e8b83900014",
        "raw": {
          "type": "track",
          "id": "1S7FNazOUQc21EaQyh5nJT",
          "name": "Nightmote - Lofi Remix",
          "artists": "Yoylecake Michael, 111robloxdude",
          "albumName": "Nightmote (Lofi Remix)",
          "albumArt": "https://i.scdn.co/image/ab67616d0000b2735d372fc451453e8b83900014",
          "duration": 207620,
          "durationFormatted": "3:27",
          "isExplicit": false,
          "isPlayable": true,
          "url": "https://open.spotify.com/track/1S7FNazOUQc21EaQyh5nJT",
          "scrapedAt": "2026-07-18T11:28:01.801Z",
          "searchTerm": "lofi beats"
        }
      },
      {
        "platform": "spotify",
        "type": "track",
        "uri": "6AOXQYGPpd7KIIBxCCZzUx",
        "url": "https://open.spotify.com/track/6AOXQYGPpd7KIIBxCCZzUx",
        "name": "Lofi Beats",
        "artists": [
          "Lofi Sleep Chill & Study"
        ],
        "album": "Wave Heart: Chill Lofi Music",
        "durationMs": 120000,
        "image": "https://i.scdn.co/image/ab67616d0000b27391027e42977d144b3db3f705",
        "raw": {
          "type": "track",
          "id": "6AOXQYGPpd7KIIBxCCZzUx",
          "name": "Lofi Beats",
          "artists": "Lofi Sleep Chill & Study",
          "albumName": "Wave Heart: Chill Lofi Music",
          "albumArt": "https://i.scdn.co/image/ab67616d0000b27391027e42977d144b3db3f705",
          "duration": 120000,
          "durationFormatted": "2:00",
          "isExplicit": false,
          "isPlayable": true,
          "url": "https://open.spotify.com/track/6AOXQYGPpd7KIIBxCCZzUx",
          "scrapedAt": "2026-07-18T11:28:01.901Z",
          "searchTerm": "lofi beats"
        }
      },
      {
        "platform": "spotify",
        "type": "track",
        "uri": "5yw15MbdXGw2ngbqmd7E3m",
        "url": "https://open.spotify.com/track/5yw15MbdXGw2ngbqmd7E3m",
        "name": "Lofi Beats",
        "artists": [
          "Lo Fi Hip Hop"
        ],
        "album": "Lofi Dreams: Soft Lofi Beats",
        "durationMs": 120000,
        "image": "https://i.scdn.co/image/ab67616d0000b2730cea6601096d5b32c8b28f71",
        "raw": {
          "type": "track",
          "id": "5yw15MbdXGw2ngbqmd7E3m",
          "name": "Lofi Beats",
          "artists": "Lo Fi Hip Hop",
          "albumName": "Lofi Dreams: Soft Lofi Beats",
          "albumArt": "https://i.scdn.co/image/ab67616d0000b2730cea6601096d5b32c8b28f71",
          "duration": 120000,
          "durationFormatted": "2:00",
          "isExplicit": false,
          "isPlayable": true,
          "url": "https://open.spotify.com/track/5yw15MbdXGw2ngbqmd7E3m",
          "scrapedAt": "2026-07-18T11:28:01.961Z",
          "searchTerm": "lofi beats"
        }
      },
      {
        "platform": "spotify",
        "type": "track",
        "uri": "7zGzS7L6LnI5qQqMm8wTPB",
        "url": "https://open.spotify.com/track/7zGzS7L6LnI5qQqMm8wTPB",
        "name": "New Look - Wii U Mii Maker Lofi Mix",
        "artists": [
          "Secret Potion",
          "Lofi Beats To Chill Study Sleep",
          "Nostalgiacore"
        ],
        "album": "Frutiger Aero Remixes",
        "durationMs": 162897,
        "image": "https://i.scdn.co/image/ab67616d0000b27365bc1eef471caed82cd5c3d9",
        "raw": {
          "type": "track",
          "id": "7zGzS7L6LnI5qQqMm8wTPB",
          "name": "New Look - Wii U Mii Maker Lofi Mix",
          "artists": "Secret Potion, Lofi Beats To Chill Study Sleep, Nostalgiacore",
          "albumName": "Frutiger Aero Remixes",
          "albumArt": "https://i.scdn.co/image/ab67616d0000b27365bc1eef471caed82cd5c3d9",
          "duration": 162897,
          "durationFormatted": "2:42",
          "isExplicit": false,
          "isPlayable": true,
          "url": "https://open.spotify.com/track/7zGzS7L6LnI5qQqMm8wTPB",
          "scrapedAt": "2026-07-18T11:28:02.011Z",
          "searchTerm": "lofi beats"
        }
      },
      {
        "platform": "spotify",
        "type": "track",
        "uri": "4LQ0TjIFk38xXNJVNoonSW",
        "url": "https://open.spotify.com/track/4LQ0TjIFk38xXNJVNoonSW",
        "name": "slow river",
        "artists": [
          "ourchase"
        ],
        "album": "slow river",
        "durationMs": 103317,
        "image": "https://i.scdn.co/image/ab67616d0000b273396a89f358a81646ed6259b8",
        "raw": {
          "type": "track",
          "id": "4LQ0TjIFk38xXNJVNoonSW",
          "name": "slow river",
          "artists": "ourchase",
          "albumName": "slow river",
          "albumArt": "https://i.scdn.co/image/ab67616d0000b273396a89f358a81646ed6259b8",
          "duration": 103317,
          "durationFormatted": "1:43",
          "isExplicit": false,
          "isPlayable": true,
          "url": "https://open.spotify.com/track/4LQ0TjIFk38xXNJVNoonSW",
          "scrapedAt": "2026-07-18T11:28:02.289Z",
          "searchTerm": "lofi beats"
        }
      }
    ]
  }
}

Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success, cached, creditsUsed, and a data object with the following fields:

Top-level fields

  • platformPlatform identifier (e.g. youtube, instagram).
  • queryThe search query you sent.
  • typeContent type of the item.
  • totalReturnedNumber of items returned in this response.

Results

Each item in results contains:

  • platformPlatform identifier (e.g. youtube, instagram).
  • typeContent type of the item.
  • uriPlatform URI for the item.
  • urlCanonical URL of the item.
  • nameName of the item or account.
  • artistsArtists credited on the item.
  • albumAlbum the track belongs to.
  • durationMsLength in milliseconds.
  • imageImage URL.
  • rawRaw upstream payload for advanced use (fields may change).

Parameters

NameTypeRequiredDescription
qstringYesSearch query or keywords (min 2 characters).
typestringNotracks, albums, artists, podcasts, or episodes. Default tracks.
limitintegerNoMax items to return (default 20, max 50). Billed per result.
cachebooleanNoSet true to serve from the 24h response cache. Default false — always fetch fresh data.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh.

Using an AI agent? This endpoint is the MCP tool spotify_search via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/spotify/search and parse the JSON response.

Use cases

Trend Discovery

Find trending content by keyword or hashtag.

Content Sourcing

Build feeds and playlists programmatically.

Monitoring

Track topics, brands, and competitors.

Research

Sample large sets of content for analysis.

Frequently asked questions

What does the Spotify Search API do?+

The Spotify Search API lets you search and return matching results from a public Spotify query using one GET request to /v1/spotify/search. It returns clean JSON — no OAuth or infrastructure setup required.

How many credits does the Spotify Search API cost?+

Each successful call costs 2 credits. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Failed or empty results are never charged.

Do I need a Spotify API key or OAuth?+

No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle proxies, rate limits, retries, and authentication for you.

Is the Spotify Search API suitable for production use?+

Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h shared cache (0 credits on hit); default is always fresh. Use it for analytics, monitoring, and content automation.

More Spotify APIs

Ready to use the Spotify Search API?

Sign up, grab your key, and make your first call in 60 seconds.