Check if one or more tracks is already saved in the current Spotify user’s “Your Music” library.

Endpoints

GET https://api.spotify.com/v1/me/tracks/contains?ids={ids}

Request Parameters

Query argument
Value
ids
Required. A comma-separated list of the Spotify IDs for the tracks. Maximum: 50 IDs.

Header field
Value
AuthorizationRequired. A valid access token from the Spotify Accounts service: see the Web API Authorization Guide for details. The user-library-read scope must have been authorized by the user.

Response Format

On success, the HTTP status code in the response header is 200 OK and the response body contains a JSON array of true or false values, in the same order in which the ids were specified. On error, the header status code is an error code and the response body contains an error object.

Example

curl -X GET "https://api.spotify.com/v1/me/tracks/contains?ids=0udZHhCi7p1YzMlvI4fXoK,3SF5puV5eb6bgRSxBeMOk9" -H "Authorization: Bearer {your access token}"
[ true, false ]

Try it in our Web API Console