idstring
Spotify artist ID (alternative to url).
https://api.sandbase.ai/v1/api/spotify/artistFetch a Spotify artist's discography (albums, singles, top tracks) and metadata by artist URL or ID.
Ваш результат появится здесь
Заполните входные данные, затем нажмите «Запустить».
Fetch a Spotify artist's discography (albums, singles, top tracks) and metadata by artist URL or ID.
curl -X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "spotify/artist", "url": "https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa"}'
The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | Spotify artist ID (alternative to url). |
url | string | No | Spotify artist URL (e.g. https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa). |
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.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/spotify/artist" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa"
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
idstringSpotify artist ID (alternative to url).
urlstringSpotify artist URL (e.g. https://open.spotify.com/artist/3DiDSECUqqY1AuBP8qtaIa).
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
Сохранённый ответ не опубликован. Запустите API в Playground, чтобы посмотреть его ответ.
Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
Spotify ArtistЭтот API Spotify | От $0.0012 за запрос | JSON |
Spotify | От $0.0012 за запрос | JSON |
Spotify | От $0.0022 за запрос | JSON |
Spotify | От $0.0012 за запрос | JSON |
Spotify | От $0.0012 за запрос | JSON |
Spotify | От $0.0012 за запрос | JSON |
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/spotify/artist, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
От $0.0012 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.
Параметры не требуются. Необязательные: id (string) и url (string). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно).
Нет. Spotify Artist работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Spotify.