API REFERENCE
Search
On this page
/api/spotify/searchSearch for artists, albums, tracks, and playlists using the Spotify API. This endpoint is a proxy to the official Spotify Search API.
Authentication
See the authentication guide for API key and account access requirements.
Request
curl --request GET \
--url 'https://api.recoupable.dev/api/spotify/search?q=YOUR_Q&type=YOUR_TYPE' \
--header 'x-api-key: YOUR_API_KEY'Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.
Parameters
Query parameters
qstringrequiredThe search query keywords and optional field filters
typestringrequiredA comma-separated list of item types to search across: album, artist, playlist, track, show, episode, audiobook
marketstringAn ISO 3166-1 alpha-2 country code or 'from_token'
limitintegerMaximum number of results to return (default: 20, min: 1, max: 50)
Default: 20
offsetintegerThe index of the first result to return (default: 0, max: 10000)
Default: 0
Responses
200Search results retrieved successfully+
application/json
artistsobjectSearch results for artists (if type includes artist)
Properties for artists
hrefstringA link to the Web API endpoint returning the full result
itemsarray<SpotifyArtistObject>List of artist objects
Item properties for items
external_urlsobjectProperties for external_urls
spotifystringThe Spotify URL for the object
followersobjectProperties for followers
hrefstringnullableThis will always be set to null
totalintegerThe total number of followers
genresarray<string>A list of the genres the artist is associated with
Item properties for genres
string
hrefstringA link to the Web API endpoint providing full details
idstringThe Spotify ID for the artist
imagesarray<SpotifyImage>Images of the artist in various sizes
Item properties for images
urlstringThe source URL of the image
heightintegernullableThe image height in pixels
widthintegernullableThe image width in pixels
namestringThe name of the artist
popularityintegerThe popularity of the artist (0-100)
typestring · enumThe object type, always 'artist'
Values: "artist"
uristringThe Spotify URI for the artist
limitintegerThe maximum number of items in the response
nextstringnullableURL to the next page of items
offsetintegerThe offset of the items returned
previousstringnullableURL to the previous page of items
totalintegerThe total number of items available
albumsobjectSearch results for albums (if type includes album)
tracksobjectSearch results for tracks (if type includes track)
playlistsobjectSearch results for playlists (if type includes playlist)
400Bad request - missing required parameters+
application/json
errorobjectError details
Properties for error
statusintegerHTTP status code
messagestringError message
Full specification
Download the OpenAPI file for complete schemas, constraints, and examples.
Download social.jsonView operation source
{
"description": "Search for artists, albums, tracks, and playlists using the Spotify API. This endpoint is a proxy to the official Spotify Search API.",
"parameters": [
{
"name": "q",
"in": "query",
"description": "The search query keywords and optional field filters",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "type",
"in": "query",
"description": "A comma-separated list of item types to search across: album, artist, playlist, track, show, episode, audiobook",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "market",
"in": "query",
"description": "An ISO 3166-1 alpha-2 country code or 'from_token'",
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"description": "Maximum number of results to return (default: 20, min: 1, max: 50)",
"required": false,
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 50
}
},
{
"name": "offset",
"in": "query",
"description": "The index of the first result to return (default: 0, max: 10000)",
"required": false,
"schema": {
"type": "integer",
"default": 0,
"maximum": 10000
}
}
],
"responses": {
"200": {
"description": "Search results retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpotifySearchResponse"
}
}
}
},
"400": {
"description": "Bad request - missing required parameters",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SpotifyErrorResponse"
}
}
}
}
}
}