# Spotify Search API (spotify.search)

- Canonical page: [https://everyinfra.com/en/spotify-api/search](https://everyinfra.com/en/spotify-api/search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "spotify", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

Spotify Search finds tracks, artists, albums or playlists by `keyword` and returns each result's name, type, link, image and artists, plus fields that depend on the kind of result, such as album name, length, play count, followers, monthly listeners, track count, release date and playlist owner. Use it to find the exact Spotify object before you read it in full, to see what comes up for a theme or mood, or to build lists for playlist pitching and music research.

Choose the kind with `content_type`: `tracks`, `artists`, `albums` or `playlists`. `duration_ms` is in milliseconds, `preview_url` links to a 30-second preview and can be null, and `is_explicit` flags explicit content. Search results are a starting point; keep the `url` of the ones you want to read in full.

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=spotify&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the search query for the search action, with target entities constrained by content_type. On the podcast action, this parameter searches overall podcast shows by default rather than looking up specific episode details. |
| content_type | enum: albums / artists / playlists / tracks | no | not declared | Filters target catalog types. For search, allowed values are tracks, artists, albums, or playlists. The podcast action takes its own values: podcasts_shows (default) for shows or podcast_episodes_individual_episodes for single episodes. Values from one action cannot be used in the other. |
| limit | integer (1–100) | no | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| type | Record type; values depend on the capability (for example video / image / text). |
| name | Name of the object itself, for account, product and business capabilities. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| artists | platform-native meaning |
| album_name | platform-native meaning |
| owner_name | platform-native meaning |
| publisher | platform-native meaning |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| duration_ms | platform-native meaning |
| play_count | platform-native meaning |
| follower_count | Followers. null means not disclosed, not 0. |
| monthly_listener_count | platform-native meaning |
| track_count | platform-native meaning |
| episode_count | platform-native meaning |
| release_date | platform-native meaning |
| is_explicit | platform-native meaning |
| preview_url | platform-native meaning |
| rank | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "spotify",
  "action": "search",
  "params": {
    "keyword": "arctic monkeys"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "spotify",
        "action": "search",
        "params": {
            "keyword": "arctic monkeys",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "spotify",
  "action": "search",
  "results": [
    {
      "id": "5XeFesFbtLpXzIVDNQP22n",
      "url": "https://open.spotify.com/track/5XeFesFbtLpXzIVDNQP22n",
      "type": "track",
      "name": "I Wanna Be Yours",
      "artists": [
        "Arctic Monkeys"
      ],
      "album_name": "AM",
      "image_url": "https://i.scdn.co/image/ab67616d0000b2734ae1c4c5c45aabe565499163",
      "duration_ms": 183956,
      "is_explicit": false,
      "platform": "spotify"
    },
    {
      "id": "5FVd6KXrgO9B3JPmC8OPst",
      "url": "https://open.spotify.com/track/5FVd6KXrgO9B3JPmC8OPst",
      "type": "track",
      "name": "Do I Wanna Know?",
      "artists": [
        "Arctic Monkeys"
      ],
      "album_name": "AM",
      "image_url": "https://i.scdn.co/image/ab67616d0000b2734ae1c4c5c45aabe565499163",
      "duration_ms": 272394,
      "is_explicit": false,
      "platform": "spotify"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### How do I search for artists or playlists instead of songs?

Set `content_type` to `artists`, `albums`, `playlists` or `tracks`. Each kind fills different fields, for example `monthly_listener_count` on artists and `owner_name` on playlists, so run one `content_type` per batch and keep the value with the rows you store.

### Can I search podcasts here?

Not with this capability; its `content_type` takes only the four music values. Podcasts have their own capability, Spotify Podcast, which searches shows or individual episodes with its own content type values. The two sets of values cannot be swapped between the capabilities.

### How do I get the full record for a result?

Pass the result's `url` to the capability for its kind: Spotify Track for tracks, Album for albums, Artist details for artists and Playlist for playlists. `type` on the row tells you which kind it is, which matters when you mix results from several searches.

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=spotify
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
