# Spotify API for AI Agents

Spotify API, metadata for agents: playlists, albums, artists and tracks. Complete discographies are in v2.

| Field | Value |
| --- | --- |
| Provider | APIStead Labs |
| Category | Media |
| Networks | Base |
| Price | $0.02 per call |
| Base URL | https://apistead.qd.je/api/v1 |
| Verification | verified (5/5 routes) |
| Last verified | 2026-11-13T13:53:03.203Z |
| Receipt | https://basescan.org/tx/0xfae6bdc0cf2816bae6a4d17a1ee9b4fda79d45dc7a5abc3fd5f3b6ee639bc58c |
| JSON | https://x402.apistead.qd.je/api/apis/spotify-api |
| Markdown | https://x402.apistead.qd.je/api/apis/spotify-api/md |
| MCP | https://apistead.qd.je/mcp |
| API reference | https://x402.apistead.qd.je/api |
| OpenAPI | https://x402.apistead.qd.je/openapi.json |

## For AI agents

Spotify metadata for agents: resolve playlist, album, artist, artist top-tracks and track links or ids, with search and complete discographies in the v2 listing. Artist responses include audience stats, bio when published and top tracks. No auth or API key.

## Scope

The current release covers public playlists, albums, artists, artist top tracks and tracks. Search and complete artist discographies are available in the Spotify v2 listing. Spotify's public metadata does not expose playlist creation dates or per-track added dates, so those fields are omitted. No playback control, downloads or user-library access.

## Agent intents

- get a Spotify playlist
- get a Spotify album
- get a Spotify artist
- get a Spotify artist bio
- get a Spotify artist's monthly listeners and followers
- get a Spotify track
- get Spotify track metadata
- get the album and copyright lines for a Spotify track
- get a Spotify artist's top tracks
- get an artist's top five tracks with album context
- get the ranked top tracks for a Spotify artist
- extract tracks from a Spotify playlist
- extract tracks from a Spotify album
- list artists and albums in a Spotify playlist
- calculate the length of a Spotify playlist
- resolve a Spotify URL, URI or id
- get Spotify metadata without an API key
- Spotify metadata API for AI agents

Spotify metadata API for AI agents. The playlist, album, artist, artist top-tracks and track endpoints turn a Spotify URL, URI or 22-character id into a stable JSON shape.

A playlist returns up to 100 ordered tracks with optional album enrichment. An album returns its full track list, disc and track numbers, type, release date and copyright lines. An artist returns one image, monthly listeners, followers, bio when Spotify publishes one, and top tracks. The artist top-tracks endpoint returns the same ranked top tracks with a limit parameter and album context on every track. A track returns its title, artists, album context, release date, duration, explicit flag, preview URL, artwork and copyright lines.

Search and complete artist discographies are available in the Spotify v2 listing. Spotify's public metadata does not expose playlist creation dates or per-track added dates, so those fields are not returned. Playback control, downloads and user-library access are not included.

## Endpoints

### GET /spotify/album

Get Spotify album metadata, cover art, artists, release date, copyright lines and the full ordered track list.

- URL: https://apistead.qd.je/api/v1/spotify/album
- Price: $0.02 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.869Z
- Latency: 5 ms
- Uptime (30d): 89%

Example request:

```http
GET https://apistead.qd.je/api/v1/spotify/album?url=https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI
```

Example response:

