Data APIs ยท Spotify
Spotify data APIs for AI agents
morigraph has 7 Spotify data APIs that Claude, ChatGPT, Cursor, Codex or your own code can call, including search, album, artist and play count. You need no Spotify developer account or API key, only one morigraph connection. Calls cost from 0.024 credits, about $2.40 for 1,000 calls, paid from one balance.
- APIs
- 7
- Price
- 0.024 to 0.048 credits a call
- Call it from
- MCP, command line and HTTP API
- Needs
- One morigraph connection. No Spotify account or API key
Three ways to call it
Every data API is run by one tool, data_api, with the API's id and its arguments. The example is Spotify Search.
In your assistant (MCP). Connect once, then ask in plain words
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
Use morigraph's Spotify Search data API with {"query":"my first million"} and summarise what comes back.From a terminal or script (CLI)
npx @morigraph/cli@latest login
morigraph call data_api --json-args '{"api":"spotify.search","input":{"query":"my first million"}}'From your own code (HTTP API)
curl https://api.morigraph.com/v1/tools/data_api \
-H "Authorization: Bearer $MORIGRAPH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"spotify.search","input":{"query":"my first million"}}'7 Spotify data APIs
| API | Id | Price |
|---|---|---|
| Spotify Search | spotify.search | 0.024 credits a call |
| Spotify Album | spotify.album | 0.024 credits a call |
| Spotify Artist | spotify.artist | 0.024 credits a call |
| Spotify Play Count | spotify.play_count | 0.048 credits a call |
| Spotify Podcast | spotify.podcast | 0.024 credits a call |
| Spotify Podcast Episodes | spotify.podcast_episodes | 0.024 credits a call |
| Spotify Track | spotify.track | 0.024 credits a call |
Spotify Search
Search Spotify for matching tracks, albums, artists, podcasts, and playlists by keyword.
| Argument | Type | Required | What it is |
|---|---|---|---|
query | string | yes | Search term (e.g. "my first million"). |
Returns albumName albums artistName artists id image name podcasts publisher tracks type uri verified year
The call
data_api({"api":"spotify.search","input":{"query":"my first million"}})Spotify Album
Fetch a Spotify album's tracklist, play counts, label, and release details by album URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | Spotify album ID (alternative to url). |
url | string | no | Spotify album URL (e.g. https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG). |
Returns artistName durationMs id image label name playcount popularity releaseDate trackNumber tracks type uri url
The call
data_api({"api":"spotify.album","input":{"url":"https://open.spotify.com/album/0pgrg7phBbnwGJ2HBEl9EG"}})Spotify Artist
Fetch a Spotify artist's discography (albums, singles, top tracks) and metadata by artist URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | Spotify artist ID (alternative to url). |
url | string | no | Spotify artist URL (e.g. https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa). |
Returns albums artistName bio durationMs followers id image label name playcount popularity topTracks trackCount type uri url verified year
The call
data_api({"api":"spotify.artist","input":{"url":"https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa"}})Spotify Play Count
Fetch stream counts and stats for a Spotify track, album, or artist URL.
| Argument | Type | Required | What it is |
|---|---|---|---|
url | string | yes | Spotify track, album, or artist URL to fetch stream counts for (e.g. https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp). |
Returns albumName artistName durationMs id image name playCount previewUrl releaseDate trackNumber type url
The call
data_api({"api":"spotify.play_count","input":{"url":"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}})Spotify Podcast
Fetch a Spotify podcast show's name, publisher, description, rating, and topics by show URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | Spotify podcast show ID (alternative to url). |
url | string | no | Spotify podcast show URL (e.g. https://open.spotify.com/show/3mliji9352UAk3XnWElnDV). |
Returns averageRating description id image name publisher totalRatings uri url
The call
data_api({"api":"spotify.podcast","input":{"url":"https://open.spotify.com/show/3mliji9352UAk3XnWElnDV"}})Spotify Podcast Episodes
List a Spotify podcast show's episodes with titles, durations, descriptions, and release dates by show URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
cursor | string | no | Pagination cursor from a previous response for subsequent pages. |
id | string | no | Spotify podcast show ID (alternative to url). |
url | string | no | Spotify podcast show URL (e.g. https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk). |
Returns description durationMs episodes id name nextCursor releaseDate totalCount uri
The call
data_api({"api":"spotify.podcast_episodes","input":{"url":"https://open.spotify.com/show/4rOoJ6Egrf8K2IrywzwOMk"}})Spotify Track
Fetch a Spotify track's play count, popularity, duration, and album details by track URL or ID.
| Argument | Type | Required | What it is |
|---|---|---|---|
id | string | no | Spotify track ID (alternative to url). |
url | string | no | Spotify track URL (e.g. https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT). |
Returns albumName artistName durationMs id image name playcount popularity releaseDate shareUrl trackNumber uri
The call
data_api({"api":"spotify.track","input":{"url":"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}})Good to know
- The price shown is the usual one. A call can cost more when the first source fails and another serves it; the most it can cost is shown beside each API, and
max_creditssets your own limit. - These APIs return public data. What you may do with it depends on the platform's terms and the privacy law where you operate, and that responsibility is yours.
- A failed call is not charged.
When to choose something else
Choose a provider that specialises in Spotify data when you need it at high volume, on a schedule, or as bulk exports: you will get volume pricing and more control. Choose the platform's official API when you need data from your own account. These APIs are for an agent that needs an answer now, alongside other tools on the same balance.
Questions
Do I need a Spotify API key or developer account?
No. morigraph supplies the access. You connect morigraph once to your assistant, or use one morigraph API key from your own code, and call any of the 7 APIs on this page.
What does Spotify data cost through morigraph?
Between 0.024 and 0.048 credits a call depending on the API, where a credit is about 10 cents. That is from about $2.40 for 1,000 calls. You pay per call from one balance, with no separate subscription.
Can Claude, ChatGPT or Cursor get Spotify data?
Yes. Add morigraph as an MCP server, sign in once, then ask in plain words. Your assistant finds the right API with one search and runs it with one call.
Which Spotify data APIs are available?
Spotify Search, Spotify Album, Spotify Artist, Spotify Play Count, Spotify Podcast, Spotify Podcast Episodes and Spotify Track.
Prices and availability read from the production service on . A credit is about 10 cents of tool use; see pricing. Your assistant can quote the exact cost before a paid call.