Spotify Track API
API health
- 24h health
- Normal
- 24h average time
- —
- Healthy / normal
- Available
- Limited
- Mostly down
Last 24 hours
Last 30 days
Get one Spotify track's artists, album, length, play count, track and disc number, release date, label and content rating. duration_ms is in milliseconds, and the response carries no audio file and does not confirm territorial rights.
Price $1.39 per 1,000 requests ($0.001389 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.
AI prompt
Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.
Please help me write a data collection script with the EveryInfra Spotify Track endpoint (spotify/track).
Endpoint contract:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to spotify and action to track, and put the parameters inside params.
- Required parameters:
- url: 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).
- Returns one object. Main fields: id, url, name, artists, album_name, duration_ms, play_count, track_number, disc_number, is_explicit, release_date, preview_url; 18 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=spotify.
- Example request body:
{
"platform": "spotify",
"action": "track",
"params": {
"url": "https://open.spotify.com/track/0BeoYJ8te2AtohPr7I3SZD"
}
}
- Price: $1.39 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.
Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.Request parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
Authorization | header | string | Yes | - | Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository. |
platform | body | string | Yes | spotify | Platform identifier, fixed value. |
action | body | string | Yes | track | Capability identifier, fixed value. |
url | body.params | Not declared | Yes | - | 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. |
Code samples
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"
}
}'[OpenAPI definition (JSON)]Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.
Response example
Captured September 26, 2026 at 08:56 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response 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.
{
"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": { … }
}Response fields
Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.
| 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 | Keeps the platform's own meaning |
album_name | Keeps the platform's own meaning |
duration_ms | Keeps the platform's own meaning |
play_count | Keeps the platform's own meaning |
track_number | Keeps the platform's own meaning |
disc_number | Keeps the platform's own meaning |
is_explicit | Keeps the platform's own meaning |
release_date | Keeps the platform's own meaning |
preview_url | Keeps the platform's own meaning |
image_url | Image link. Capabilities with several images may return an image_urls array. |
added_at | Keeps the platform's own meaning |
platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |
album_id | Keeps the platform's own meaning |
album_type | Keeps the platform's own meaning |
label | Keeps the platform's own meaning |
content_rating | Keeps the platform's own meaning |
Errors and billing
- 401
- Missing or invalid key. Authentication runs before parameter checks, so unauthenticated requests never see the parameter schema.
- 422
- Wrong parameter name or value. The error lists the parameters and allowed values this capability accepts and the closest match; it happens before any charge.
- 402
- Insufficient balance. Top up first.
- 429
- The account's per-minute request limit was reached (all of its API keys count together; a key's own lower limit applies first). Wait for Retry-After and try again; a rate package in the console raises the limit.
- 503
- Could not complete right now. Any charge for the call goes back to your balance automatically, and the billing receipt in the response states the actual outcome, including when it is not yet known. Do not resend blindly.
- 200 empty
- The request completed without data and is not charged (billing.reason = empty_result_refunded).
Official references
Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.
- Spotify: Naked IDs Lack Explicit Resource Types ↗
Official documentation notes that a raw Spotify ID does not explicitly declare its underlying resource type without invocation context, whereas URIs encode type information. Callers must align the selected action, URL path, and targeted ID type, as a raw string will not automatically convert across different resource types.
Checked 2026-09-04
- Spotify: Tracks, Parent Albums, and Content Usage Boundaries ↗
Official Spotify track documentation separates `track` and `album` objects while detailing content attribution, download, and model training restrictions. Querying metadata via this endpoint does not provide full audio downloads or AI training permissions; official platform fields and `market` parameters are not automatically part of the endpoint contract.
Checked 2026-09-04