```json
{
  "album": {
    "id": "5WulAOx9ilWy1h8UGZ1gkI",
    "uri": "spotify:album:5WulAOx9ilWy1h8UGZ1gkI",
    "url": "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI",
    "name": "Deadbeat",
    "type": "album",
    "artists": [
      {
        "id": "5INjqkS1o8h1imAzPqGZBb",
        "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
        "name": "Tame Impala"
      }
    ],
    "playable": true,
    "copyrights": [
      "℗ 2025 Columbia Records, a Division of Sony Music Entertainment, under exclusive license from Tame Impala"
    ],
    "cover_image": "https://i.scdn.co/image/ab67616d0000b273208500450dcd0fd294d7bd3b",
    "duration_ms": 3365184,
    "track_count": 12,
    "release_date": "2025-10-17",
    "explicit_count": 4,
    "duration_formatted": "56:05"
  },
  "source": "spotify",
  "tracks": [
    {
      "id": "4whkhyXTrTgHKZzkUvdwoq",
      "uri": "spotify:track:4whkhyXTrTgHKZzkUvdwoq",
      "url": "https://open.spotify.com/track/4whkhyXTrTgHKZzkUvdwoq",
      "album": {
        "id": "5WulAOx9ilWy1h8UGZ1gkI",
        "url": "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI",
        "name": "Deadbeat",
        "release_date": "2025-10-17"
      },
      "title": "My Old Ways",
      "artists": [
        {
          "id": "5INjqkS1o8h1imAzPqGZBb",
          "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
          "name": "Tame Impala"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b273208500450dcd0fd294d7bd3b",
      "explicit": true,
      "playable": true,
      "position": 1,
      "disc_number": 1,
      "duration_ms": 298783,
      "preview_url": "https://p.scdn.co/mp3-preview/...",
      "track_number": 1,
      "duration_formatted": "4:59"
    }
  ],
  "preview": false,
  "summary": {
    "duration_ms": 3365184,
    "track_count": 12,
    "explicit_count": 4,
    "unique_artists": 1,
    "returned_tracks": 12,
    "duration_formatted": "56:05",
    "average_track_duration_ms": 280432
  },
  "retrieved_at": "2026-11-10T00:00:00Z"
}
```

### GET /spotify/artist

Get a Spotify artist profile with monthly listeners, followers, bio when published and top tracks with collaborator ids and album context.

- URL: https://apistead.qd.je/api/v1/spotify/artist
- Price: $0.02 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.722Z
- Latency: 4 ms
- Uptime (30d): 86.87%

Example request:

```http
GET https://apistead.qd.je/api/v1/spotify/artist?url=https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb
```

Example response:

```json
{
  "artist": {
    "id": "5INjqkS1o8h1imAzPqGZBb",
    "bio": "Kevin Parker has emerged as one of the most influential voices of the last decade. A singular artist renowned for carving out a distinct sound all of his own.",
    "uri": "spotify:artist:5INjqkS1o8h1imAzPqGZBb",
    "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
    "name": "Tame Impala",
    "image": "https://i.scdn.co/image/ab6761610000e5ebe412a782245eb20d9626c601",
    "followers": 12374967,
    "monthly_listeners": 65309089
  },
  "source": "spotify",
  "preview": false,
  "summary": {
    "top_tracks": 5,
    "duration_ms": 1079294,
    "explicit_count": 4,
    "unique_artists": 6,
    "duration_formatted": "17:59"
  },
  "top_tracks": [
    {
      "id": "7bxaFZ1O3cHkgLKMsdC3xR",
      "uri": "spotify:track:7bxaFZ1O3cHkgLKMsdC3xR",
      "url": "https://open.spotify.com/track/7bxaFZ1O3cHkgLKMsdC3xR",
      "album": {
        "id": "5WulAOx9ilWy1h8UGZ1gkI",
        "url": "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI",
        "name": "Deadbeat",
        "release_date": "2025-10-17"
      },
      "title": "Loser",
      "artists": [
        {
          "id": "5INjqkS1o8h1imAzPqGZBb",
          "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
          "name": "Tame Impala"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b273208500450dcd0fd294d7bd3b",
      "explicit": true,
      "playable": true,
      "position": 1,
      "duration_ms": 223069,
      "preview_url": "https://p.scdn.co/mp3-preview/0015e9347a45b62215447eba657b2fc3ce279d2d",
      "duration_formatted": "3:43"
    },
    {
      "id": "5yvVYFDUpbnjcnRBgjwTzM",
      "uri": "spotify:track:5yvVYFDUpbnjcnRBgjwTzM",
      "url": "https://open.spotify.com/track/5yvVYFDUpbnjcnRBgjwTzM",
      "album": {
        "id": "6KFq3hJB6JnNvDbEHRvPoK",
        "url": "https://open.spotify.com/album/6KFq3hJB6JnNvDbEHRvPoK",
        "name": "Dracula (with JENNIE)",
        "release_date": "2026-02-06"
      },
      "title": "Dracula (with JENNIE)",
      "artists": [
        {
          "id": "5INjqkS1o8h1imAzPqGZBb",
          "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
          "name": "Tame Impala"
        },
        {
          "id": "250b0Wlc5Vk0CoUsaCY84M",
          "url": "https://open.spotify.com/artist/250b0Wlc5Vk0CoUsaCY84M",
          "name": "JENNIE"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b273c7c031ce9d06b131f8563676",
      "explicit": true,
      "playable": true,
      "position": 2,
      "duration_ms": 209720,
      "preview_url": "https://p.scdn.co/mp3-preview/631b9cec18551169382ef4be4f01e40bc5523441",
      "duration_formatted": "3:30"
    }
  ],
  "retrieved_at": "2026-11-11T00:00:00Z"
}
```

