Spotify

Spotify Search API

Search Spotify — canonical spotify: URIs, explicit, fetchedAt (flat 2 credits).

Pass q plus optional type=tracks|albums|artists|podcasts|episodes (default tracks) and limit (max 50, no cursor). Primary path is web-player Pathfinder GraphQL (same family as /spotify/artist|track|album); a fallback path serves only on a miss — do not assume one raw schema across both (GraphQL __typename vs flat albumName/isExplicit). Envelope: query, type, fetchedAt, source (pathfinder; omitted when the fallback path served), results[]. Each result ships a canonical Spotify URI (spotify:track:… not a bare id), url, name, artists (structured on Pathfinder track/album hits), durationMs/durationFormatted, explicit, contentRating, and image. Request freshness is envelope fetchedAt only — not copied onto every row. Pathfinder search (decorateContextTracks) does not expose playCount or playable (absence ≠ false/zero); chain uri into /spotify/track for those. Flat 2 credits on native Pathfinder; the fallback path scales per result (cost varies with results). Pass raw=true for per-result upstream payloads (omitted by default; searchTerm is not repeated inside raw).

Docs: https://captapi.com/apis/spotify-search

get/v1/spotify/search

Request

  • Base URL: https://api.captapi.com
  • URL: https://api.captapi.com/v1/spotify/search
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Query parameters

qstring required

Search term (min 2 chars).

typestring

Result kind: tracks (default), albums, artists, podcasts, or episodes.

limitinteger

Max items to return (default 20, max 50). Flat 2 credits per call.

rawboolean

Include per-result upstream payload as results[].raw. Default false. Pathfinder GraphQL vs fallback-path shapes differ — see FAQ.

cacheboolean

Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.

Response

Success. The data object for this endpoint.

successunknown required

Changes

No recorded changes to this operation across all 3 revisions of this API.