Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt

Use this file to discover all available pages before exploring further.

$2.7 / 1k urls Extract play counts and statistics for Spotify artists, albums, and tracks from their URLs

Endpoint

POST /api/v1/agents/spotify/play-count/run

Parameters

urls
array
required
List · Spotify URLs — artists, albums, or tracks. One per line.
includeAlbums
boolean
default:false
Toggle · When given an artist URL, also pull every album track.
includeSingles
boolean
default:false
Toggle · When given an artist URL, also pull every single + EP track.
Toggle · When given an artist URL, also pull tracks from Spotify’s ‘Popular Releases’ section.
maxResults
integer
default:100
Number · Maximum number of rows to return. Apply when an artist URL is given with includeAlbums/Singles/Popular — caps total tracks pulled.

Response columns

FieldDisplay nameType
trackUrlTrack URLurl
trackNameTrack Nametext
typeTypetext
playsPlaysnumber
durationMsDuration (ms)number
trackTrack #number
contentRatingContent Ratingtext
artistArtisttext
artistUrlArtist URLurl
albumAlbumtext
albumUrlAlbum URLurl
releasedReleasedtext
albumTypeAlbum Typetext
albumTrackAlbum Track #number

Example

curl -X POST https://api.mindcase.co/api/v1/agents/spotify/play-count/run \
  -H "Authorization: Bearer mk_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "urls": [
      {
        "url": "https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b"
      },
      {
        "url": "https://open.spotify.com/track/7qiZfU4dY1lWllzX7mPBI3"
      },
      {
        "url": "https://open.spotify.com/track/4LRPiXqCikLlN15c3yImP7"
      },
      {
        "url": "https://open.spotify.com/track/3KkXRkHbMCARz0aVfEt68P"
      },
      {
        "url": "https://open.spotify.com/track/0e7ipj03S05BNilyu5bRzt"
      },
      {
        "url": "https://open.spotify.com/track/463CkQjx2Zk1yXoBuierM9"
      },
      {
        "url": "https://open.spotify.com/track/2HbKqm4o0w5wEeEFXm2sD4"
      },
      {
        "url": "https://open.spotify.com/track/5HCyWlXZPP0y6Gqq8TgA20"
      },
      {
        "url": "https://open.spotify.com/track/2dpaYNEQHiRxtZbfNsse99"
      },
      {
        "url": "https://open.spotify.com/track/1zi7xx7UVEFkmKfv06H8x0"
      }
    ]
  }
}'

Example response

Response
{
  "job_id": "job_7f3a2b1c",
  "status": "completed",
  "data": [
    {
      "trackUrl": "7qiZfU4dY1lWllzX7mPBI3",
      "trackName": "Shape of You",
      "type": "album",
      "plays": 4887369004,
      "durationMs": 233712,
      "track": 4,
      "contentRating": "none",
      "artist": null,
      "artistUrl": null,
      "album": "\u00f7 (Deluxe)",
      "albumUrl": "3T4tUhGYeRNVUGevb0wThu",
      "released": "2017-03-03",
      "albumType": "album",
      "albumTrack": null
    }
  ]
}