### GET /spotify/playlist

Get Spotify playlist cover art, owner, ordered tracks, artists, artwork, duration and optional album enrichment.

- URL: https://apistead.qd.je/api/v1/spotify/playlist
- Price: $0.02 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.781Z
- Latency: 5 ms
- Uptime (30d): 87.88%

Example request:

```http
GET https://apistead.qd.je/api/v1/spotify/playlist?url=https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M&include_albums=true&limit=20&album_limit=10
```

Example response:

```json
{
  "source": "spotify",
  "tracks": [
    {
      "album": {
        "name": "Stop The Wedding!",
        "release_date": "2026-08-07"
      },
      "title": "Stop The Wedding!",
      "artists": [
        {
          "id": "6P5NO5hzJbuOqSdyPB7SJM",
          "url": "https://open.spotify.com/artist/6P5NO5hzJbuOqSdyPB7SJM",
          "name": "Ashe"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b2730893a0c33fd4b8497b0ef2f6",
      "explicit": false,
      "position": 1,
      "duration_formatted": "3:19"
    }
  ],
  "preview": false,
  "summary": {
    "unique_albums": 17,
    "unique_artists": 18,
    "returned_tracks": 20,
    "duration_formatted": "1:05:20"
  },
  "playlist": {
    "id": "37i9dQZF1DXcBWIGoYBM5M",
    "name": "Today's Top Hits",
    "owner": {
      "id": "spotify",
      "url": "https://open.spotify.com/user/spotify",
      "name": "Spotify",
      "avatar": "https://i.scdn.co/image/ab6775700000ee8555c25988a6ac314394d3fbf5"
    },
    "saves": 33606582,
    "cover_image": "https://image-cdn-fa.spotifycdn.com/image/ab67706f00000003e06fabee7abffa117bed662f",
    "description": "The hottest 50. Cover: Ashe",
    "track_count": 50,
    "explicit_count": 11,
    "duration_formatted": "2:45:10"
  },
  "retrieved_at": "2026-11-10T00:00:00Z",
  "album_enrichment": {
    "limit": 20,
    "limited": true,
    "requested": true,
    "enriched_tracks": 20
  }
}
```

### GET /spotify/track

Get Spotify track metadata, artists, album context, release date, copyright lines, duration, preview URL and artwork.

- URL: https://apistead.qd.je/api/v1/spotify/track
- Price: $0.02 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.762Z
- Latency: 4 ms
- Uptime (30d): 84.62%

Example request:

```http
GET https://apistead.qd.je/api/v1/spotify/track?url=https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT
```

Example response:

