Spotify Track Detail & Play Count Metadata
Retrieve Spotify track metadata including artist name, album name, duration, stream play count, popularity, release date, and share URL.
curl -sG "https://api.agentapigate.ai/v1/music/spotify/track" \ --data-urlencode "url=https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT" \ --data-urlencode "format=md" \ -H "Authorization: Bearer aag_live_YOUR_KEY" \ -H "X-AAG-Max-Cost: 0.0100"
# Spotify Track Detail & Play Count Metadata (`music.spotify.track`) **id**: 4cOdK2wGLETKBW3PvgPWqT · **name**: Never Gonna Give You Up · **artist_name**: Rick Astley · **album_name**: Whenever You Need Somebody · **playcount**: 1207903562 · **popularity**: 7
Endpoint Parameters, Cost & Token Economy Reference
Endpoint ID:music.spotify.track · Method: GET| Parameter | Type | Req | Sample / Default | Description |
|---|---|---|---|---|
| url | string | required | https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT | Spotify track URL (e.g. https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT) or track ID |
| format | enum | optional | json | compact | md | Response format; compact or md cuts LLM tokens. |
| dry_run | 0 | 1 | optional | 1 | Returns exact pre-flight price quote & validation at $0.00 cost. |
| Access Rail / Metric | Value | Policy & SLA |
|---|---|---|
| API Key (PAYG) | $0.0030 / call | $0/mo · Balance never expires |
| Remote MCP Tool | music_spotify_track | OAuth 2.1 Hub & /mcp/social |
| x402 Base USDC | $0.0030 / call | Zero-signup USDC enabled |
| P50 Latency | 2548 ms | $0 billed on empty or 4xx/5xx |
| Token Economy | 222t → 66t (-77%) | Partner credit: paid_usd / x402 |
More music.spotify Sibling Endpoints
Search Spotify catalog across tracks, artists, albums, and podcasts by keyword with normalized IDs, artist credits, and URLs.
Retrieve Spotify artist metadata including followers, popularity score, verified badge, biography, top tracks, and discography albums.
Frequently Asked Questions
How do I call Spotify Track Detail & Play Count Metadata (music.spotify.track) over REST and Remote MCP?
Send GET requests to https://api.agentapigate.ai/v1/music/spotify/track with an aag_live_* / aag_agent_* Bearer key, pay per call via x402 USDC, or call MCP tool music_spotify_track on https://mcp.agentapigate.ai/mcp.
What does music.spotify.track cost per call and are failed calls billed?
Each successful HTTP 200 response costs $0.003 USD from a non-expiring PAYG balance ($0/month minimum). Upstream errors, empty responses, and ?dry_run=1 pre-flight quotes always bill $0.00.
How does ?format=md or ?format=compact optimize AI agent token usage on music.spotify.track?
Passing ?format=md transforms the response into normalized Markdown (~66 tokens vs ~222 raw tokens, saving 77% of LLM context budget) while preserving structured JSON via ?format=json.
Can I restrict an AI agent key to only social endpoints with a daily USD cap?
Yes. Create a scoped aag_agent_* sub-key via POST /v1/keys with allowed_packs: ["social"], optional allowed_endpoints: ["music.spotify.track"], read_only: true, and a hard daily_cap_usd enforced atomically in Redis.