openapi: 3.0.3
info:
description: 'You can use Spotify''s Web API to discover music and podcasts, manage your Spotify library, control audio playback, and much more. Browse our available Web API endpoints using the sidebar at left, or via the navigation bar on top of this page on smaller screens.
In order to make successful Web API requests your app will need a valid access token. One can be obtained through OAuth 2.0.
The base URI for all Web API requests is `https://api.spotify.com/v1`.
Need help? See our Web API guides for more information, or visit the Spotify for Developers community forum to ask questions and connect with other developers.
'
version: 1.0.0
title: Spotify Web Albums Search API
termsOfService: https://developer.spotify.com/terms/
contact:
name: Spotify for Developers Community
url: https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
servers:
- url: https://api.spotify.com/v1
tags:
- name: Search
paths:
/search:
get:
tags:
- Search
operationId: search
x-spotify-policy-list:
- $ref: '#/components/x-spotify-policy/policies/MachineLearning'
summary: 'Search for Item
'
description: 'Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks
that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.
'
parameters:
- name: q
required: true
in: query
schema:
title: Query
description: 'Your search query.
You can narrow down your search using field filters. The available filters are `album`, `artist`, `track`, `year`, `upc`, `tag:hipster`, `tag:new`, `isrc`, and `genre`. Each field filter only applies to certain result types.
The `artist` and `year` filters can be used while searching albums, artists and tracks. You can filter on a single `year` or a range (e.g. 1955-1960).
The `album` filter can be used while searching albums and tracks.
The `genre` filter can be used while searching artists and tracks.
The `isrc` and `track` filters can be used while searching tracks.
The `upc`, `tag:new` and `tag:hipster` filters can only be used while searching albums. The `tag:new` filter will return albums released in the past two weeks and `tag:hipster` can be used to return only albums with the lowest 10% popularity.
'
example: remaster%20track:Doxy%20artist:Miles%20Davis
type: string
- name: type
required: true
explode: false
in: query
schema:
title: Item type
description: 'A comma-separated list of item types to search across. Search results include hits
from all the specified item types. For example: `q=abacab&type=album,track` returns
both albums and tracks matching "abacab".
'
items:
type: string
enum:
- album
- artist
- playlist
- track
- show
- episode
- audiobook
type: array
- $ref: '#/components/parameters/QueryMarket'
- name: limit
required: false
in: query
schema:
title: Limit
description: 'The maximum number of results to return in each item type.
'
default: 5
example: 10
type: integer
minimum: 0
maximum: 10
- name: offset
required: false
in: query
schema:
title: Offset
description: 'The index of the first result to return. Use
with limit to get the next page of search results.
'
default: 0
minimum: 0
maximum: 1000
example: 5
type: integer
- name: include_external
required: false
in: query
schema:
title: Include External
description: 'If `include_external=audio` is specified it signals that the client can play externally hosted audio content, and marks
the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response.
'
type: string
enum:
- audio
responses:
'200':
$ref: '#/components/responses/SearchItems'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/TooManyRequests'
security:
- oauth_2_0: []
components:
schemas:
NarratorObject:
type: object
x-spotify-docs-type: NarratorObject
properties:
name:
type: string
description: 'The name of the Narrator.
'
TrackRestrictionObject:
type: object
x-spotify-docs-type: TrackRestrictionObject
properties:
reason:
type: string
description: 'The reason for the restriction. Supported values:
- `market` - The content item is not available in the given market.
- `product` - The content item is not available for the user''s subscription type.
- `explicit` - The content item is explicit and the user''s account is set to not play explicit content.
Additional reasons may be added in the future.
**Note**: If you use this field, make sure that your application safely handles unknown values.
'
AlbumBase:
type: object
required:
- album_type
- total_tracks
- available_markets
- external_urls
- href
- id
- images
- name
- release_date
- release_date_precision
- type
- uri
properties:
album_type:
type: string
description: 'The type of the album.
'
enum:
- album
- single
- compilation
example: compilation
total_tracks:
type: integer
description: The number of tracks in the album.
example: 9
available_markets:
deprecated: true
type: array
items:
type: string
example:
- CA
- BR
- IT
description: 'The markets in which the album is available: [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). _**NOTE**: an album is considered available in a market when at least 1 of its tracks is available in that market._
'
external_urls:
allOf:
- $ref: '#/components/schemas/ExternalUrlObject'
description: 'Known external URLs for this album.
'
href:
type: string
description: 'A link to the Web API endpoint providing full details of the album.
'
id:
type: string
description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the album.
'
example: 2up3OPMp9Tb4dAKM2erWXQ
images:
type: array
items:
$ref: '#/components/schemas/ImageObject'
description: 'The cover art for the album in various sizes, widest first.
'
name:
type: string
description: 'The name of the album. In case of an album takedown, the value may be an empty string.
'
release_date:
type: string
example: 1981-12
description: 'The date the album was first released.
'
release_date_precision:
type: string
enum:
- year
- month
- day
example: year
description: 'The precision with which `release_date` value is known.
'
restrictions:
allOf:
- $ref: '#/components/schemas/AlbumRestrictionObject'
description: 'Included in the response when a content restriction is applied.
'
type:
type: string
enum:
- album
description: 'The object type.
'
uri:
type: string
example: spotify:album:2up3OPMp9Tb4dAKM2erWXQ
description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the album.
'
EpisodeBase:
type: object
required:
- audio_preview_url
- description
- html_description
- duration_ms
- explicit
- external_urls
- href
- id
- images
- is_externally_hosted
- is_playable
- languages
- name
- release_date
- release_date_precision
- type
- uri
properties:
audio_preview_url:
deprecated: true
type: string
nullable: true
example: https://p.scdn.co/mp3-preview/2f37da1d4221f40b9d1a98cd191f4d6f1646ad17
description: 'A URL to a 30 second preview (MP3 format) of the episode. `null` if not available.
'
x-spotify-policy-list:
- $ref: '#/components/x-spotify-policy/policies/StandalonePreview'
description:
type: string
example: 'A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.
'
description: 'A description of the episode. HTML tags are stripped away from this field, use `html_description` field in case HTML tags are needed.
'
html_description:
type: string
example: '
A Spotify podcast sharing fresh insights on important topics of the moment—in a way only Spotify can. You’ll hear from experts in the music, podcast and tech industries as we discover and uncover stories about our work and the world around us.
' description: 'A description of the episode. This field may contain HTML tags. ' duration_ms: type: integer example: 1686230 description: 'The episode length in milliseconds. ' explicit: type: boolean description: 'Whether or not the episode has explicit content (true = yes it does; false = no it does not OR unknown). ' external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'External URLs for this episode. ' href: type: string example: https://api.spotify.com/v1/episodes/5Xt5DXGzch68nYYamXrNxZ description: 'A link to the Web API endpoint providing full details of the episode. ' id: type: string example: 5Xt5DXGzch68nYYamXrNxZ description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the episode. ' images: type: array items: $ref: '#/components/schemas/ImageObject' description: 'The cover art for the episode in various sizes, widest first. ' is_externally_hosted: type: boolean description: 'True if the episode is hosted outside of Spotify''s CDN. ' is_playable: type: boolean description: 'True if the episode is playable in the given market. Otherwise false. ' language: type: string deprecated: true example: en description: 'The language used in the episode, identified by a [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code. This field is deprecated and might be removed in the future. Please use the `languages` field instead. ' languages: type: array items: type: string example: - fr - en description: 'A list of the languages used in the episode, identified by their [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code. ' name: type: string example: 'Starting Your Own Podcast: Tips, Tricks, and Advice From Anchor Creators ' description: 'The name of the episode. ' release_date: type: string example: '1981-12-15' description: 'The date the episode was first released, for example `"1981-12-15"`. Depending on the precision, it might be shown as `"1981"` or `"1981-12"`. ' release_date_precision: type: string example: day enum: - year - month - day description: 'The precision with which `release_date` value is known. ' resume_point: allOf: - $ref: '#/components/schemas/ResumePointObject' description: 'The user''s most recent position in the episode. Set if the supplied access token is a user token and has the scope ''user-read-playback-position''. ' type: type: string enum: - episode description: 'The object type. ' uri: type: string example: spotify:episode:0zLhl3WsOCQHbe1BPTiHgr description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the episode. ' restrictions: allOf: - $ref: '#/components/schemas/EpisodeRestrictionObject' description: 'Included in the response when a content restriction is applied. ' SimplifiedPlaylistObject: type: object x-spotify-docs-type: SimplifiedPlaylistObject properties: collaborative: type: boolean description: '`true` if the owner allows other users to modify the playlist. ' description: type: string description: 'The playlist description. _Only returned for modified, verified playlists, otherwise_ `null`. ' external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'Known external URLs for this playlist. ' href: type: string description: 'A link to the Web API endpoint providing full details of the playlist. ' id: type: string description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the playlist. ' images: type: array items: $ref: '#/components/schemas/ImageObject' description: 'Images for the playlist. The array may be empty or contain up to three images. The images are returned by size in descending order. See [Working with Playlists](/documentation/web-api/concepts/playlists). _**Note**: If returned, the source URL for the image (`url`) is temporary and will expire in less than a day._ ' name: type: string description: 'The name of the playlist. ' owner: allOf: - $ref: '#/components/schemas/PlaylistOwnerObject' description: 'The user who owns the playlist ' public: type: boolean description: 'The playlist''s public/private status (if it is added to the user''s profile): `true` the playlist is public, `false` the playlist is private, `null` the playlist status is not relevant. For more about public/private status, see [Working with Playlists](/documentation/web-api/concepts/playlists) ' snapshot_id: type: string description: 'The version identifier for the current playlist. Can be supplied in other requests to target a specific playlist version ' items: allOf: - $ref: '#/components/schemas/PlaylistTracksRefObject' description: 'A collection containing a link ( `href` ) to the Web API endpoint where full details of the playlist''s items can be retrieved, along with the `total` number of items in the playlist. Note, a track object may be `null`. This can happen if a track is no longer available. ' tracks: allOf: - $ref: '#/components/schemas/PlaylistTracksRefObject' deprecated: true description: '**Deprecated:** Use `items` instead. A collection containing a link ( `href` ) to the Web API endpoint where full details of the playlist''s tracks can be retrieved, along with the `total` number of tracks in the playlist. Note, a track object may be `null`. This can happen if a track is no longer available. ' type: type: string description: 'The object type: "playlist" ' uri: type: string description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the playlist. ' SimplifiedEpisodeObject: x-spotify-docs-type: SimplifiedEpisodeObject type: object allOf: - $ref: '#/components/schemas/EpisodeBase' - type: object ExternalUrlObject: type: object x-spotify-docs-type: ExternalUrlObject properties: spotify: type: string description: 'The [Spotify URL](/documentation/web-api/concepts/spotify-uris-ids) for the object. ' PagingSimplifiedEpisodeObject: type: object x-spotify-docs-type: PagingEpisodeObject allOf: - $ref: '#/components/schemas/PagingObject' - type: object properties: items: type: array items: $ref: '#/components/schemas/SimplifiedEpisodeObject' AuthorObject: type: object x-spotify-docs-type: AuthorObject properties: name: type: string description: 'The name of the author. ' PlaylistUserObject: type: object x-spotify-docs-type: PlaylistUserObject properties: external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'Known public external URLs for this user. ' href: type: string description: 'A link to the Web API endpoint for this user. ' id: type: string description: 'The [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids) for this user. ' type: type: string enum: - user description: 'The object type. ' uri: type: string description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for this user. ' PagingSimplifiedAlbumObject: type: object x-spotify-docs-type: PagingAlbumObject allOf: - $ref: '#/components/schemas/PagingObject' - type: object properties: items: type: array items: $ref: '#/components/schemas/SimplifiedAlbumObject' ErrorObject: type: object x-spotify-docs-type: ErrorObject required: - status - message properties: status: type: integer minimum: 400 maximum: 599 description: 'The HTTP status code (also returned in the response header; see [Response Status Codes](/documentation/web-api/concepts/api-calls#response-status-codes) for more information). ' message: type: string description: 'A short description of the cause of the error. ' PagingPlaylistObject: type: object x-spotify-docs-type: PagingPlaylistObject allOf: - $ref: '#/components/schemas/PagingObject' - type: object properties: items: type: array items: $ref: '#/components/schemas/SimplifiedPlaylistObject' SimplifiedAudiobookObject: x-spotify-docs-type: SimplifiedAudiobookObject allOf: - $ref: '#/components/schemas/AudiobookBase' - type: object AudiobookBase: type: object required: - authors - available_markets - copyrights - description - explicit - external_urls - href - html_description - id - images - languages - media_type - name - narrators - publisher - total_chapters - type - uri properties: authors: type: array items: $ref: '#/components/schemas/AuthorObject' description: 'The author(s) for the audiobook. ' available_markets: deprecated: true type: array items: type: string description: 'A list of the countries in which the audiobook can be played, identified by their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. ' copyrights: type: array items: $ref: '#/components/schemas/CopyrightObject' description: 'The copyright statements of the audiobook. ' description: type: string description: 'A description of the audiobook. HTML tags are stripped away from this field, use `html_description` field in case HTML tags are needed. ' html_description: type: string description: 'A description of the audiobook. This field may contain HTML tags. ' edition: type: string description: 'The edition of the audiobook. ' example: Unabridged explicit: type: boolean description: 'Whether or not the audiobook has explicit content (true = yes it does; false = no it does not OR unknown). ' external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'External URLs for this audiobook. ' href: type: string description: 'A link to the Web API endpoint providing full details of the audiobook. ' id: type: string description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the audiobook. ' images: type: array items: $ref: '#/components/schemas/ImageObject' description: 'The cover art for the audiobook in various sizes, widest first. ' languages: type: array items: type: string description: 'A list of the languages used in the audiobook, identified by their [ISO 639](https://en.wikipedia.org/wiki/ISO_639) code. ' media_type: type: string description: 'The media type of the audiobook. ' name: type: string description: 'The name of the audiobook. ' narrators: type: array items: $ref: '#/components/schemas/NarratorObject' description: 'The narrator(s) for the audiobook. ' publisher: deprecated: true type: string description: 'The publisher of the audiobook. ' type: type: string enum: - audiobook description: 'The object type. ' uri: type: string description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the audiobook. ' total_chapters: type: integer description: 'The number of chapters in this audiobook. ' ImageObject: type: object x-spotify-docs-type: ImageObject required: - url - height - width properties: url: type: string example: 'https://i.scdn.co/image/ab67616d00001e02ff9ca10b55ce82ae553c8228 ' description: 'The source URL of the image. ' height: type: integer example: 300 nullable: true description: 'The image height in pixels. ' width: type: integer example: 300 nullable: true description: 'The image width in pixels. ' ArtistObject: type: object x-spotify-docs-type: ArtistObject properties: external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'Known external URLs for this artist. ' followers: deprecated: true allOf: - $ref: '#/components/schemas/FollowersObject' description: 'Information about the followers of the artist. ' genres: deprecated: true type: array items: type: string example: - Prog rock - Grunge description: 'A list of the genres the artist is associated with. If not yet classified, the array is empty. ' href: type: string description: 'A link to the Web API endpoint providing full details of the artist. ' id: type: string description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the artist. ' images: type: array items: $ref: '#/components/schemas/ImageObject' description: 'Images of the artist in various sizes, widest first. ' name: type: string description: 'The name of the artist. ' popularity: deprecated: true type: integer description: 'The popularity of the artist. The value will be between 0 and 100, with 100 being the most popular. The artist''s popularity is calculated from the popularity of all the artist''s tracks. ' type: type: string enum: - artist description: 'The object type. ' uri: type: string description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the artist. ' SimplifiedShowObject: x-spotify-docs-type: SimplifiedShowObject allOf: - $ref: '#/components/schemas/ShowBase' - type: object AlbumRestrictionObject: type: object x-spotify-docs-type: AlbumRestrictionObject properties: reason: type: string enum: - market - product - explicit description: 'The reason for the restriction. Albums may be restricted if the content is not available in a given market, to the user''s subscription type, or when the user''s account is set to not play explicit content. Additional reasons may be added in the future. ' PagingSimplifiedShowObject: type: object x-spotify-docs-type: PagingShowObject allOf: - $ref: '#/components/schemas/PagingObject' - type: object properties: items: type: array items: $ref: '#/components/schemas/SimplifiedShowObject' PagingTrackObject: type: object x-spotify-docs-type: PagingTrackObject allOf: - $ref: '#/components/schemas/PagingObject' - type: object properties: items: type: array items: $ref: '#/components/schemas/TrackObject' CopyrightObject: type: object x-spotify-docs-type: CopyrightObject properties: text: type: string description: 'The copyright text for this content. ' type: type: string description: 'The type of copyright: `C` = the copyright, `P` = the sound recording (performance) copyright. ' PagingObject: type: object x-spotify-docs-type: PagingObject required: - href - items - limit - next - offset - previous - total properties: href: type: string example: 'https://api.spotify.com/v1/me/shows?offset=0&limit=20 ' description: 'A link to the Web API endpoint returning the full result of the request ' limit: type: integer example: 20 description: 'The maximum number of items in the response (as set in the query or by default). ' next: type: string example: https://api.spotify.com/v1/me/shows?offset=1&limit=1 nullable: true description: 'URL to the next page of items. ( `null` if none) ' offset: type: integer example: 0 description: 'The offset of the items returned (as set in the query or by default) ' previous: type: string example: https://api.spotify.com/v1/me/shows?offset=1&limit=1 nullable: true description: 'URL to the previous page of items. ( `null` if none) ' total: type: integer example: 4 description: 'The total number of items available to return. ' FollowersObject: type: object x-spotify-docs-type: FollowersObject properties: href: type: string nullable: true description: 'This will always be set to null, as the Web API does not support it at the moment. ' total: type: integer description: 'The total number of followers. ' PlaylistTracksRefObject: type: object x-spotify-docs-type: PlaylistTracksRefObject properties: href: type: string description: 'A link to the Web API endpoint where full details of the playlist''s tracks can be retrieved. ' total: type: integer description: 'Number of tracks in the playlist. ' SimplifiedArtistObject: type: object x-spotify-docs-type: SimplifiedArtistObject properties: external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'Known external URLs for this artist. ' href: type: string description: 'A link to the Web API endpoint providing full details of the artist. ' id: type: string description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the artist. ' name: type: string description: 'The name of the artist. ' type: type: string enum: - artist description: 'The object type. ' uri: type: string description: 'The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the artist. ' TrackObject: type: object x-spotify-docs-type: TrackObject properties: album: allOf: - $ref: '#/components/schemas/SimplifiedAlbumObject' description: 'The album on which the track appears. The album object includes a link in `href` to full information about the album. ' artists: type: array items: $ref: '#/components/schemas/SimplifiedArtistObject' description: 'The artists who performed the track. Each artist object includes a link in `href` to more detailed information about the artist. ' available_markets: deprecated: true type: array items: type: string description: 'A list of the countries in which the track can be played, identified by their [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. ' disc_number: type: integer description: 'The disc number (usually `1` unless the album consists of more than one disc). ' duration_ms: type: integer description: 'The track length in milliseconds. ' explicit: type: boolean description: 'Whether or not the track has explicit lyrics ( `true` = yes it does; `false` = no it does not OR unknown). ' external_ids: allOf: - $ref: '#/components/schemas/ExternalIdObject' description: 'Known external IDs for the track. ' external_urls: allOf: - $ref: '#/components/schemas/ExternalUrlObject' description: 'Known external URLs for this track. ' href: type: string description: 'A link to the Web API endpoint providing full details of the track. ' id: type: string description: 'The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track. ' is_playable: type: boolean description: 'Part of the response when [Track Relinking](/documentation/web-api/concepts/track-relinking) is applied. If `true`, the track is playable in the given market. Otherwise `false`. ' linked_from: deprecated: true type: object description: 'Part of the response when [Track Relinking](/documentation/web-api/concepts/track-relinking) is applied, and the requested track has been replaced with different track. The track in the `linked_from` object contains information about the originally requested track. ' restrictions: allOf: - $ref: '#/components/schemas/TrackRestrictionObject' description: 'Included in the response when a content restriction is applied. ' name: type: string description: 'The name of the track. ' popularity: deprecated: true type: integer description: 'The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.