```json
{
  "note": "Spotify track metadata, normalized for agents. Copyright lines are included when Spotify publishes them: © is the musical work and ℗ is the sound recording. Playback control, downloads and user-library access are not included.",
  "track": {
    "id": "4cOdK2wGLETKBW3PvgPWqT",
    "uri": "spotify:track:4cOdK2wGLETKBW3PvgPWqT",
    "url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT",
    "album": {
      "id": "5Z9iiGl2FcIfa3BMiv6OIw",
      "url": "https://open.spotify.com/album/5Z9iiGl2FcIfa3BMiv6OIw",
      "name": "Whenever You Need Somebody",
      "release_date": "1987-11-12"
    },
    "title": "Never Gonna Give You Up",
    "artists": [
      {
        "id": "0gxyHStUsqpMadRV0Di1Qt",
        "url": "https://open.spotify.com/artist/0gxyHStUsqpMadRV0Di1Qt",
        "name": "Rick Astley"
      }
    ],
    "artwork": "https://i.scdn.co/image/ab67616d0000b273baf89eb11ec7c657805d2da0",
    "explicit": false,
    "playable": true,
    "copyrights": [
      "© 1987 BMG Rights Management (UK) Limited",
      "℗ 1987 BMG Rights Management (UK) Limited"
    ],
    "duration_ms": 213573,
    "preview_url": "https://p.scdn.co/mp3-preview/40a780b231e5ed130483bec7917b6c9a4f8a4708",
    "release_date": "1987-11-12",
    "duration_formatted": "3:34"
  },
  "source": "spotify",
  "preview": false,
  "retrieved_at": "2026-11-11T00:00:00Z"
}
```

### GET /spotify/artist/top-tracks

Get a Spotify artist's ranked top tracks with album context, artists, duration, preview URL and artwork.

- URL: https://apistead.qd.je/api/v1/spotify/artist/top-tracks
- Price: $0.02 USDC per call
- Pay to: 0x2E9804240E493DD8daeBa4F341a5086b92cde235
- Verified: yes
- Last checked: 2026-11-14T03:35:09.879Z
- Latency: 7 ms
- Uptime (30d): 85.53%

Example request:

```http
GET https://apistead.qd.je/api/v1/spotify/artist/top-tracks?url=https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb&limit=2
```

Example response:

```json
{
  "note": "Spotify artist top tracks, normalized for agents. Spotify's public artist page exposes up to five top tracks, and limit can return fewer. Each track includes album context. Playback control, downloads and user-library access are not included.",
  "artist": {
    "id": "5INjqkS1o8h1imAzPqGZBb",
    "bio": "Kevin Parker has emerged as one of the most influential voices of the last decade. A singular artist renowned for carving out a distinct sound all of his own.",
    "uri": "spotify:artist:5INjqkS1o8h1imAzPqGZBb",
    "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
    "name": "Tame Impala",
    "image": "https://i.scdn.co/image/ab6761610000e5ebe412a782245eb20d9626c601",
    "followers": 12382756,
    "monthly_listeners": 65309089
  },
  "source": "spotify",
  "preview": false,
  "summary": {
    "duration_ms": 432789,
    "explicit_count": 2,
    "unique_artists": 2,
    "requested_limit": 2,
    "returned_tracks": 2,
    "duration_formatted": "7:13",
    "available_top_tracks": 5
  },
  "top_tracks": [
    {
      "id": "7bxaFZ1O3cHkgLKMsdC3xR",
      "uri": "spotify:track:7bxaFZ1O3cHkgLKMsdC3xR",
      "url": "https://open.spotify.com/track/7bxaFZ1O3cHkgLKMsdC3xR",
      "album": {
        "id": "5WulAOx9ilWy1h8UGZ1gkI",
        "url": "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI",
        "name": "Deadbeat",
        "release_date": "2025-10-17"
      },
      "title": "Loser",
      "artists": [
        {
          "id": "5INjqkS1o8h1imAzPqGZBb",
          "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
          "name": "Tame Impala"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b273208500450dcd0fd294d7bd3b",
      "explicit": true,
      "playable": true,
      "position": 1,
      "duration_ms": 223069,
      "preview_url": "https://p.scdn.co/mp3-preview/0015e9347a45b62215447eba657b2fc3ce279d2d",
      "duration_formatted": "3:43"
    },
    {
      "id": "5yvVYFDUpbnjcnRBgjwTzM",
      "uri": "spotify:track:5yvVYFDUpbnjcnRBgjwTzM",
      "url": "https://open.spotify.com/track/5yvVYFDUpbnjcnRBgjwTzM",
      "album": {
        "id": "6KFq3hJB6JnNvDbEHRvPoK",
        "url": "https://open.spotify.com/album/6KFq3hJB6JnNvDbEHRvPoK",
        "name": "Dracula (with JENNIE)",
        "release_date": "2026-02-06"
      },
      "title": "Dracula (with JENNIE)",
      "artists": [
        {
          "id": "5INjqkS1o8h1imAzPqGZBb",
          "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
          "name": "Tame Impala"
        },
        {
          "id": "250b0Wlc5Vk0CoUsaCY84M",
          "url": "https://open.spotify.com/artist/250b0Wlc5Vk0CoUsaCY84M",
          "name": "JENNIE"
        }
      ],
      "artwork": "https://i.scdn.co/image/ab67616d0000b273c7c031ce9d06b131f8563676",
      "explicit": true,
      "playable": true,
      "position": 2,
      "duration_ms": 209720,
      "preview_url": "https://p.scdn.co/mp3-preview/631b9cec18551169382ef4be4f01e40bc5523441",
      "duration_formatted": "3:30"
    }
  ],
  "retrieved_at": "2026-11-11T00:00:00Z"
}
```

