# Spotify Track API (spotify.track)

- Canonical page: [https://everyinfra.com/en/spotify-api/track](https://everyinfra.com/en/spotify-api/track?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "spotify", "action": "track", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=spotify&action=track

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Specifies the target open.spotify.com link, spotify:type:ID URI, or raw entity ID corresponding to the chosen action (artist, track, album, or playlist). Input types must match the endpoint action and cannot be interchanged. Legacy profile endpoints accept full Spotify links to return album and single streaming metadata rather than user profile account details. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| name | Name of the object itself, for account, product and business capabilities. |
| artists | platform-native meaning |
| album_name | platform-native meaning |
| duration_ms | platform-native meaning |
| play_count | platform-native meaning |
| track_number | platform-native meaning |
| disc_number | platform-native meaning |
| is_explicit | platform-native meaning |
| release_date | platform-native meaning |
| preview_url | platform-native meaning |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| added_at | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
| album_id | platform-native meaning |
| album_type | platform-native meaning |
| label | platform-native meaning |
| content_rating | platform-native meaning |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "spotify",
  "action": "track",
  "params": {
    "url": "https://open.spotify.com/track/0BeoYJ8te2AtohPr7I3SZD"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "spotify",
        "action": "track",
        "params": {
            "url": "https://open.spotify.com/track/0BeoYJ8te2AtohPr7I3SZD",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "spotify",
  "action": "track",
  "results": {
    "id": "0BeoYJ8te2AtohPr7I3SZD",
    "url": "https://open.spotify.com/track/0BeoYJ8te2AtohPr7I3SZD",
    "name": "Almost Real",
    "artists": [
      "Anarekli"
    ],
    "album_name": "Almost Real",
    "duration_ms": 163926,
    "play_count": 6671478,
    "track_number": 1,
    "is_explicit": false,
    "release_date": "2026-04-10T00:00:00Z",
    "preview_url": "https://p.scdn.co/mp3-preview/d04815deef2e2f3d5f6daba6cd63ebe4081802f4",
    "image_url": "https://i.scdn.co/image/ab67616d0000b273eab6ddcdb5e835d8c962265d",
    "platform": "spotify",
    "album_id": "5nFzrSca3XC5kHbq2gyRiz",
    "album_type": "SINGLE",
    "content_rating": "NONE"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=spotify
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
