最后更新
更新日志/search_artists5 credits per call搜索艺人
按名称匹配 Spotify 艺人,最佳匹配排在最前:艺人 ID(用于传给 artist_concerts)、名称、是否认证、图片 URL 和 Spotify URL。
Authorization: Bearer <key> on every request.Parameters
artist name or part of it
maximum number of artists to return (1-50)
Response fields
querye.g."Tarkan"counte.g.10artists
artist_ide.g."2yMN0IP20GOaN6q0p0zL5k"namee.g."Tarkan"verifiede.g.trueimagee.g."https://i.scdn.co/image/ab6761610000e5eb9c5050e9882dd7513b83d250"urle.g."https://open.spotify.com/artist/2yMN0IP20GOaN6q0p0zL5k"curl "https://api.maviapi.com/v1/sites/spotify/search_artists?query=Tarkan&limit=10" \-H "Authorization: Bearer $MAVI_KEY"
{
"query": "Tarkan",
"count": 10,
"artists": [
{
"artist_id": "2yMN0IP20GOaN6q0p0zL5k",
"name": "Tarkan",
"verified": true,
"image": "https://i.scdn.co/image/ab6761610000e5eb9c5050e9882dd7513b83d250",
"url": "https://open.spotify.com/artist/2yMN0IP20GOaN6q0p0zL5k"
}
]
}Get all the data, no code
Collect every page of GET /search_artists into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use Spotify API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of Spotify API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=spotify -- npx -y '@maviapi/mcp'Import Spotify API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/spotify/openapi.json - Postman
https://api.maviapi.com/v1/apis/spotify/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
使用 Spotify API 进行开发
这个 API 关注 Spotify 上的现场音乐:有哪些艺人,他们接下来在哪里演出。/search_artists 按名称查找艺人,/artist_concerts 列出 Spotify 为该艺人显示的近期演唱会,/concert_details 给出一场演唱会的完整信息:入场和开演时间、场馆及其坐标、演出阵容、音乐类型、年龄限制,以及各个购票渠道的销售时间和(如有)价格区间。
可以用它做什么
- 巡演日期提醒
- 对乐迷关注的艺人调用 /artist_concerts,每出现一个没见过的 concert_id 就发出通知。
- 演唱会地图
- 按场馆的经纬度在地图上标出演唱会,并按城市或日期筛选。
- 开票提醒
- 读取 /concert_details 中每个购票渠道的 sale_start 和 availability,在开售前提醒用户。
调用前须知
- 它不返回歌曲、专辑、播放列表或音频,也不能控制播放。
- 演唱会列表为空,表示 Spotify 没有列出该艺人的近期演唱会。
- 开演时间带有场馆所在地的 UTC 偏移。
选择一个端点开始
- 搜索艺人
GET /search_artists按名称匹配 Spotify 艺人,最佳匹配排在最前:艺人 ID(用于传给 artist_concerts)、名称、是否认证、图片 URL 和 Spotify URL。
GET /search_artists 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 query string / query 否 artist name or part of it limit integer / query 否 maximum number of artists to return (1-50) 响应字段 字段 类型 说明 query string count integer artists object[] artists[].artist_id string artists[].name string artists[].verified boolean artists[].image string artists[].url string - 艺人演唱会
GET /artist_concertsSpotify 上列出的某位艺人即将举行的演唱会:艺人 ID 和名称,以及每场演唱会的演唱会 ID(用于 concert_details)、标题、开演日期和时间(ISO 8601,带 UTC 偏移量)、城市、演出艺人和 Spotify URL。列表为空表示 Spotify 上没有该艺人即将举行的演唱会。
GET /artist_concerts 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 artist string / query 否 artist name (best Spotify match is used), or Spotify artist ID, URI (spotify:artist:...) or open.spotify.com/artist/... URL 响应字段 字段 类型 说明 artist_id string artist_name string count integer concerts object[] concerts[].concert_id string concerts[].title string concerts[].start string concerts[].city string concerts[].artists string[] concerts[].url string - 演唱会详情
GET /concert_details单场演唱会的完整详情:标题、开演时间和入场时间、是否为音乐节、状态、年龄限制、场馆(名称、城市、地区、国家、都市圈、纬度/经度)、演出艺人(名称、ID)、音乐流派,以及购票信息(票务平台、是否有票、销售类型、销售时段、最低/最高价格、购票 URL)。
GET /concert_details 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 concert string / query 否 Spotify concert ID, URI (spotify:concert:...) or open.spotify.com/concert/... URL, as returned by artist_concerts 响应字段 字段 类型 说明 concert_id string title string start string doors_open null festival boolean status string age_restriction null venue object venue.name string venue.city string venue.region string venue.country string venue.metro_area string venue.latitude number venue.longitude number venue.venue_id string artists object[] artists[].artist_id string artists[].name string artists[].upcoming_concerts integer genres string[] offers object[] offers[].provider string offers[].availability string offers[].sale_type string offers[].first_party boolean offers[].sale_start string offers[].sale_end string offers[].min_price null offers[].max_price null offers[].currency null offers[].url string url string
将 Spotify 数据导出为 CSV
下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。
| 列表 | CSV 列 |
|---|---|
搜索艺人GET /search_artists | artist_id, name, verified, image, url |
艺人演唱会GET /artist_concerts | concert_id, title, start, city, artists, url |
嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作
Spotify API 常见问题
能获取什么数据、费用多少、如何调用。
Spotify 有官方 API 吗?
有,Spotify 提供自己的 API:Spotify Web API(核实日期:2026-11-25)。本页的 Spotify API 与它无关,是非官方 API:它是 maviapi 针对 spotify.com 上的公开数据提供的独立托管 API,并非由 Spotify 开发、认可或支持。
Spotify API 可以获取哪些数据?
Spotify API 有 3 个端点。每个端点都返回 JSON,参数和字段见上方的文档:
- GET
/search_artists: 按名称匹配 Spotify 艺人,最佳匹配排在最前:艺人 ID(用于传给 artist_concerts)、名称、是否认证、图片 URL 和 Spotify URL。 - GET
/artist_concerts: Spotify 上列出的某位艺人即将举行的演唱会:艺人 ID 和名称,以及每场演唱会的演唱会 ID(用于 concert_details)、标题、开演日期和时间(ISO 8601,带 UTC 偏移量)、城市、演出艺人和 Spotify URL。 - GET
/concert_details: 单场演唱会的完整详情:标题、开演时间和入场时间、是否为音乐节、状态、年龄限制、场馆(名称、城市、地区、国家、都市圈、纬度/经度)、演出艺人(名称、ID)、音乐流派,以及购票信息(票务平台、是否有票、销售类型、销售时段、最低/最高价格、购票 URL)。
Spotify API 的价格是多少?
调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 5 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $0.98。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。
如何调用 Spotify API?
向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /search_artists:
curl 'https://api.maviapi.com/v1/sites/spotify/search_artists' \
-H "Authorization: Bearer $MAVI_KEY"在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。
以 JSON 获取 Spotify 数据有哪些方式?
以 JSON 获取 Spotify 数据的每种方式适合不同的需求:
- Spotify Web API: 需要写入权限、账号数据或与 Spotify 签订协议时更合适。
- 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 spotify.com 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
- Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
- RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
- maviapi: 本页的 Spotify API:3 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。
spotify.com 改版后会怎样?
更新会破坏我的 Spotify API 集成吗?
不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。
相关 API
- DJJOhAL API
DJJOhAL.Com 上旁遮普语、印地语和哈里亚纳语音乐的目录元数据:最新发行、类别、专辑、单曲、歌曲、艺人和搜索,以结构清晰的 JSON 返回(仅元数据,不含媒体链接)。
- Tripadvisor API
来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…
- Google Maps API
来自 maps.google.com 的结构化数据。