## Payment

Every paid route uses x402 over HTTP. Call the route without payment to receive a 402 challenge, then pay the quoted USDC amount and retry. The 402 challenge is the authoritative source for price, asset, network and pay-to address. Reading this record and the discovery API is free.

- Protocol: x402 v2
- Asset: USDC
- Networks: Base
- Price: $0.02 per call

## Verification

- State: verified
- Routes verified: 5/5
- Last verified: 2026-11-13T13:53:03.203Z
- Receipt: https://basescan.org/tx/0xfae6bdc0cf2816bae6a4d17a1ee9b4fda79d45dc7a5abc3fd5f3b6ee639bc58c

## FAQ

### What Spotify endpoints are available?

Playlist, album, artist, artist top-tracks and track metadata are live now. Search and complete artist discographies are available in the Spotify v2 listing. Each route has its own request and response shape.

### What does the album endpoint return?

It returns the album name, type, artists, release date, one cover image, total tracks, duration, explicit count, copyright lines and the full ordered track list with disc and track numbers.

### What does the artist endpoint return?

It returns the artist name, one image, monthly listeners, followers, bio when Spotify publishes one and the artist's top five tracks with collaborator ids, profile URLs, album context and one artwork per track.

### Does the artist endpoint include a bio?

Yes, when Spotify publishes one. Monthly listeners and followers are included when Spotify publishes them. The bio is the public About text from the artist page.

### What is the difference between the artist and artist top-tracks endpoints?

The artist endpoint returns the artist profile plus the top five tracks. The artist top-tracks endpoint returns the same ranked tracks with a limit parameter from 1 to 5 and album context on every track. Use the top-tracks route when the agent only needs the ranked tracks.

### What does the track endpoint return?

It returns the track title, artists with ids and profile URLs, album id, name, URL and release date, track release date, duration, explicit flag, playable state, preview URL, one artwork image and copyright lines when Spotify publishes them.

### Why are there two copyright lines in a track response?

They are separate rights. The © line is the copyright notice for the musical work (composition and lyrics). The ℗ line is the phonogram notice for the sound recording (the master). Spotify publishes both when the rights holders supply them. The API returns each line in the order Spotify provides it, does not merge notices and returns an empty array when Spotify publishes none.

