API para Spotify: Faixa
Obtenha a contagem de reproduções, popularidade, duração e detalhes do álbum de uma faixa do Spotify pela URL ou ID da faixa.
Preços
Um preço, em dólares
Teste
Faça sua primeira requisição
{
"data": {
"albumName": "Example title",
"artistName": "Example title",
"durationMs": 13,
"id": "a1b2c3d4",
"image": "https://example.com/image.jpg",
"name": "Example title",
"playcount": 12500,
"popularity": 42,
"releaseDate": "2024-01-15T09:30:00Z",
"shareUrl": "https://example.com/page",
"trackNumber": 42,
"uri": "example"
},
"found": true,
"reason": "not_found"
}interface SpotifyTrackResponse {
data: {
albumName?: string;
artistName?: string;
durationMs: number;
id: string;
image?: string;
name: string;
playcount: number;
popularity: number;
releaseDate?: string;
shareUrl: string;
trackNumber: number;
uri: string;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 30dcurl -X POST https://api.getanyapi.com/v1/run/spotify.track \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| id | string | ID da faixa no Spotify (alternativa a url). |
| url | string | "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"URL da faixa no Spotify (ex.: https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT). |
| Resposta | ||
| data | object | |
| data.albumName | string | Name of the album the track appears on. |
| data.artistName | string | Name of the primary artist. |
| data.durationMs | integer | Populated whenever the provider has data for the entity. |
| data.id | string | Populated whenever the provider has data for the entity. |
| data.image | string | URL of the cover art image. |
| data.name | string | Populated whenever the provider has data for the entity. |
| data.playcount | integer | |
| data.popularity | integer | |
| data.releaseDate | string | Album release date as an ISO 8601 string. |
| data.shareUrl | string | Populated whenever the provider has data for the entity. |
| data.trackNumber | integer | Populated whenever the provider has data for the entity. |
| data.uri | string | Populated whenever the provider has data for the entity. |
| found | boolean | |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Preço | ||
| Preço por requisição | USD | US$ 0,0012 |
| Preço /mil req. | USD | US$ 1,20 |
Dúvidas frequentes
Sobre o endpoint Faixa da API para Spotify
O endpoint Faixa da AnyAPI para Spotify retorna dados de Spotify em JSON normalizado com uma chamada POST para /v1/run/spotify.track. Obtenha a contagem de reproduções, popularidade, duração e detalhes do álbum de uma faixa do Spotify pela URL ou ID da faixa. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa a partir de US$ 1,20 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Faixa da API para Spotify feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 2,2 segundos, em 3 chamadas medidas.