Spotify 能力清单
| action | 必填参数 | 可选参数 | 单次条数 | 模式 | 单价 / 次 | 返回字段 |
|---|---|---|---|---|---|---|
| profile | url | — | — | 同步 | ¥0.01 | id · url · name · type · release_date · label · artists · image_url · track_count · tracks · platform · duration_ms · play_count · track_number |
| search | keyword | content_type | 默认 20 · 最多 100 | 同步 | ¥0.01 | id · url · type · name · text · artists · album_name · owner_name · publisher · image_url · duration_ms · play_count · follower_count · monthly_listener_count · track_count · episode_count · release_date · is_explicit · preview_url · rank · platform |
| artist | url | — | — | 同步 | ¥0.01 | id · url · name · bio · monthly_listener_count · follower_count · world_rank · genres · image_url · header_image_url · album_count · single_count · compilation_count · top_cities · top_tracks · related_artists · platform · city · country · region · listener_count |
| track | url | — | — | 同步 | ¥0.01 | album_id · album_type · label · content_rating |
| album | url | — | — | 同步 | ¥0.01 | id · url · name · album_type · artists · release_date · label · copyright · track_count · image_url · tracks · platform |
| playlist | url | — | — | 同步 | ¥0.01 | id · url · name · text · owner_name · save_count · follower_count · track_count · image_url · tracks · platform |
| podcast | keyword | content_type | 默认 20 · 最多 100 | 同步 | ¥0.01 | id · url · type · name · text · artists · album_name · owner_name · publisher · image_url · duration_ms · play_count · follower_count · monthly_listener_count · track_count · episode_count · release_date · is_explicit · preview_url · rank · platform |
返回字段含义
字段名跨 87 个平台统一,同一个键在哪个平台都是同一个意思—— 这也是换平台只需改 platform 一个字段的原因。 机器可读版:/api/v1/social/fields
- id
- 该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。
- url
- 该记录在原平台上的可访问链接。
- name
- 名称。用于账号/商品/商家类能力,指该对象本身的名字。
- type
- 记录类型,取值随能力而定(如 video / image / text)。
- image_url
- 图片链接。多图能力可能返回 image_urls 数组。
- platform
- 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。
- text
- 正文内容,已去除 HTML 标签。长文可能被上游截断。
- follower_count
- 粉丝数。null 表示不公开,不等于 0。
- bio
- 个人简介,账号自己填写的文本。可能含换行和 emoji。
- city
- 城市名,用原平台的语言书写,未做中英归一。
- country
- 国家或地区。可能是全称也可能是 ISO 代码,取决于平台,未归一。
另有 Spotify 特有字段 release_date · label · artists · track_count · tracks · duration_ms · play_count · track_number · album_name · owner_name · publisher · monthly_listener_count · episode_count · is_explicit · preview_url · rank · world_rank · genres · header_image_url · album_count · single_count · compilation_count · top_cities · top_tracks · related_artists · region · listener_count · album_id · album_type · content_rating · copyright · save_count,保留该平台自身的语义。
30 秒调用示例
curl -X POST https://api.everyinfra.com/api/v1/social \ -H "Authorization: Bearer omg_live_你的KEY" \ -H "Content-Type: application/json" \ -d '{"platform":"spotify","action":"profile","params":{"url":"<url>"}}'
返回长这样
{ "id": "spotify_…", "profile": [ { "id": "…", "url": "https://…", "name": "…", "type": "…", "release_date": "…", "label": "…", "artists": "…", "image_url": "https://…", "track_count": 128, "tracks": "…", "platform": "spotify", "duration_ms": "…", "play_count": 128, "track_number": "…" } ], "count": 1, "billing": { "charged": true, "credits": 100, "cny": 0.01 }}
常见用例
关键词监控
按关键词轮询 Spotify 的新内容,配合 Gemini 文本 API 做情绪分类与异常波动告警。
账号与主体画像
按 Spotify 的主页数据建达人/商家档案,做投放筛选或竞品盯防。
Spotify API 常见问题
Spotify API 怎么调用?
统一入口 POST /api/v1/social,请求体传 platform="spotify"、action(见上方能力清单)和 params。鉴权用请求头 Authorization: Bearer <API Key>,同一把 Key 可以调用全部 87 个平台,不需要为每个平台单独申请。
Spotify API 怎么收费?
按次计费,¥0.01/次,从统一的 ¥ 钱包扣。一次调用一次计费,不按返回条数或页数加价;参数错误、鉴权失败和空结果都不计费。每次调用的响应里带 billing 字段,写明本次实扣多少。
Spotify API 一次能返回多少条数据?
按能力不同,单次最多 100 条(逐能力上限见上方清单的「单次条数」列)。传 limit 参数控制,不传则用默认值。一次调用就返回这么多条,不需要翻页、也不会因为条数多而多收钱。
Spotify API 返回哪些字段?
每个能力的返回字段都列在上方能力清单的「返回字段」列里,例如 profile 返回 id、url、name、type、release_date、label 等。字段名跨平台统一,换平台不用改解析代码。
可以先免费试用 Spotify API 吗?
可以。注册免费,加微信领邀请码可得 ¥5 免费额度(≈500 次数据调用或 400 次 AI 调用),足够把 Spotify 的 7 个能力都试一遍。无需信用卡。
开始调用 Spotify API
加微信领 ¥5 免费额度 —— ≈500 次数据调用或 400 次 AI 调用,足够把 Spotify 的能力全试一遍。