# Spotify 播放列表 API (spotify.playlist)

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

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | artist / track / album / playlist 使用对应的 open.spotify.com 链接，也支持在 url 中传 spotify:类型:ID 或裸 ID；目标种类由 action 决定，不要跨类型混用。旧 profile 仅直接接收完整链接，读取专辑/单曲播放资料，不是用户个人档案。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| owner_name | 歌单创建者（歌单类结果用）。 |
| save_count | 收藏次数。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| track_count | 曲目总数。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| tracks | 曲目列表。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 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": "playlist",
  "params": {
    "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
  }
}'
```

```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": "playlist",
        "params": {
            "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
        },
    },
    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. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "spotify",
  "action": "playlist",
  "results": {
    "id": "37i9dQZF1DXcBWIGoYBM5M",
    "url": "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M",
    "name": "Today’s Top Hits",
    "text": "The hottest 50. Cover: ADÉLA",
    "owner_name": "•••",
    "save_count": 33769619,
    "track_count": 50,
    "image_url": "https://i.scdn.co/image/ab67706f0000000209dec89719704eea4f218966",
    "tracks": [
      {
        "id": "70cHKK8bHAfJrOGVnfRG9J",
        "url": "https://open.spotify.com/track/70cHKK8bHAfJrOGVnfRG9J",
        "name": "Nicole Kidman",
        "artists": [
          "ADÉLA"
        ],
        "album_name": "PRIMA",
        "duration_ms": 181270,
        "play_count": 58825168,
        "is_explicit": true,
        "added_at": "2026-09-11T04:01:53.033000+00:00",
        "platform": "spotify"
      },
      {
        "id": "11hcBLPtbMp4aQI6zGQLub",
        "url": "https://open.spotify.com/track/11hcBLPtbMp4aQI6zGQLub",
        "name": "Patient Zero",
        "artists": [
          "Taylor Swift"
        ],
        "album_name": "The Life of a Showgirl: The Encore",
        "duration_ms": 225868,
        "play_count": 0,
        "is_explicit": false,
        "added_at": "2026-09-25T04:02:48.872000+00:00",
        "platform": "spotify"
      },
      {
        "id": "3h5T5JypYU7huFiVYhv1dr",
        "url": "https://open.spotify.com/track/3h5T5JypYU7huFiVYhv1dr",
        "name": "BbY WOW",
        "artists": [
          "KAROL G",
          "Judeline",
          "rusowsky"
        ],
        "album_name": "NO ME ARREPIENTO DE SENTIR TANTO",
        "duration_ms": 225834,
        "play_count": 211190334,
        "is_explicit": false,
        "added_at": "2026-08-21T04:01:49.587000+00:00",
        "platform": "spotify"
      }
    ],
    "platform": "spotify"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## 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