### Does this API require a Spotify account?

No. The agent sends a public playlist, album, artist or track URL, URI or id and pays per call with x402. There is no Spotify login, OAuth flow or API key for the buyer.

### Does it download, play or stream music?

No. The API returns metadata only. It does not download audio, control playback, access a user library or bypass Spotify access controls.

### How many tracks are returned?

A playlist exposes up to 100 tracks, and the limit parameter can return fewer. An album returns its full track list. An artist returns the top five tracks shown on the public artist page. The artist top-tracks endpoint returns up to five tracks and accepts limit=1 to 5.

### Does the playlist endpoint include creation or added dates?

No. Spotify's public playlist metadata does not expose the playlist creation date, last updated date, or per-track added timestamps. Those fields require an OAuth-based Spotify API, which this API does not use.

### What does include_albums do on the playlist route?

It enriches the first playlist tracks with album id, name, URL and release date, and upgrades each track artwork to the largest available album image. Album enrichment uses extra metadata lookups and is capped by album_limit to keep latency predictable.

### How do I send a Spotify link?

Use GET /api/v1/spotify/playlist, /album, /artist, /artist/top-tracks or /track with a url or id query parameter. All five routes also accept POST JSON with a url or id field. The value can be a Spotify URL, URI or 22-character id.

### How much does a call cost and how do agents pay?

A playlist, album, artist, artist top-tracks or track call costs $0.02 USDC on Base. The agent reads the x402 402 challenge, pays the provider wallet directly and retries. There is no API key or subscription.

## Code examples

### Python

~~~python
import asyncio
import os

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))


async def main():
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://apistead.qd.je/api/v1/spotify/playlist",
            params={
                "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
                "limit": 20,
                "include_albums": "true",
                "album_limit": 10,
            },
        )
        response.raise_for_status()
        print(response.json())


asyncio.run(main())
~~~

### JavaScript

~~~javascript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();

// Base mainnet.
client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://apistead.qd.je/api/v1/spotify/playlist",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      url: "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
      limit: 20,
      include_albums: true,
      album_limit: 10,
    }),
  },
);

console.log(await response.json());
~~~

### cURL: read the 402 first

~~~bash
curl -i "https://apistead.qd.je/api/v1/spotify/playlist?url=https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M&limit=3"
~~~

### Python: album

~~~python
import asyncio
import os

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))


async def main():
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://apistead.qd.je/api/v1/spotify/album",
            params={"url": "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI"},
        )
        response.raise_for_status()
        print(response.json())


asyncio.run(main())
~~~

### JavaScript: album

~~~javascript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();

// Base mainnet.
client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://apistead.qd.je/api/v1/spotify/album",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      url: "https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI",
    }),
  },
);

console.log(await response.json());
~~~

### cURL: album challenge

~~~bash
curl -i "https://apistead.qd.je/api/v1/spotify/album?url=https://open.spotify.com/album/5WulAOx9ilWy1h8UGZ1gkI"
~~~

### Python: artist

~~~python
import asyncio
import os

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))


async def main():
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://apistead.qd.je/api/v1/spotify/artist",
            params={"url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb"},
        )
        response.raise_for_status()
        print(response.json())


asyncio.run(main())
~~~

### JavaScript: artist

~~~javascript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();

// Base mainnet.
client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://apistead.qd.je/api/v1/spotify/artist",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      url: "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
    }),
  },
);

console.log(await response.json());
~~~

### cURL: artist challenge

~~~bash
curl -i "https://apistead.qd.je/api/v1/spotify/artist?url=https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb"
~~~

### Python: artist top tracks

~~~python
import asyncio
import os

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))


async def main():
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://apistead.qd.je/api/v1/spotify/artist/top-tracks",
            params={
                "url": "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
                "limit": 5,
            },
        )
        response.raise_for_status()
        print(response.json())


asyncio.run(main())
~~~

### JavaScript: artist top tracks

~~~javascript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();

