# Spotify on Onekey > 10 endpoints for Spotify (1 stable, 9 beta), 1 to 5 credits each. Category: Music & audio. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Access: 2 of 10 endpoints are marked "needs a pack" or "may need a pack": free-grant credits reach only the open fetch path; a verified email and a purchased pack unlock the rest. Page: https://onekey.dev/platforms/spotify Reference (Markdown): https://onekey.dev/docs/api/spotify.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 10 mapped Spotify endpoints return each: - `media.thumbnailUrl` (URL): 9 - `author.displayName` (string): 6 - `content.title` (string): 5 - `entity.id` (string): 5 - `entity.name` (string): 5 - `entity.stats.popularity` (number): 5 - `entity.url` (URL): 5 - `content.id` (string): 4 - `content.url` (URL): 4 - `entity.stats.itemCount` (integer): 3 - `media.previewUrl` (URL): 3 - `entity.category` (string): 2 - `entity.releaseDate` (ISO 8601 date): 2 - `entity.stats.followers` (integer): 2 - `content.createdAt` (ISO 8601 date): 1 - `content.text` (string): 1 - `entity.description` (string): 1 - `entity.language` (string): 1 - `media.embedUrl` (URL): 1 - plus 4 platform-specific fields under `ext.` ## Endpoints ### spotify.album Spotify album by id. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/spotify/album?id=6dVIqQ8qmQ5GBnJ9shOYGE` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Spotify id (22 chars) - Fields returned: `entity.id`, `entity.name`, `author.displayName`, `entity.url`, `media.thumbnailUrl`, `entity.releaseDate`, `entity.stats.itemCount` - Reference: https://onekey.dev/docs/api/spotify/album.md ### spotify.artist Spotify artist by id. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/spotify/artist?id=4Z8W4fKeB5YxbusRsdQVPb` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Spotify id (22 chars) - Fields returned: `entity.id`, `entity.name`, `entity.url`, `media.thumbnailUrl`, `entity.stats.followers`, `entity.stats.popularity`, `entity.category` - Reference: https://onekey.dev/docs/api/spotify/artist.md ### spotify.artist_top_tracks Top tracks of a Spotify artist (US). - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/spotify/artist_top_tracks?id=4Z8W4fKeB5YxbusRsdQVPb` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Spotify id (22 chars) - Fields returned: `content.id`, `content.title`, `author.displayName`, `content.url`, `media.thumbnailUrl`, `media.previewUrl`, `entity.stats.popularity`, `ext.album`, `ext.durationMs` - Reference: https://onekey.dev/docs/api/spotify/artist_top_tracks.md ### spotify.new_releases New album releases on Spotify. - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/spotify/new_releases` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `author.displayName`, `entity.url`, `media.thumbnailUrl`, `entity.releaseDate`, `entity.stats.itemCount` - Reference: https://onekey.dev/docs/api/spotify/new_releases.md ### spotify.oembed Spotify embed metadata for a track/album/playlist/artist/episode/show URL (oEmbed). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/spotify/oembed?url=https%3A%2F%2Fopen.spotify.com%2Ftrack%2F4uLU6hMCjMI75M1A2tKUQC` with header `x-api-key: YOUR_API_KEY` - Parameters: - `url` (string, required): Spotify open URL - Fields returned: `content.title`, `media.thumbnailUrl`, `media.embedUrl`, `ext.html`, `ext.provider` - Reference: https://onekey.dev/docs/api/spotify/oembed.md ### spotify.podcast A Spotify podcast (show): title, publisher, description, cover, rating where available. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: one record. - Request: `GET https://api.onekey.dev/v1/spotify/podcast?id=3mliji9352UAk3XnWElnDV` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, optional): Spotify show id (22 chars) - `url` (string, optional): Full URL of the Spotify show (alternative to id) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `author.displayName`, `entity.stats.itemCount`, `media.thumbnailUrl`, `entity.url`, `entity.language` - Reference: https://onekey.dev/docs/api/spotify/podcast.md ### spotify.podcast_episodes Episodes of a Spotify podcast, newest first. - Price: 2 credits per fresh call. Status: beta. Access: may need a pack. Returns: a list. - Request: `GET https://api.onekey.dev/v1/spotify/podcast_episodes?id=3mliji9352UAk3XnWElnDV` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, optional): Spotify show id (22 chars) - `url` (string, optional): Full URL of the Spotify show (alternative to id) - `cursor` (string, optional): Opaque cursor from a previous response's `pagination.next_cursor`. Omit for the first page. - Fields returned: `content.id`, `content.title`, `content.text`, `content.createdAt`, `content.url`, `ext.durationMs` - Reference: https://onekey.dev/docs/api/spotify/podcast_episodes.md ### spotify.search_artists Search Spotify artists. - Price: 5 credits per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/spotify/search_artists?q=radiohead` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `entity.id`, `entity.name`, `entity.url`, `media.thumbnailUrl`, `entity.stats.followers`, `entity.stats.popularity`, `entity.category` - Reference: https://onekey.dev/docs/api/spotify/search_artists.md ### spotify.search_tracks Search Spotify tracks. - Price: 1 credit per fresh call. Status: beta. Returns: a list. - Request: `GET https://api.onekey.dev/v1/spotify/search_tracks?q=never%20gonna%20give%20you%20up` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `author.displayName`, `content.url`, `media.thumbnailUrl`, `media.previewUrl`, `entity.stats.popularity`, `ext.album`, `ext.durationMs` - Reference: https://onekey.dev/docs/api/spotify/search_tracks.md ### spotify.track Spotify track by id. - Price: 1 credit per fresh call. Status: beta. Returns: one record. - Request: `GET https://api.onekey.dev/v1/spotify/track?id=4uLU6hMCjMI75M1A2tKUQC` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Spotify id (22 chars) - Fields returned: `content.id`, `content.title`, `author.displayName`, `content.url`, `media.thumbnailUrl`, `media.previewUrl`, `entity.stats.popularity`, `ext.album`, `ext.durationMs` - Reference: https://onekey.dev/docs/api/spotify/track.md ## Sample request ```bash curl "https://api.onekey.dev/v1/spotify/oembed?url=https%3A%2F%2Fopen.spotify.com%2Ftrack%2F4uLU6hMCjMI75M1A2tKUQC" \ -H "x-api-key: YOUR_API_KEY" ```