Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

Spotify Track

Dokumentasi API
https://api.sandbase.ai/v1/api/spotify/track

Fetch a Spotify track's play count, popularity, duration, and album details by track URL or ID.

Harga
Dari $0.0012USD / panggilan
Metode
POST
Respons
JSON
Parameter
0 wajib · 2 opsional

Playground

Input
Spotify track ID (alternative to url).
Spotify track URL (e.g. https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT).
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

README API

Spotify Track API

Fetch a Spotify track's play count, popularity, duration, and album details by track URL or ID.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "spotify/track", "url": "https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT"}'

The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.

Parameters

NameTypeRequiredDescription
idstringNoSpotify track ID (alternative to url).
urlstringNoSpotify track URL (e.g. https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT).

Pricing

Billed at the actual cost of each call, about $0.0012 per request. A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
SpotifyDari $0.0012 per panggilanJSON
SpotifyDari $0.0012 per panggilanJSON
SpotifyDari $0.0012 per panggilanJSON
SpotifyDari $0.0022 per panggilanJSON
SpotifyDari $0.0012 per panggilanJSON
SpotifyDari $0.0012 per panggilanJSON

Pertanyaan

FAQ

Bagaimana cara menggunakan API Spotify Track?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/spotify/track dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API Spotify Track?

Mulai dari $0.0012 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API Spotify Track?

Tidak ada parameter yang wajib. Opsional: id (string) dan url (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API Spotify Track?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron).

Apakah saya memerlukan akun developer atau kunci API Spotify?

Tidak. Spotify Track berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Spotify secara terpisah.