// Base mainnet.
client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://apistead.qd.je/api/v1/spotify/artist/top-tracks",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      url: "https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb",
      limit: 5,
    }),
  },
);

console.log(await response.json());
~~~

### cURL: artist top tracks challenge

~~~bash
curl -i "https://apistead.qd.je/api/v1/spotify/artist/top-tracks?url=https://open.spotify.com/artist/5INjqkS1o8h1imAzPqGZBb&limit=5"
~~~

### Python: track

~~~python
import asyncio
import os

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(account))


async def main():
    async with x402HttpxClient(client) as http:
        response = await http.get(
            "https://apistead.qd.je/api/v1/spotify/track",
            params={"url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"},
        )
        response.raise_for_status()
        print(response.json())


asyncio.run(main())
~~~

### JavaScript: track

~~~javascript
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();

// Base mainnet.
client.register("eip155:8453", new ExactEvmScheme(account));

const paidFetch = wrapFetchWithPayment(fetch, client);

const response = await paidFetch(
  "https://apistead.qd.je/api/v1/spotify/track",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      id: "4cOdK2wGLETKBW3PvgPWqT",
    }),
  },
);

console.log(await response.json());
~~~

### cURL: track challenge

~~~bash
curl -i "https://apistead.qd.je/api/v1/spotify/track?id=4cOdK2wGLETKBW3PvgPWqT"
~~~

## Agent links

- JSON: https://x402.apistead.qd.je/api/apis/spotify-api
- Markdown: https://x402.apistead.qd.je/api/apis/spotify-api/md
- Routes: https://x402.apistead.qd.je/agent/routes?id=spotify-api
- Receipts: https://x402.apistead.qd.je/agent/receipts?id=spotify-api
- API reference: https://x402.apistead.qd.je/api
- MCP guide: https://x402.apistead.qd.je/mcp-docs
- Agent skill: https://x402.apistead.qd.je/skill
- OpenAPI: https://x402.apistead.qd.je/openapi.json
- MCP: https://apistead.qd.je/mcp
- Docs: https://apistead.qd.je/api


## Changelog

### 1.7.0 - Discography moved to v2

The v1 discography route was removed. The v2 route returns all albums, singles and EPs by default.

release · 2026-11-12 · APIStead Labs

### 1.6.0 - Spotify artist discography

Added /spotify/artist/discography with Albums, Singles and EPs, Popular releases and Appears On sections from the public artist page, plus release year, type and cover art. This route was later removed in 1.7.0; use the v2 discography route for complete discographies.

release · 2026-11-12 · APIStead Labs

### 1.5.0 - Spotify artist bio and audience stats

Artist and artist top-tracks responses now include monthly listeners, followers, bio when Spotify publishes it and top tracks.

release · 2026-11-11 · APIStead Labs

### 1.4.0 - Spotify artist top tracks

Added /spotify/artist/top-tracks with limit 1-5, ranked top tracks, album context on every track and a summary. The artist endpoint top tracks now include album context too.

release · 2026-11-11 · APIStead Labs

### 1.3.0 - Track album context and richer agent records

The track endpoint now returns the album id, name, URL and release date plus copyright lines when Spotify publishes them. Listing JSON and Markdown now share normalized route fields, payment terms, verification receipts and example responses across all nine listings.

release · 2026-11-11 · APIStead Labs

### 1.2.0 - Spotify track endpoint

Added the track endpoint with title, artists, release date, duration, explicit flag, playable state, preview URL and one artwork image. Playlist, album and artist now also accept ?id= and an id field in JSON bodies.

release · 2026-11-11 · APIStead Labs

### 1.1.0 - Mainnet settlement verified

All three Spotify routes settled a real paid call on Base mainnet. Artist, album and playlist each have a public Basescan receipt.

release · 2026-11-11 · APIStead Labs

### 1.0.0 - Initial verified release

The route is live and settlement-verified. Health checks, public receipts and agent-readable records are available.

release · 2026-11-11 · APIStead Labs
