API para Spotify

API para Spotify: Contagem de reproduções

Obtenha as contagens de streams e estatísticas de uma URL de faixa, álbum ou artista do Spotify.

POST/v1/run/spotify.play_count
Requisições
-
30d

Preços

Um preço, em dólares

Provedores
Octopus- atendidas- de disponibilidade- p50US$ 3,30/mil req.preço fixo

Teste

Faça sua primeira requisição

Abrir em
Obter chave grátis
Resposta de exemplo
Execuções grátis retornam só os primeiros 3 resultados. Recarregue uma chave para receber a resposta completa.
{
  "data": {
    "items": [
      {
        "albumName": "Example title",
        "artistName": "Example title",
        "durationMs": 13,
        "id": "a1b2c3d4",
        "image": "https://example.com/image.jpg",
        "name": "Example title",
        "playCount": 12500,
        "previewUrl": "https://example.com/page",
        "releaseDate": "2024-01-15T09:30:00Z",
        "trackNumber": 42,
        "type": "general",
        "url": "https://example.com/page"
      }
    ]
  },
  "found": true,
  "reason": "not_found"
}
Interface da resposta
interface SpotifyPlayCountResponse {
  data: {
    items: {
      albumName?: string;
      artistName?: string;
      durationMs?: number;
      id: string;
      image?: string;
      name: string;
      playCount: number;
      previewUrl?: string;
      releaseDate?: string;
      trackNumber?: number;
      type?: string;
      url: 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 30d
POST /v1/run/spotify.play_count
curl -X POST https://api.getanyapi.com/v1/run/spotify.play_count \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}'
CampoTipoValor de exemplo
Corpo da requisição
urlstring"https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"URL de faixa, álbum ou artista do Spotify cujas contagens de streams serão obtidas (ex.: https://open.spotify.com/track/3n3Ppam7vgaVa1iaRUc9Lp).
Resposta
dataobject
data.itemsobject[]Play-count records for the requested Spotify entity (one per track). Populated whenever the provider has data for the entity.
data.items[].albumNamestringName of the album the track belongs to. Empty when the upstream omits it.
data.items[].artistNamestringName of the primary artist. Empty when the upstream omits it.
data.items[].durationMsintegerTrack duration in milliseconds.
data.items[].idstringThe Spotify entity ID. Populated whenever the provider has data for the entity.
data.items[].imagestringURL of the cover art image.
data.items[].namestringThe track (or entity) name. Populated whenever the provider has data for the entity.
data.items[].playCountintegerTotal number of streams/plays for the track. Populated whenever the provider has data for the entity.
data.items[].previewUrlstringURL of the 30-second audio preview.
data.items[].releaseDatestringRelease date as an ISO 8601 string.
data.items[].trackNumberintegerPosition of the track within its album.
data.items[].typestringThe Spotify entity type (e.g. "track").
data.items[].urlstringCanonical open.spotify.com URL for the entity, with tracking query params stripped. Populated whenever the provider has data for the entity.
foundbooleanWhether the track/album/artist was found and returned play-count records.
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çãoUSDUS$ 0,0033
Preço /mil req.USDUS$ 3,30

Dúvidas frequentes

Sobre o endpoint Contagem de reproduções da API para Spotify

O endpoint Contagem de reproduções da AnyAPI para Spotify retorna dados de Spotify em JSON normalizado com uma chamada POST para /v1/run/spotify.play_count. Obtenha as contagens de streams e estatísticas de uma URL de faixa, álbum ou artista do Spotify. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa a partir de US$ 3,30 por mil requisições, em dólares, sem assinatura e sem mínimo mensal.

Custa a partir de US$ 3,30 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Você recarrega uma carteira em dólares e cada chamada desconta dela. Algumas requisições pagas pela carteira que falham geram cobranças de processamento, que repassamos pelo custo, sem margem; a resposta de erro mostra o valor cobrado.

Obtenha as contagens de streams e estatísticas de uma URL de faixa, álbum ou artista do Spotify. A resposta é JSON normalizado, com o mesmo envelope que todo endpoint da AnyAPI retorna, então processar um segundo endpoint é só trocar a URL, e nada mais.