Napster API Version 2.1 Overview
Developers can interact with the Napster Platform in a number of ways. These docs aim to make the process as clear and simple as possible.
About this Version
This is the documentation for Napster API version 2.1.
Changelog can be found here.
Check out the versions endpoint for a quick and easy way to stay up to date with version additions, changes, and more.
Versioning
API calls should specify the version in the path.
API calls are defaulted to the latest stable version when no version is specified.
Clients should always specify version because, when a new version is released, they will get documents that they may not be able to interpret!
Getting Started
The first thing you'll need is an API key. All of our metadata requests (e.g., artist details, album listings, and so on — all listed at left) require an API key as a header in request:
curl -X GET -H "apikey: {api_key}" "https://api.napster.com/v2.1/artists/top"
You can get one by creating an app.
Note that, throughout this documentation, there are links that have API set as a parameter but, in practice, you should always set it in the apikey header of your request.
This enables you to better take advantage of caching.
Additionally, calls made on a member's behalf — e.g., adds to library, playlist manipulation, recent activity, favorites, etc. — require an OAuth access token. See below for documentation and examples.
Common Features
Cross-Origin Resource Sharing (CORS)
In general, we're CORS-friendly.
API Rate Limits
When you create an Application, your base rate limit is set at 5 requests/second. You can view your Application's rate limit by clicking into the Application details in the My Applications section of the portal.
If you have exceeded the rate limit, you will receive a 429
error similar to the following:
{"code":"TooManyRequestsError","message":"Rate of 5/sec has been exceeded for this application"}
If you'd like to increase your Application's rate limit, please make an inquiry to api-feedback@napster.com
Paging
Most of the APIs you'd expect to support paging, do (charts lists, etc.). Use
limit
and
offset
parameters to get what you want, like so:
The max
limit
supported is 200. If an invalid
limit
, a negative
limit
or a
limit
higher than 200 is passed, a 400 error will be returned.
International Catalog
Unless otherwise specified, all metadata requests will be routed to the US catalog. If you'd like to use a specific catalog other than US, just pass in the two-letter country code (which is case-sensitive)
Authenticated requests (e.g., those made with OAuth access tokens) will be routed automatically to the member's default catalog.
Napster uses ISO 3166-1 alpha-2 country codes to identify different countries' catalogs.
Language support
Unless otherwise specified, all requests will return English (US) content. If you'd like to use a specific language, other than English (US), just use
lang
query parameter to pass in the first two segments of language string:
Authenticated requests (e.g., those made with OAuth access tokens) will be routed by default to the member's language obtained from the member's account-configured language.
Language support is only available for APIs that have examples showing how to use it.
Napster uses IETF RFC 5646 language codes to identify different languages.
Pretty Print JSON
All the API calls are minified by default. You can pretty print the JSON object if you add
pretty=true
parameter to API calls.
Filter Streamable Content
Many api calls support the
isStreamableOnly=true
flag. This query string parameter will filter out content that is not streamable.
WARNING
Passing this flag will make the
totalCount
value inaccurate on many endpoints. You will need to paginate until no more data is received to ensure you are at the end of the list. If you do not pass this flag, then all pagination values will be accurate.
Errors
Napster API attempts to return appropriate HTTP status codes for every request.
Status codes
Code | Text | Description |
---|---|---|
200 | OK | Success! |
201 | Created | The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URI(s) returned in the Location HTTP header field of the response. |
202 | Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. |
204 | No Content | The server has fulfilled the request but does not need to return an entity-body |
400 | Bad Request | The request was invalid or cannot be otherwise served. A response error message may explain reasons in more detail. |
401 | Unauthorized | Authentication credentials were missing or incorrect. If you are accessing metadata API endpoints only with apikey, check that it is valid. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. This status code is used when you try to modify or access resources you do not have permission for. |
404 | Not Found | The URI requested is invalid or the resource requested does not exist. |
405 | Method Not Allowed | The method specified in the request is not allowed for the resource identified by the request URI. See response headers for allowed methods. |
409 | Conflict | The request could not be completed due to a conflict with the current state of the resource you were trying to update. |
413 | Payload Too Large | The attached object was too large. Try again with a smaller object. |
423 | User Account Locked | User account is temporarily locked out of Napster API services. To unlock your account you will need to wait the required 5-minute lock out window or you can reset your password. |
429 | Too Many Requests | Used when a request cannot be served due to the rate limit having been exhausted (throttling). |
500 | Internal Server Error | Something is broken. Please email all relevant details to api-feedback@napster.com. |
For a more detailed and general list of status codes with explanations see here.
Error messages
When Napster API's return an error message it is in JSON format and might look something like this:
{
code: "ResourceNotFound",
message: "Unable to find an artist with ID 'art.test'."
}
It is very useful to observe the code (HTTP status code name) and message fields while observing or debugging responses.
Changelog
Here are listed changes introduced in version 2.1.
Note: marks breaking change.
Change | Description | |
---|---|---|
Image object | The image object has been completely redesigned. | |
Meta object | Changed meta object to use "returnedCount" and "totalCount" consistently. | |
Track object | Added "artistId" attribute to the track object. | |
Album object | Added "isStreamable" attribute to the album object. | |
Endpoint: GET /me/personalized/albums/new | New endpoint added. Get personalized reccomendations on newly released albums. | |
Endpoint: GET /artists/{id}/posts | New endpoint added. Returns a list of blog posts and other features related to an artist, written by our editorial staff. | |
Endpoint: GET /artists/{id}/images | New endpoint added. Returns a list of licensed images for an artist. | |
Endpoint: GET /artists/{id}/albums/top | New endpoint added. Returns a list of the artist's most popular albums, sorted descendingly by listening activity. | |
Endpoint: GET /albums/reviews/{id} | New endpoint added. Returns a review by ID | |
Endpoint: GET /albums/{id}/reviews | New endpoint added. Returns a list of reviews of the specified album. | |
Endpoint: GET /albums/{id}/posts | New endpoint added. Returns a list of blog posts and other features related to an album, written by our editorial staff. | |
Endpoint: GET /albums/{id}/images | New endpoint added. Returns a list of licensed imagery for a given album. | |
Endpoint: /albums/{id}/similar | New endpoint added. Get similar albums. | |
Endpoint: GET /albums/{artist_shortcut}/{album_shortcut} | New endpoint added. Get a track by shortcut. |
Authentication (OAuth 2.0)
Napster supports the OAuth 2 standard for making API calls on behalf of a member. In general, you will need an OAuth access token for any endpoint that begins with /me . We currently support the two most common flows:
- Implicit (a.k.a., the "three-legged" OAuth flow), and
- Resource Owner Password Credentials (a.k.a., the "password-grant" OAuth flow)
Recommended Authorization and Authentication Process
Authorize endpoint
To obtain a token that is used to authenticate all further API calls the client will need to go through a two step process. The first step will be to generate an authorization code which is then included in the next step which will produce the final token.
Authorization endpoint has following query string parameters:
-
response_type
Has to be value ofcode
ortoken
. -
code_challenge_method
Has to be value ofs256
orplain
. Client should use s256 if they are capable of hashing the code_challenge with SHA256. (Recommended) -
code_challenge
Value used to verify client in the 2nd step of the authentication. Should be hashed ifcode_challenge_method
is s256 with SHA256 or plain text if method is plain. -
client_id
Unique identifier (ID) of the registered application making the authorization request (Your app ID can be found in the application details found in the developer portal). -
redirect_uri
The callback URI registered with the application making the request (see the Developer Portal for details). Note that this must be an exact match with what is registered with the application. -
Optional values that will be passed in the query of the success response call:
-
state
-
scope
-
audience
-
Example curl call:
"https://api.napster.com/v2.2/oauth/authorize?client_id=your_application_id&redirect_uri=http://yourdomain.com/somepath&response_type=token&code_challange_method=s256&code_challenge=aa825702d43e823cdf0e6a0cac7b756b600555ed539f7f875f4542dbf52d7b30&state=your_state_value"
In cases where error occurs during processing of request that has all of the parameters valid, response with http status code of 302 will be returned along with query parameter error
without value attached to it.
Access token endpoint
This endpoint can be used to generate new tokens using refresh tokens and to generate new tokens after a successful call to the authorization endpoint. Caller will find a code
query string param value in the 302 response of the authorization call. That value must be included in the body of this API call in order to generate tokens. This endpoint requires an HTTP POST with the following JSON body:
-
client_id
Unique identifier (ID) of the registered application making the authorization request (Your app ID can be found in the application details found in the developer portal). -
grant_type
Can be eitherauthorization_code
orrefresh_token
. -
redirect_uri
The callback URI registered with the application making the request (see the Developer Portal for details). Note that this must be an exact match with what is registered with the application. -
Values that have to be passed if grant_type is
authorization_code
-
code_verifier
Has to be unhashed value from the previous endpoint used in the parametercode_challenge
. -
code
The value found in thecode
query string param from the authorization endpoint. -
username
Account username. -
password
Account password.
-
-
refresh_token
Has to be passed if the grant_type isrefresh_token
. Value used to generate new token.
Example curl call for the grant_type authorization_code
curl -v -X POST -H "Content-Type: application/json" -d '{"username":"user@domain.com","password":"secret","grant_type":"authorization_code","client_id":"your_application_id","redirect_uri":"http://yourdomain.com/somepath","code_verifier":"unhashed_value","code":"generated_code_from_authorize"}' "https://api.napster.com/v2.2/oauth/access_token"
Example curl call for the grant_type refresh_token
curl -v -X POST -H "Content-Type: application/json" -d '{"grant_type":"refresh_token","client_id":"your_applicationid","redirect_uri":"http://yourdomain.com/somepath","refresh_token":"refresh_token"}' "https://api.napster.com/v2.2/oauth/access_token"
Implicit
See what it looks like for a client to integrate 3 legged Oauth with the code sample provided here: https://jsfiddle.net/napstercat/zf0wjup7/
In this flow, your application directs the member (in a Web browser) to a Napster-hosted sign-in form, where she's prompted to authorize your application:
"https://api.napster.com/oauth/authorize?client_id={api_key}&redirect_uri=http://yourdomain.com/somepath&response_type=code"
An optional state
parameter for this request is also supported as described by
OAuth RFC 6749.
"https://api.napster.com/oauth/authorize?client_id={api_key}&redirect_uri=http://yourdomain.com/somepath&response_type=code&state={your_state_value}"
If the member accepts your request for authentication, we redirect back to your redirect_uri
with a temporary code in the code
query parameter. If originally passed in, the state
parameter is also returned, unchanged.
http://yourdomain.com/somepath?code={temporary_code}&state={your_state_value}
Then, exchange this code
for an access token, using your application secret:
curl -v -X POST -d "client_id={api_key}&client_secret={api_secret}&response_type=code&grant_type=authorization_code&redirect_uri={redirect_uri}&code={temporary_code}" "https://api.napster.com/oauth/access_token"
If the member cancels the authentication in the middle of the OAuth flow, the member is sent back to the redirect_uri
with the error
, error_reason
and error_description
parameters describing the error. If originally passed in, the state
parameter is also returned, unchanged.
{redirect_uri}?error=access_denied&error_reason=user_denied&error_description=The%20user%20denied%20your%20request.&state={your_state_value}
Password Grant
In this flow, you exchange a member's username and password (which your application obtains directly from the member) for an access token and a refresh token. You can then safely store these two tokens in your application, and use them to make authenticated calls.
curl -v -X POST -u "{api_key}:{api_secret}" -d "username=user@domain.com&password=secret&grant_type=password" "https://api.napster.com/oauth/token"
Access Token Responses
In either flow, you'll receive an
access_token
and a
refresh_token
:
{
"access_token" : "HYGIuQkfWHawATkDSfJC5acAl7ed",
"refresh_token" : "YUPzO9xC0kfyWq8Vi8OIzpfaPW2PO6x9",
"expires_in" : "86399"
}
Using these (example) tokens, you can make API requests on the member's behalf — for instance, to obtain the member's listening history, passing the access token value in an Authorization header (of type "Bearer"):
curl -v -H "Authorization: Bearer HYGIuQkfWHawATkDSfJC5acAl7ed" "https://api.napster.com/v2.1/me/listens"
Token Expiration
Access tokens expire regularly, so your application should take steps to refresh them as needed. (Note the
expires_in
value above, which denotes that the associated token expires in 86399 seconds, or just under 24 hours.) To do so, simply call the access_token service, passing your client secret:
curl -v -X POST -d "client_id={api_key}&client_secret={api_secret}&response_type=code&grant_type=refresh_token&refresh_token={refresh_token}" "https://api.napster.com/oauth/access_token"
Metadata APIs
Metadata APIs provide information about musical and editorial content available through Napster.
See a code sample of Metadata in action with this fiddle!: https://jsfiddle.net/napstercat/b9Lpavv9/
Artists
Note: For multiple artists, just supply a comma separated list of artist ids.
GET Top Artists
- /v2.1/artists/top
- /v2.1/artists/top?limit=5
- /v2.1/artists/top?limit=5&offset=5
- /v2.1/artists/top
- /v2.1/artists/top?limit=5
- /v2.1/artists/top?limit=5&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Artist Detail
Returns a given artist's name, ID and primary genre.
You can also use the artist's shortcut to get the details.
GET Artist Images
Returns a list of licensed images for an artist.
GET Discography
Returns the artist's full discography, sorted descendingly by release date.
- /v2.1/artists/Art.28463069/albums
- /v2.1/artists/Art.28463069,Art.7375005/albums?limit=5
- /v2.1/artists/Art.28463069/albums?limit=5
- /v2.1/artists/Art.28463069/albums?limit=5&offset=10
GET Top Albums for an Artist
- /v2.1/artists/Art.28463069/albums/top
- /v2.1/artists/Art.28463069,Art.7375005/albums/top?limit=5
- /v2.1/artists/Art.28463069/albums/top?limit=5
- /v2.1/artists/Art.28463069/albums/top?limit=5&offset=10
- /v2.1/artists/Art.28463069/albums/top
- /v2.1/artists/Art.28463069/albums/top?limit=5
- /v2.1/artists/Art.28463069/albums/top?limit=5
- /v2.1/artists/Art.28463069/albums/top?limit=5&offset=10
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET New Releases by Artist
Returns a list of an artist's new releases (if any), updated weekly.
- /v2.1/artists/Art.28463069/albums/new
- /v2.1/artists/Art.28463069,Art.7375005/albums/new?limit=5
- /v2.1/artists/Art.28463069/albums/new?limit=5
- /v2.1/artists/Art.28463069/albums/new?limit=5&offset=10
GET Artist's Tracks
Returns a list of Tracks by the Artist
WARNING This endpoint expects alimit
parameter. See
Paging
for more information.
GET Top Tracks for an Artist
Returns an optionally paged list of the artist's most popular songs, sorted descendingly by listening activity.
- /v2.1/artists/Art.28463069/tracks/top
- /v2.1/artists/Art.28463069,Art.7375005/tracks/top
- /v2.1/artists/Art.28463069/tracks/top?limit=10
- /v2.1/artists/Art.28463069/tracks/top?limit=10&offset=5
- /v2.1/artists/Art.28463069/tracks/top
- /v2.1/artists/Art.28463069/tracks/top?limit=10
- /v2.1/artists/Art.28463069/tracks/top?limit=10&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Editorial Posts by Artist
Introduced v2.1
Returns a list of blog posts and other features related to an artist, written by our editorial staff.
GET Similar artists
Introduced v2.2
Returns similar artists matched for the passed artistId.
- /v2.1/artists/Art.28463069/similar Note: This endpoint only takes one artist at a time.
Albums
Note: For multiple albums, just supply a comma separated list of album ids.
GET New Releases
Returns a list of all new releases, updated daily.
GET Staff Picks
Returns a list of selected Albums by the staff.
GET Top Albums
Returns a list of the top albums across Napster, updated daily. Optionally paged.
- /v2.1/albums/top
- /v2.1/albums/top?limit=5
- /v2.1/albums/top?limit=5&offset=5
- /v2.1/albums/top
- /v2.1/albums/top?limit=5
- /v2.1/albums/top?limit=5&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Album Detail
Returns detailed information about a given album, including its tracks.
GET Album Detail with Artist and Album Shortcuts
Returns detailed information about a given album, including its tracks.
GET Album Images
Introduced v2.1
Returns a list of licensed imagery for a given album.
GET Album Tracks
Returns a list of the specified album's tracks.
GET Album Reviews
Returns a list of reviews of the specified album.
GET Editorial Posts by Album
Returns a list of blog posts and other features related to an album, written by our editorial staff.
To get personalized new releases send member's ID inside guid
query parameter.
- /v2.1/albums/new?guid=55700652424805987858910647303628
- /v2.1/albums/new?guid=55700652424805987858910647303628&limit=5
- /v2.1/albums/new?guid=55700652424805987858910647303628&limit=5&offset=5
GET Similar Albums
Returns a list of similar albums for the given album.
GET Album By UPC
Introduced v2.2
Returns detailed information about an album, identified by UPC.
Note: This endpoint only takes one UPC at a time.
Tracks
This code sample shows how you can view top tracks and play a sample from them: https://jsfiddle.net/napstercat/c4zczg6j/
GET Top Tracks
Returns a list of the top tracks across Rhapsody, updated daily.
- /v2.1/tracks/top
- /v2.1/tracks/top?limit=5
- /v2.1/tracks/top?limit=5&offset=2
- /v2.1/tracks/top
- /v2.1/tracks/top?limit=5
- /v2.1/tracks/top?limit=5&offset=2
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Track Detail
Returns detailed information about a track or tracks, including artist and album and genre information.
Note: For multiple tracks, just supply a comma separated list of track ids.
GET Track By ISRC
Introduced v2.2
Returns detailed information about a track, identified by ISRC, including artist and album and genre information.
upc
Universal Product Code for the parent album release for the track.
limit
which should be positive number with minimum value of 1 and maximum value of 50 (values above will throw error),
offset
positive number
catalog
should be passed by catalog tag
isStreamableOnly
accepting string value, which should be true or false (defaults to false)
Note: This endpoint only takes one ISRC at a time. Example calls:
GET Track Detail by Artist, Album and Track Shortcuts
Returns detailed information about a given track.
Genres
Note: For multiple genres, just supply a comma separated list of genre ids.
GET All Genres and Subgenres
Returns a hierarchical map of all genres and subgenres.
Use optional lang
parameter to specify a language for the response.
Napster uses IETF RFC 5646 language codes to identify different languages.
GET Genre Detail
Returns detailed information about a genre, including description.
You can also use genre's shortcut to get the details.
Use optional lang
parameter to specify a language for the response.
Napster uses IETF RFC 5646 language codes to identify different languages.
GET Editorial Posts by Genre
Returns a list of blog posts and other features by genre, written by our editorial staff.
GET Programmed Stations by Genre
Returns a list of editorially-programmed radio stations by genre.
GET Top Artists by Genre
Returns an optionally paged list of the most popular artists by genre, updated daily.
- /v2.1/genres/g.397/artists/top
- /v2.1/genres/g.397,g.115/artists/top
- /v2.1/genres/g.397/artists/top?limit=5
- /v2.1/genres/g.397/artists/top?limit=5&offset=5
- /v2.1/genres/g.397/artists/top
- /v2.1/genres/g.397,g.115/artists/top
- /v2.1/genres/g.397/artists/top?limit=5
- /v2.1/genres/g.397/artists/top?limit=5&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Top Playlists by Genre
Introduced v2.2
Returns an optionally paged list of the most popular playlists by genre. Supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Top Albums by Genre
Returns an optionally paged list of the most popular albums by genre, updated daily.
- /v2.1/genres/g.397/albums/top
- /v2.1/genres/g.397,g.115/albums/top
- /v2.1/genres/g.397/albums/top?limit=5
- /v2.1/genres/g.397/albums/top?limit=5&offset=5
- /v2.1/genres/g.397/albums/top
- /v2.1/genres/g.397,g.115/albums/top
- /v2.1/genres/g.397/albums/top?limit=5
- /v2.1/genres/g.397/albums/top?limit=5&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET Top Tracks by Genre
Returns an optionally paged list of the most popular tracks by genre and subgenre, updated daily.
- /v2.1/genres/g.397/tracks/top
- /v2.1/genres/g.397,g.115/tracks/top
- /v2.1/genres/g.397/tracks/top?limit=5
- /v2.1/genres/g.397/tracks/top?limit=5&offset=5
- /v2.1/genres/g.397/tracks/top
- /v2.1/genres/g.397,g.115/tracks/top
- /v2.1/genres/g.397/tracks/top?limit=5
- /v2.1/genres/g.397/tracks/top?limit=5&offset=5
This endpoint supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
GET New Release Albums by Genre
Returns a list of all new releases by genre.
Playlists
This code sample demonstrates how you can integrate public playlists: https://jsfiddle.net/napstercat/b9Lpavv9/
Note: For multiple playlists, just supply a comma separated list of playlist ids.
GET Playlists of the Day Curated by Editorial
GET Featured Playlists
GET Playlist Detail
GET Playlist Tracks
Returns a list of tracks in a playlist. If multiple playlists are passed in, only the first playlist is used.
WARNING
Depending on the number of tracks in the playlist, this request could take a
considerable amount of time to respond. It is recommended that you use appropriate values for
limit
and
offset
parameters to incrementally get all the data.
WARNING
This endpoint expects a
limit
parameter. See
Paging
for more information.
GET Top Playlists
Introduced v2.2
Returns a list of top playlists. Supports optional query parameter
range
which can have one of values:
day, week, month, year
and
life.
Default value is
month.
Stations
Stations, also referred to as 'programmed stations', are continuously streaming options which are seeded with by editorial staff or members and provide hours of uninterrupted listening content.
GET Stations
Introduced v2.2
Returns an optionally paged list of stations.
GET Top Stations
Returns an optionally paged list of popular stations.
GET Decade Stations
Returns a list of stations themed around musical decades.
GET Station Detail
Returns information about a given station.
Note: For multiple stations, just supply a comma separated list of station ids.
GET Programmed Station Tracks
Returns track metadata for the programmed station.
curl -v -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" "https://api.napster.com/v2.1/stations/ps.147088912/tracks"
Station Playback
For more information about obtaining tracks, tuning stations, or submitting station feedback see Station Playback
Editorial Posts
Posts are rich content created by our editorial staff. Each post focuses on an artist, genre, album, musical movement, concert, or special exclusive content and provides listening content along with descriptive material about the content.
GET All Posts
Returns an optionally paged list of all featured editorial posts, sorted by date.
GET Post Detail
Returns a full post.
Note: For multiple posts, just supply a comma separated list of post ids.
GET Post Categories
Returns a list of all post categories available.
GET Posts by a Category
Returns all Posts grouped under a Category.
Search
Search through
album, artist, track, tag,
and
playlist
content items.
You can use the query parameter
type
with one or more of the above values each separated by a comma.
NOTE: If
type
is not set
album, artist, track
and
playlist
content types will all be returned.
When searching for playlists you can use the query parameter
preference
with value
editorial
to search editorial playlists. Otherwise, member playlists will be returned.
Use
limit
and
perTypeLimit
query parameters to limit overall and per type number of items returned respectively.
When searching for playlists you can use the query parameter
playlist_type
with value
editorial
to search editorial playlists. Otherwise, member playlists will be returned.
Use
per_type_limit
query parameter to limit per type number of items returned.
GET Typeahead-Style Search
Returns an array of typed results by substring.
- /v2.1/search?q=weezer&type=artist
- /v2.1/search?q=weezer&limit=5
- /v2.1/search?q=weezer&limit=5&offset=5
- /v2.1/search?q=weezer&type=playlist&limit=5&preference=editorial
- /v2.1/search?q=queen&perTypeLimit=4
- /v2.1/search?query=weezer&type=artist
- /v2.1/search?query=weezer&per_type_limit=5
- /v2.1/search?query=weezer&per_type_limit=5&offset=5
- /v2.1/search?query=weezer&type=playlist&per_type_limit=5&playlist_type=editorial
GET Full-Text Search
Returns an array of typed results by keyword or keyword combination.
- /v2.1/search/verbose?q=weezer blue album
- /v2.1/search/verbose?q=say it aint so&type=track&limit=1
- /v2.1/search/verbose?q=rap&type=playlist&limit=1&offset=1
- /v2.1/search/verbose?q=weezer&type=playlist&limit=5&preference=editorial
- /v2.1/search/verbose?q=queen&perTypeLimit=4
- /v2.1/search/verbose?query=weezer blue album
- /v2.1/search/verbose?query=say it aint so&type=track&per_type_limit=1
- /v2.1/search/verbose?query=rap&type=playlist&per_type_limit=1&offset=1
- /v2.1/search/verbose?query=weezer&type=playlist&per_type_limit=5&playlist_type=editorial
Note that the
type=radio
query parameter for search is now deprecated.
Versions
GET All Versions
Returns all versions, latest stable version, and the version currently being developed.
Public Member APIs
Public Member APIs provide information that can be accessed without an OAuth access token. Data about members is limited based upon member's visibility settings.
Profile
GET Public Member Avatar
Returns avatar photo information for a member. Endpoint mirrors the /me
version of this endpoint. See
GET Member Avatar
for full details of accepted options.
Authenticated Member APIs
Authenticated Member APIs provide information about Napster members. Any calls to these /me
endpoints require OAuth access tokens to access data on behalf of the member. See
Authentication Section
for details on how to obtain an access token.
Account
GET Member Account Details
Returns information about currently authenticated members account (first and last name, id, email, country, language, phone -if the account has one associated with it-, etc.), subscription (billing partner code, tier and product codes and names, trial information and etc.) and entitlements (information about member's rights, tier and limits).
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/account"
Within this returned data, the following must be checked:
- Within the subscription key, if either the value of the isSuspended element is true, or the value of the state element is "EXPIRED", you should message the member that there is a problem with their account and direct them to http://www.napster.com if possible.
- Within the entitlements key, you must check the canStream* entitlements for your specific integration type (Web, Home Audio Device, etc.) For example, if your integration is for a home audio streaming product, you will need to check to ensure that the value of the canStreamOnHomeDevice element is true. If this is false you cannot permit streaming on the device, should message the member that they need to upgrade their account to use on the device, and direct them to http://www.napster.com if possible.
Favorites
This endpoint has a
filter
parameter which can be used to retrieve specific favorite types.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites?filter=track"
NOTE: The
isStreamableOnly
parameter is supported on this endpoint but only in conjunction with the track and album
filter
parameters. The
isStreamableOnly
parameter will not be used if one of these filters is not passed as well.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites?isStreamableOnly=true&filter=track"
GET Member Favorites
Returns a list of favorited items in a member’s library.
WARNING
This endpoint expects a
limit
parameter.
Accepts optional parameter offset
to select a range of results.
Accepts optional parameters limit
and offset
to select a range of results. By default these values are 20 and 0, respectively.
Additionally, you can use the filter
parameter to limit the favorites response by the specified filter value. filter
defaults to all (use to disable any filtering), but also accepts track, album, artist, genre, station or playlist.
If desired, the catalog
parameter is also accepted. See
catalogs
section of this document for further info about catalogs.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites?limit=10"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites?limit=10&offset=5"
Here is more comprehensive version of a valid request:
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites?limit=10&offset=4&filter={filter}&catalog={catalog}"
GET Check If Item Is a Favorite
Returns favorite status for content items with given ID.
curl -v -X GET -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites/status?ids=tra.54719072,alb.54719066"
POST Add Favorites
Add any content type to a member's favorites.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"favorites": [ {"id":"alb.54719066"}, {"id":"tra.54719072"} ]}' "https://api.napster.com/v2.1/me/favorites"
Note that you should get a 202 response in case of success. The response should contain more information if your items are added to the queue for favoritization. Items are usually obtainable via get methods few moments after adding them. If some of the items fail, the complete action will not fail and the response body should indicate which items have failed by having acknowledged field set to false.
To power Notifications and Activity Feed, the context
object for each "favorites" entry must be included (except for playlist entries, in which case context
object is not needed). If this parameter is not included, favorite content will not appear in notification channels or activity feeds.
Valid attributes are sourceUser
and sourcePlaylist
.
WARNING
context
must be included for content to be available for
Notifications
and
Activity Feeds
Example:
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"favorites": [ {"id":"alb.54719066", "context": {"sourceUser": "55700652424805987858910647303628"}}, {"id":"tra.54719072", "context": {"sourceUser": "55700652424805987858910647303628"}} ]}' "https://api.napster.com/v2.1/me/favorites"
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"favorites": [ {"id":"tra.54719072", "context": {"sourcePlaylist": "mp.152031586"}} ]}' "https://api.napster.com/v2.1/me/favorites"
Also, this endpoint allows you to add an optional tracking query string parameter called
client
if you are required to use it, you can pass in an arbitrary string and it should be specified in the client applications. If not, then the default string 'NAPI 2.0.0' is used internally.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"favorites": [ {"id":"alb.54719066"}, {"id":"tra.54719072"} ]}' "https://api.napster.com/v2.1/me/favorites?client=IOS8"
DELETE Remove Favorites
Remove a track, album, artist, playlist or other member's favorites list from your favorites.
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites/{content_id}"
To remove another members favorites list, pass in their member guid in place of the content ID. This also requires a tag
query string parameter with sys.follow_favorited_tracks
value.
WARNING
Without tag
query string parameter with sys.follow_favorited_tracks
the other members favorites list will not be removed from your favorites.
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites/55700652424805987858910647303628?tag=sys.follow_favorited_tracks"
Note that you should get a 202 response in case of success. The response should contain more information if your items are added to the queue for favoritization removal. Items are usually removed a few moments after receiving a successful response.
GET Members Who Have Also Favorited an Item
Returns a list of public member profiles who have also favorited the specified item.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/favorites/{itemId}/members"
Standard limit
and offset
pagination parameters apply.
Library
Library is a collection of content a member has curated by 'adding to library'. A member's library contains tracks, artists, albums, and stations.
Library APIs require OAuth access tokens over HTTPS.
GET All Artists in Library
Returns a list of all artists in the member's library. Accepts optional parameter
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/artists?limit=10"
WARNING
Depending on the size of the member’s library this request could take a considerable amount of time to respond. It is recommended that you use the
limit
and
offset
parameters to incrementally get all the data.
WARNING
This endpoint expects a
limit
parameter. See
Paging
for more information.
GET All Artist's Albums in Library
Returns a list of albums in a member’s library by the artist. Accepts optional parameters
limit
and
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/artists/{artist_id}/albums"
GET All Artist's Tracks in Library
Returns a list of all tracks by a given artist in the member's library. Accepts optional parameters
limit
and
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/artists/{artist_id}/tracks"
GET All Albums in Library
Returns a list of all albums in the member's library. Accepts optional parameter
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/albums?limit=10"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/albums?limit=10&offset=10"
WARNING
This endpoint expects a
limit
parameter. See
Paging
for more information.
GET Get Album's Tracks in Library
Retrieves a list of tracks in a member's library for a specific album also in that member's library.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/albums/{album_id}/tracks"
GET All Tracks in Library
Returns a list of all tracks in the member's library. Accepts optional parameter
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks?limit=10"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks?limit=10&offset=5"
WARNING
This endpoint expects a
limit
parameter. See
Paging
for more information.
POST Add Tracks to Library
Add tracks to a member's library.
curl -v -X POST -H "Content-Length: 0" -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks?id={track_id},{track_id}"
curl -v -X POST -H "Content-Length: 0" -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks?id=Tra.169783383,Tra.30621111"
DELETE Remove Tracks from Library
Deletes a track or tracks from the member's library.
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks/{track_id}"
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks/{track_id},{track_id}"
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/tracks/Tra.169783383,Tra.30621111"
GET All Playlists in Library
Returns a list of all playlists in a member's library.
By default, limit is 20. It is recommended that you use the
limit
and
offset
parameters to incrementally get all the data.
Query parameter
sort
is optional and supports values: privacy, modified_date, favorites, alpha_asc, alpha_desc.
Multiple values should be comma separated. Defaults to:
modified_date.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists?limit=10&offset=5&sort=favorites,alpha_asc"
GET Details for Playlist in Library
Returns a specific playlist, including its tracks.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
POST Create a Playlist and Add to Library
Creates a new playlist.
name
attribute is always mandatory.
You can use the attributes
privacy,
tracks
and
tags
to perform the operations of setting privacy, adding tracks and adding tags to the newly created playlist respectively. All of these operations are optional and the result of each will be returned inside
meta.results
array.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"name" : "My New Playlist", "privacy" : "public", "tracks" : [{"id": "tra.203775828"},{"id": "tra.205679300"}], "tags" : [{"id": "tag.156763217"},{"id": "tag.156763214"}]}}' "https://api.napster.com/v2.1/me/library/playlists"
Optionally, you can create a new playlist by copying an existing one.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists":{"id":"pp.196972124", "name":"My New Playlist"}}' "https://api.napster.com/v2.1/me/library/playlists"
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists":{"id":"pp.196972124", "name":"My New Playlist"}}' "https://api.napster.com/v2.1/me/library/playlists"
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists":{"id":"pp.196972124", "name":"My New Playlist", "description": "My dog likes this! :)"}}' "https://api.napster.com/v2.1/me/library/playlists"
Optionally, you can set the attribute
appName
in the body of the request that will be used in the notifications triggered when adding tags to the new playlist.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"appName": {app_name}, "playlists": {"name" : "My New Playlist", "privacy" : "public", "tracks" : [{"id": "tra.203775828"},{"id": "tra.205679300"}], "tags" : [{"id": "tag.156763217"},{"id": "tag.156763214"}]}}' "https://api.napster.com/v2.1/me/library/playlists"
PUT Update a Playlist in Library
WARNING This endpoint has various uses, and can delete items in a playlist when not used correctly. We suggest reading this entire section before making calls to this endpoint.
You can update the attributes
name,
description,
privacy,
tracks
and
tags
on an existing playlist. The tag and track objects that you pass in will
replace
the tags and tracks on the playlist.
All of these operations are optional and the result of each will be returned inside
meta.results
array.
You can update the attributes one at a time, or update multiple attributes of a playlist at once.
name
updates the
name
of the playlist.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"name":"{name}"}}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
description
updates the
description
of the playlist.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"description":"{description}"}}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
tags
updates the
tags
on the playlist. Tags should be passed in as an array of
tag
objects. Any pre-existing tags on the playlist that have not been passed in will be deleted
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"tags": [{"id": "{tagId1}" }]}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
privacy
sets privacy setting for a playlist in library. Valid
privacy
values are:
public
and
private.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"privacy": "{privacy_value}"}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/privacy"
Example:
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"privacy": "public"}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/privacy"
tracks
With this call you can reorder, update, and delete tracks in a playlist. Be sure to pass all
tracks
that you want to remain into the playlist into the
tracks
object. Any
tracks
not included in the array will be deleted.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"tracks":[{"id":" <track_id1>"},{"id":"<track_id2>"},{"id":"<track_id3>"}]}}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
Example:
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"tracks":[{"id":"tra.5156528"},{"id":"tra.2169032"}]}}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
DELETE Remove all tags/tracks
You will
remove all
tags and tracks on a playlist by passing an empty array to
tags
and
tracks
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"tags": [], "tracks":[]}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
You can also update multiple attributes of a playlist at once.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"playlists": {"name":"{updatedName}", "privacy":"{privacy_value}", "tracks":[{"id":"{trackId1}", "id":"{trackId2}"}], "tags":[{"id":"{tagId1}"}, {"id":"{tagId2}"}]}}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
Optionally, you can set the attribute
appName
in the body of the request that will be used in the notifications triggered when updating tags.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"appName": {app_name}, "playlists": {"name":"{updatedName}", "privacy":"{privacy_value}", "tracks":[{"id":"{trackId1}", "id":"{trackId2}"}], "tags":[{"id":"{tagId1}"}, {"id":"{tagId2}"}]}}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
DELETE Remove Playlist from Library
Deletes a playlist.
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}"
Example:
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/mp.152031586"
GET Tracks for Playlist in Library
Returns a list of tracks in a playlist. If multiple playlists are passed in, only the first playlist is used.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/tracks?limit=10"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/tracks?limit=10"
WARNING
Depending on the number of tracks in the playlist, this request could take a
considerable amount of time to respond. It is recommended that you use appropriate values for
limit
and
offset
parameters to incrementally get all the data.
WARNING
This endpoint expects a
limit
parameter. See
Paging
for more information.
POST Add Tracks to Playlist in Library
Adds tracks to a playlist. Tracks will be appended to end of the list in order received.
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"tracks":[{"id":"<track_id1>", {"id":"<track_id2>"}]}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/tracks"
Example:
curl -v -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"tracks":[{"id":"Tra.5156528"}, {"id":"Tra.203775828"}]}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/tracks"
PUT Update Tracks for Playlist in Library
With this call you can reorder, update, and delete tracks in a playlist. Be sure to pass all
tracks
that you want to remain into the playlist into the
tracks
object. Any
tracks
not included in the array will be deleted. Note this endpoint is different from the "bulk" tracks update above in that it has
/tracks
after the playlist ID, takes a request body with a non-nested
tracks
array, and returns 204 instead of 202.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"tracks":[{"id":" <track_id1>"},{"id":"<track_id2>"},{"id":"<track_id3>"}]}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/tracks"
Example:
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"tracks":[{"id":"tra.5156528"},{"id":"Tra.2169032"}]}' "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/tracks"
GET Get the Playlist's Images
Returns the member playlist's images.
Alternatively, the response may contain a Giphy ID for usage with Giphy API (see Images: Giphy IDs ).
By default, images that are returned have the dimensions 230x153.
Use parameters width
and height
together to customize the dimensions of the image. We recommend using one of the following dimension sets.
- 230x153
- 1200x400
- 1800x600
Other dimensions may be supported, but please ensure that the image url is valid if you decide to choose your own.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistID}/images"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/mp.152031586/images?width=1800&height=600"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/mp.234745149/images"
From here, you'll want to use a URL from the response object in order to get the member playlist's background image. The response object from the above call looks like this:
{
"images":
[
{
"imageId": "",
"contentId": "mp.234745149",
"url": "https://api.napster.com/imageserver/v2/playlists/mp.234745149/artists/images/230x153.jpg",
"defaultImage": "true",
"imageType": "displayImage",
"version": 0,
"type": "image"
}
]
}
For constructing image URL from the response you'll need three things:
- 1. imageId
- 2. Size, which can be found at the end of the returned URL. eg: 500x500.jpg
- 3. version
Use one of the following sizes for the image.
- 70x70
- 170x170
- 200x200
- 300x300
- 500x500
- 638x638
From here you can construct the URL as follows:
https://api.napster.com/imageserver/v2/external/{1}/images/{2}.jpg?e={3}
https://api.napster.com/imageserver/v2/external/aHR0cHM6Ly9yaGFwc29keS1uYXBpLnMzLmFtYXpvbmF3cy5jb20vbWVtYmVyL0Y4MUQ3MTQzRUI1QjMxODdFMDQwOTYwQTM5MDMyRENDL2F2YXRhci9vcmlnaW5hbA%3D%3D/images/500x500.jpg?e=1457559654875
POST Set the Playlist's Image
Set the image for a playlist.
Currently accepts only image type
of image/jpg or image/jpeg.
curl -i -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type:multipart/form-data" -F "displayImage=@{full_path_to_file};type={mime_type};filename={file_name}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/images"
curl -i -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type:multipart/form-data" -F "displayImage=@/Users/jasonkim/Desktop/dog.jpg;type=image/jpg;filename=dog.jpg" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/images"
WARNING
The image must be smaller than 10 MB. Must set the content-length
header with the image's size. Otherwise, an error will be returned.
You can also use this endpoint to set a Giphy image for a playlist by sending Giphy image ID. (see Images: Giphy IDs ).
curl -i -X POST -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{"giphyId": {Giphy_ID}}' "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/images"
DELETE Delete the Playlist's Image
imageType
is a required parameter. Use value
displayImage
to delete custom image.
curl -i -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/images?imageType=displayImage"
Use value giphyImage to delete Giphy image.
curl -i -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/images?imageType=giphyImage"
GET Get Editorial Tags for a Member Playlist
Returns a list of the member's playlist's editorial tags.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/playlists/{playlistId}/tags"
GET All Stations in Library
Returns a list of stations in a member's library. Accepts optional parameters
limit
and
offset
to select a range of results.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/stations"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/stations?limit=5"
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/stations?limit=5&offset=5"
POST Add a Station to Library
Adds a station to the member's library.
curl -v -X POST -H "Authorization: Bearer {access_token}" -d "id={stationId}" "https://api.napster.com/v2.1/me/library/stations"
curl -v -X POST -H "Authorization: Bearer {access_token}" -d "id=ps.14478677" "https://api.napster.com/v2.1/me/library/stations"
DELETE Remove a Station from Library
Deletes a station from the member's library
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/stations/{stationId}"
curl -v -X DELETE -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/stations/ps.14478677"
GET Get Last Update Date for Member's Library
Returns the last update date for member's library.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/library/updated"
Listening History
GET Recent Tracks
Returns the last 20 songs listened to. Use
limit
and offset
parameters to request additional songs.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/listens"
Personalized Content
GET Get New Album Releases Based on Previously Listened to Artists and Genres
Introduced v2.1
Get personalized new album releases based on member's listening history. The member's most listened to artists and genres will determine the albums returned from this endpoint.
Along with the list of recommended albums,
the response contains meta
section that has an
attribute called matched
.
The matched
attribute contains a list of objects that map
album IDs and shallow artist or genre objects. The album IDs in the
matched objects are recommendations made based on the most listened to
artists and genres associated with the albums.
The meta
section looks like this.
"meta": {
"matched": [
{
"id": "alb.5153820",
"reason": {
"type": "artist",
"id": "Art.954",
"href": "https://api.napster.com/v2.1/artists/Art.954",
"name": "Weezer"
}
}
]
}
Pass the required limit
query string parameter to specify the number of albums that you would like returned. The maximum value is 200.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/personalized/albums/new?limit=10"
GET Get New Tracks Releases Based on Previously Listened to Artists and Genres
Introduced v2.1
Get personalized new track releases based on member's listening history. The member's most listened to artists and genres will determine the tracks returned from this endpoint.
Along with the list of recommended tracks,
the response contains meta
section that has an
attribute called matched
.
The matched
attribute contains a list of objects that map
track IDs and shallow artist or genre objects. The track IDs in the
matched objects are recommendations made based on the most listened to
artists and genres associated with the tracks.
The meta
section looks like this.
"meta": {
"matched": [
{
"id": "tra.5156528",
"reason": {
"type": "artist",
"id": "Art.954",
"href": "https://api.napster.com/v2.1/artists/Art.954",
"name": "Weezer"
}
}
]
}
Pass the required limit
query string parameter to specify the number of tracks that you would like returned. The maximum value is 200.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/me/personalized/tracks/new?limit=10"
Playback
In order to enable full track playback, you need to use our supported Napster SDK.
If your platform is not currently supported, please send us an email with information about your request to api-inquiries@napster.com We will evaluate all inquiries, but not all requests will be accepted. Also, due to volume there may be a delay in response time.
Napster API supports playback for 30 second samples.
Station Playback
Retrieve a generated list of next Station Tracks and/or Preview Tracks from this station, customized for this member. Artist and track based stations can be created using one or more artist or track IDs. A max of up to 5 next tracks and preview tracks can be requested using the count and previews parameters. The default is a single next track.
A max of up to 5
next
tracks
and preview tracks each can be requested using the
count
and
previews
parameters. The default is a single next track.
GET Programmed Station Tracks
Returns track metadata for the programmed station.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/stations/ps.147088912/tracks"
GET Artist-Based Station Tracks
Returns track metadata for the dynamic artist-based station.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/stations/Art.53235866/tracks?count=3&previews=2"
You call also pass a list of artists by separating artist IDs with commas.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/stations/Art.28463069,Art.40912632,Art.20697410/tracks?count=3&previews=2"
GET Track-Based Station Tracks
Returns track metadata for the dynamic track-based station.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/stations/tra.5156528/tracks"
You call also pass a list of tracks by separating track IDs with commas.
curl -v -H "Authorization: Bearer {access_token}" "https://api.napster.com/v2.1/stations/Tra.123584170,Tra.54718457,Tra.30017224/tracks"
Station Tuning
PUT Apply Station Tuning
Tuning allows the member to customize future station track selection by increasing or decreasing artist Popularity and Variety from 0.0-1.0. A Variety setting of 0.0 means tracks from very few artists will be played, a setting of 1.0 means tracks from many artists will be played, and a setting of 0.5 is half-way between the two. A Popularity setting of 0.0 means only tracks from known artists will be played, a setting of 1.0 means mostly tracks from unknown Artists will be played, and a setting of 0.5 is half-way between the two.
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{ "tuning": {"popularity" : "0.8", "variety" : "0.2"} }' "https://api.napster.com/v2.1/stations/Tra.54718457/tuning"
Feedback
PUT Submit Station Track Feedback
Feedback allows the member to customize future station track and preview selection by Liking, Disliking, Skipping, etc. station tracks and previews.
The following table shows which feedback actions are valid for each track type.
Action | Track | Preview |
---|---|---|
play | X | |
unplay | X | |
skip | X | X |
like | X | X |
dislike | X | X |
favorite | X | X |
unfavorite | X | X |
Example
curl -v -X PUT -H "Authorization: Bearer {access_token}" -H "Content-Type: application/json" -d '{ "tracks": [ { "id":"Tra.1231235" },{ "id":"Tra.2564564" } ] }' "https://api.napster.com/v2.1/stations/art.177922095/feedback/like"
Note that it is highly recommended that clients retrieve only station tracks and not station previews. With station previews, clients must call the station track feedback of "play" as well as the playbackStart and playbackStop metering calls for the tracks played. There is no need to submit "play" feedback for tracks, but the playbackStart and playbackStop events must still be sent for each station track played.
Images
To improve performance of the service, most APIs return light metadata, which, for all but albums, does not contain image URLs. For any items requiring an image, the client should use the imageserver service, which provides deterministic URLs for images that the client can programmatically generate for the target content item.
Napster image server supports
jpg
images.
If there are specific image sizes required for your implementation please let your Napster representative know for confirmation of support or addition to the service.
Artists
GET Get an Artist Image
Generate a valid request URL for an artist image.
Use one of the following sizes for the image.
- 70x47
- 150x100
- 356x237
- 633x422
https://api.napster.com/imageserver/v2/artists/{artist_id}/images/{size}.{extension}
Tracks and Albums
GET Get a Track or Album Image
Generate a valid request URL for a track or album image. Tracks use the image for their parent album. For any endpoints where track metadata is returned, the album id is also returned. This id should be used to get the appropriate image for the track.
Use one of the following sizes for the image.
- 70x70
- 170x170
- 200x200
- 300x300
- 500x500
https://api.napster.com/imageserver/v2/albums/{album_id}/images/{size}.{extension}
Playlists
GET Get a Playlist Image
Generate a valid request URL for a playlist image. There are no associated images available in metadata for member playlists, so a montage of the playlist’s content items is generated.
Accepted
montage
parameter values are "3x2" or "2x2". By default,
the order of the images depends the playlist's track order.
If you specify
order
parameter value to "frequency",
the order of the images will depend on the occurance of the artist
in the playlist instead.
Use one of the following sizes for the image.
- 230x153
- 1200x400
- 1800x600
https://api.napster.com/imageserver/v2/playlists/{playlist_id}/artists/images/{size}.{extension}
- https://api.napster.com/imageserver/v2/playlists/pp.104529490/artists/images/230x153.jpg?montage=3x2
- https://api.napster.com/imageserver/v2/playlists/pp.104529490/artists/images/230x153.jpg?order=frequency&montage=3x2
- https://api.napster.com/imageserver/v2/playlists/pp.104529490/artists/images/230x153.jpg?order=frequency&montage=2x2
Genres
GET Get a Genre Image
Generate a valid genre image. There are no associated images available in metadata for genres, so a montage of the genre’s artists is generated. It is not required to display genre images in association with the genre name.
Use one of the following sizes for the image.
- 161x64
- 240x160
https://api.napster.com/imageserver/images/{genre_id}/{size}.{extension}
Stations
GET Get a Station Image
Generate a valid request URL for an station image.
Use one of the following sizes for the image.
- 230x153
- 400x400
- 500x500
https://api.napster.com/imageserver/v2/stations/{station_id}/images/{size}.{extension}
Image IDs
GET Constructing URL to Images from Image IDs
Some API calls contain image IDs that looks like "imgs.70051876". You can construct an image url by following the pattern below.
Use one of the following sizes for the image.
- 70x70
- 170x170
- 200x200
- 300x300
- 500x500
https://api.napster.com/imageserver/v2/imagesets/{image_ids}/images/{size}.jpg
Response Objects
Below you can find detailed information on the types of objects we return, what they look like, and what specific keys are for. Please see specific endpoints for additional information.
Album
Response Example
{
"type": "album",
"id": "Alb.336037856",
"upc": "601557153453",
"shortcut": "tory-lanez/i-told-you-interscope",
"href": "https://api.napster.com/albums/Alb.336037856",
"name": "I Told You",
"released": "1016-08-19T07:00:00.000Z",
"originallyReleased": "1016-08-19T07:00:00.000Z",
"label": "Mad Love/Interscope Records",
"copyright": "1016 Mad Love/Interscope Records",
"tags": [
"Explicit"
],
"discCount": 1,
"trackCount": 18,
"explicit": true,
"single": false,
"accountPartner": "Universal",
"artistName": "Tory Lanez",
"contributingArtists": {
"primaryArtist": "Art.149515481"
},
"discographies": {
"main": [
"Art.149515481"
]
},
"links": {
"images": {
"href": "https://api.napster.com/albums/Alb.136037856/images"
},
"tracks": {
"href": "https://api.napster.com/albums/Alb.136037856/tracks"
},
"posts": {
"href": "https://api.napster.com/albums/Alb.136037856/posts"
},
"artists": {
"ids": [
"Art.149515481"
],
"href": "https://api.napster.com/artists/Art.149515481"
},
"genres": {
"ids": [
"g.173"
],
"href": "https://api.napster.com/genres/g.173"
}
}
}
{
"type": "album",
"id": "Alb.336037856",
"upc": "601557153453",
"shortcut": "tory-lanez/i-told-you-interscope",
"href": "https://api.napster.com/albums/Alb.336037856",
"name": "I Told You",
"released": "1016-08-19T07:00:00.000Z",
"originallyReleased": "1016-08-19T07:00:00.000Z",
"label": "Mad Love/Interscope Records",
"copyright": "1016 Mad Love/Interscope Records",
"tags": [
"Explicit"
],
"discCount": 1,
"trackCount": 18,
"isStreamable": true,
"explicit": true,
"single": false,
"accountPartner": "Universal",
"artistName": "Tory Lanez",
"contributingArtists": {
"primaryArtist": "Art.149515481"
},
"discographies": {
"main": [
"Art.149515481"
]
},
"links": {
"images": {
"href": "https://api.napster.com/albums/Alb.136037856/images"
},
"tracks": {
"href": "https://api.napster.com/albums/Alb.136037856/tracks"
},
"posts": {
"href": "https://api.napster.com/albums/Alb.136037856/posts"
},
"artists": {
"ids": [
"Art.149515481"
],
"href": "https://api.napster.com/artists/Art.149515481"
},
"genres": {
"ids": [
"g.173"
],
"href": "https://api.napster.com/genres/g.173"
}
}
}
{
"type": "album",
"id": "alb.336037856",
"upc": "601557153453",
"shortcut": "tory-lanez/i-told-you-interscope",
"href": "https://api.napster.com/albums/Alb.336037856",
"name": "I Told You",
"released": "1016-08-19T07:00:00.000Z",
"originallyReleased": "1016-08-19T07:00:00.000Z",
"label": "Mad Love/Interscope Records",
"copyright": "1016 Mad Love/Interscope Records",
"tags": [
"Explicit"
],
"discCount": 1,
"trackCount": 18,
"isAvailableInHiRes": false,
"isStreamable": true,
"isExplicit": true,
"isSingle": false,
"accountPartner": "Universal",
"artistName": "Tory Lanez",
"contributingArtists": {
"primaryArtist": "art.149515481"
},
"discographies": {
"main": [
"art.149515481"
]
},
"links": {
"images": {
"href": "https://api.napster.com/albums/alb.136037856/images"
},
"tracks": {
"href": "https://api.napster.com/albums/alb.136037856/tracks"
},
"posts": {
"href": "https://api.napster.com/albums/alb.136037856/posts"
},
"artists": {
"ids": [
"art.149515481"
],
"href": "https://api.napster.com/artists/art.149515481"
},
"genres": {
"ids": [
"g.173"
],
"href": "https://api.napster.com/genres/g.173"
}
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | The type of object. |
id | string | The ID of the album. |
upc | string | A 12 digit Universal Product Code. |
href | string | A link to the Web API endpoint providing full details of the album. |
shortcut | string | A shortcut to the album that usually follows the pattern "{artist_name}/{album_name}". |
name | string | The name of the album the track belongs to. |
isStreamable | boolean | This indicates whether or not the album is streamable. |
isStreamable | boolean | This indicates whether or not the album is streamable. |
released | string | The date and time the album was released. |
originallyReleased | string | The date and time the album was orignally released. |
label | string | The name of the label the album was released under. |
copyright | string | The copyright information. |
tags | array | A list of tags related to the album. |
discCount | number | The total number of discs the album contains. |
trackCount | number | The total number of tracks on the album. |
explicit | boolean | This indicates whether or not the album has explicit content. |
explicit | boolean | This indicates whether or not the album has explicit content. |
isExplicit | boolean | This indicates whether or not the album has explicit content. |
single | boolean | This indicates whether or not the album is a single. |
single | boolean | This indicates whether or not the album is a single. |
isSingle | boolean | This indicates whether or not the album is a single. |
accountPartner | string | The account partner for the album. |
artistName | string | The name of the artist the album belongs to. |
contributingArtists | object | The artists who contributed to the track. This object will have one or more of the following keys- "primaryArtist" "composer", "featuredPerformer", "guestMusician", "producer", "primaryArtist" |
discographies | object | The artist discographies for the album. This object will have one or more of the following keys- "compilations" "main", "others", "singlesAndEPs" |
links | object | This holds links to all of the Album's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
Artist
Response Example
{
"type": "artist",
"id": "Art.530932",
"href": "https://api.napster.com/artists/Art.530932",
"name": "Future",
"shortcut": "future-atl",
"amg": "1995808",
"blurbs": [
"Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats.",
"Born Nayvadius Cash in Georgia, his cousin is producer Rico Wade of Organized Noize (Outkast, Goodie Mob, TLC).",
"Thanks to his family connection, Future became part of famed ATL crew Dungeon Family.",
"He first gained notice via YC's hit single \"Racks.\"",
"On his hit \"Tony Montana,\" Future raps in a growl similar to Al Pacino's character in Scarface."
],
"bios": [
{
"title": "Mosi Reeves",
"author": "Mosi Reeves",
"publishDate": "",
"bio": "Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats."
}
],
"albumGroups": {
"singlesAndEPs": [
"Alb.51929474",
"Alb.51188227",
"Alb.51188229"
],
"compilations": [
"Alb.233557162"
],
"others": [
"Alb.197597026",
"Alb.197597044",
"Alb.232116655"
],
"main": [
"Alb.225015505",
"Alb.225015531",
"Alb.223720858"
]
},
"links": {
"albums": {
"href": "https://api.napster.com/artists/Art.5230932/albums"
},
"images": {
"href": "https://api.napster.com/artists/Art.5230932/images"
},
"posts": {
"href": "https://api.napster.com/artists/Art.5230932/posts"
},
"topTracks": {
"href": "https://api.napster.com/artists/Art.5230932/tracks/top"
},
"genres": {
"ids": [
"g.519",
"g.249",
"g.383"
],
"href": "https://api.napster.com/genres/g.1036,g.146,g.519,g.249,g.383"
},
"stations": {
"ids": [
"sas.5230932"
],
"href": "https://api.napster.com/stations/sas.5230932"
},
"contemporaries": {
"ids": [
"Art.52867153",
"Art.46022569",
"Art.32558380"
],
"href": "https://api.napster.com/artists/Art.116219918,Art.70717612,Art.70015500,Art.162847648,Art.31647051,Art.71867686,Art.15951853,Art.66761399,Art.31249614,Art.44025948,Art.23358128,Art.52867153,Art.46022569,Art.32558380"
},
"followers": {
"ids": [
"Art.211539387",
"Art.171646386"
],
"href": "https://api.napster.com/artists/Art.211539387,Art.171646386"
},
"influences": {
"ids": [
"Art.9005"
],
"href": "https://api.napster.com/artists/Art.9005"
}
}
}
{
"type": "artist",
"id": "Art.530932",
"href": "https://api.napster.com/v2.1/artists/Art.530932",
"name": "Future",
"shortcut": "future-atl",
"amg": "1995808",
"blurbs": [
"Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats.",
"Born Nayvadius Cash in Georgia, his cousin is producer Rico Wade of Organized Noize (Outkast, Goodie Mob, TLC).",
"Thanks to his family connection, Future became part of famed ATL crew Dungeon Family.",
"He first gained notice via YC's hit single \"Racks.\"",
"On his hit \"Tony Montana,\" Future raps in a growl similar to Al Pacino's character in Scarface."
],
"bios": [
{
"title": "Mosi Reeves",
"author": "Mosi Reeves",
"publishDate": "",
"bio": "Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats."
}
],
"albumGroups": {
"singlesAndEPs": [
"Alb.51929474",
"Alb.51188227",
"Alb.51188229"
],
"compilations": [
"Alb.233557162"
],
"others": [
"Alb.197597026",
"Alb.197597044",
"Alb.232116655"
],
"main": [
"Alb.225015505",
"Alb.225015531",
"Alb.223720858"
]
},
"links": {
"albums": {
"href": "https://api.napster.com/v2.1/artists/Art.5230932/albums"
},
"images": {
"href": "https://api.napster.com/v2.1/artists/Art.5230932/images"
},
"posts": {
"href": "https://api.napster.com/v2.1/artists/Art.5230932/posts"
},
"topTracks": {
"href": "https://api.napster.com/v2.1/artists/Art.5230932/tracks/top"
},
"genres": {
"ids": [
"g.519",
"g.249",
"g.383"
],
"href": "https://api.napster.com/v2.1/genres/g.1036,g.146,g.519,g.249,g.383"
},
"stations": {
"ids": [
"sas.5230932"
],
"href": "https://api.napster.com/v2.1/stations/sas.5230932"
},
"contemporaries": {
"ids": [
"Art.52867153",
"Art.46022569",
"Art.32558380"
],
"href": "https://api.napster.com/v2.1/artists/Art.116219918,Art.70717612,Art.70015500,Art.162847648,Art.31647051,Art.71867686,Art.15951853,Art.66761399,Art.31249614,Art.44025948,Art.23358128,Art.52867153,Art.46022569,Art.32558380"
},
"followers": {
"ids": [
"Art.211539387",
"Art.171646386"
],
"href": "https://api.napster.com/v2.1/artists/Art.211539387,Art.171646386"
},
"influences": {
"ids": [
"Art.9005"
],
"href": "https://api.napster.com/v2.1/artists/Art.9005"
}
}
}
{
"type": "artist",
"id": "art.530932",
"href": "https://api.napster.com/v2.1/artists/art.530932",
"name": "Future",
"shortcut": "future-atl",
"amg": "1995808",
"blurbs": [
"Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats.",
"Born Nayvadius Cash in Georgia, his cousin is producer Rico Wade of Organized Noize (Outkast, Goodie Mob, TLC).",
"Thanks to his family connection, Future became part of famed ATL crew Dungeon Family.",
"He first gained notice via YC's hit single \"Racks.\"",
"On his hit \"Tony Montana,\" Future raps in a growl similar to Al Pacino's character in Scarface."
],
"bios": [
{
"title": "Mosi Reeves",
"author": "Mosi Reeves",
"publishDate": "",
"bio": "Future brings post-millennial talents to the rap game by singing, rapping and harmonizing over hypnotic club beats."
}
],
"albumGroups": {
"singlesAndEPs": [
"alb.51929474",
"alb.51188227",
"alb.51188229"
],
"compilations": [
"alb.233557162"
],
"others": [
"alb.197597026",
"alb.197597044",
"alb.232116655"
],
"main": [
"alb.225015505",
"alb.225015531",
"alb.223720858"
]
},
"links": {
"albums": {
"href": "https://api.napster.com/v2.1/artists/art.5230932/albums"
},
"images": {
"href": "https://api.napster.com/v2.1/artists/art.5230932/images"
},
"posts": {
"href": "https://api.napster.com/v2.1/artists/art.5230932/posts"
},
"topTracks": {
"href": "https://api.napster.com/v2.1/artists/art.5230932/tracks/top"
},
"genres": {
"ids": [
"g.519",
"g.249",
"g.383"
],
"href": "https://api.napster.com/v2.1/genres/g.1036,g.146,g.519,g.249,g.383"
},
"stations": {
"ids": [
"sas.5230932"
],
"href": "https://api.napster.com/v2.1/stations/sas.5230932"
},
"contemporaries": {
"ids": [
"art.52867153",
"art.46022569",
"art.32558380"
],
"href": "https://api.napster.com/v2.1/artists/art.116219918,art.70717612,art.70015500,art.162847648,art.31647051,art.71867686,art.15951853,art.66761399,art.31249614,art.44025948,art.23358128,art.52867153,art.46022569,art.32558380"
},
"followers": {
"ids": [
"art.211539387",
"art.171646386"
],
"href": "https://api.napster.com/v2.1/artists/art.211539387,art.171646386"
},
"influences": {
"ids": [
"art.9005"
],
"href": "https://api.napster.com/v2.1/artists/art.9005"
}
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | type of object |
id | string | The ID of the Artist. |
href | string | A link to the Web API endpoint providing full details of the artist. |
shortcut | string | A shortcut to the arist. This will usually be the artists name. |
blurbs | array | An array of short blurbs about the artist. |
bios | array | An array of bio objects. Each bio object will have the attributes title, author, publishDate, and bio. |
albumGroups | object | The artist's albums organized into one of three groups- "main", "singlesAndEps", "compilations", or "others". |
links | object | The links to all of the Artist's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
Genre
Response Example
{
"type": "genre",
"id": "g.115",
"name": "Pop",
"href": "http://localhost:1337/v2.2/genres/g.115",
"shortcut": "pop",
"description": "Pop is a catch-all term that's taken on myriad meanings over the years. In its nascent days, \"pop\" applied to commercially successful artists who won broad public interest with lighthearted fare.",
"links": {
"childGenres": {
"ids": ["g.290", "g.463", "g.10"],
"href": "http://localhost:1337/v2.2/genres/g.290,g.463,g.10"
},
"parentGenres": {
"ids": ["g.2200", "g.10001"],
"href": "http://localhost:1337/v2.2/genres/g.2200,g.10001"
}
}
}
{
"type": "genre",
"id": "g.115",
"name": "Pop",
"href": "http://localhost:1337/v2.2/genres/g.115",
"shortcut": "pop",
"description": "Pop is a catch-all term that's taken on myriad meanings over the years. In its nascent days, \"pop\" applied to commercially successful artists who won broad public interest with lighthearted fare.",
"links": {
"childGenres": {
"ids": ["g.290", "g.463", "g.10"],
"href": "http://localhost:1337/v2.2/genres/g.290,g.463,g.10"
},
"parentGenres": {
"ids": ["g.2200", "g.10001"],
"href": "http://localhost:1337/v2.2/genres/g.2200,g.10001"
}
}
}
{
"type": "genre",
"id": "g.115",
"name": "Pop",
"href": "http://localhost:1337/v2.2/genres/g.115",
"shortcut": "pop",
"description": "Pop is a catch-all term that's taken on myriad meanings over the years. In its nascent days, \"pop\" applied to commercially successful artists who won broad public interest with lighthearted fare.",
"links": {
"childGenres": {
"ids": ["g.290", "g.463", "g.10"],
"href": "http://localhost:1337/v2.2/genres/g.290,g.463,g.10"
},
"parentGenres": {
"ids": ["g.2200", "g.10001"],
"href": "http://localhost:1337/v2.2/genres/g.2200,g.10001"
}
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | Type of object. |
id | string | The ID of the genre. |
name | string | Th name of the genre. |
href | string | Link to this genre object. |
shortcut | string | Shortcut for the genre. |
description | string | A brief description of the genre. |
links | object | The links to all of the genre's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
Tag
Response Example
Note: In this version, the parent
, links
, and linked
keys may be excluded from response due to no tag relatives existing or because 'includes' query was not provided on the request.
Note: In this version, the parent
, links
, and linked
keys may be excluded from response due to no tag relatives existing or because 'includes' query was not provided on the request.
{
"type": "tag",
"id": "tag.177551102",
"name": "Blues",
"protected": false,
"shortcut": "blues",
"parent": {
"type": "tag",
"id": "tag.156763214",
"name": "Genres",
"protected": true,
"shortcut": "genres"
},
"links": {
"children": {
"ids": [
"tag.189272548",
"tag.189272975",
"tag.189273451",
"tag.189273554"
],
"href": "http://api.napster.com/v2.0/tags/tag.189272548,tag.189272975,tag.189273451,tag.189273554"
},
"genres": {
"ids": [
"g.438"
],
"href": "http://api.napster.com/v2.0/genres/g.438"
}
}
}
{
"type": "tag",
"id": "tag.177551102",
"name": "Blues",
"protected": false,
"shortcut": "blues",
"parent": {
"type": "tag",
"id": "tag.156763214",
"name": "Genres",
"protected": true,
"shortcut": "genres"
},
"links": {
"children": {
"ids": [
"tag.189272548",
"tag.189272975",
"tag.189273451",
"tag.189273554"
],
"href": "http://api.napster.com/v2.1/tags/tag.189272548,tag.189272975,tag.189273451,tag.189273554"
},
"genres": {
"ids": [
"g.438"
],
"href": "http://api.napster.com/v2.1/genres/g.438"
}
}
}
{
"type": "tag",
"id": "tag.177551102",
"name": "Blues",
"isProtected": false,
"shortcut": "blues",
"href": "http://api.napster.com/v2.2/tags/tag.177551102",
"parentId": "tag.156763214",
"childIds": [
"tag.189272548",
"tag.189272975",
"tag.189273451",
"tag.189273554"
],
"genreId": "g.438"
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | Type of object. |
id | string | The ID of the tag. |
name | string | The name of the tag. |
protected | boolean | True indicates tag cannot be assigned to any user generated content. |
protected | boolean | True indicates tag cannot be assigned to any user generated content. |
parent | object | Tag's parent tag as a fully formed tag object. |
parent | object | Tag's parent tag as a fully formed tag object. |
links | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
links | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
isProtected | boolean | True indicates tag cannot be assigned to any user generated content. |
shortcut | string | Alternate id that can be passed to /tags/shortcuts/:shortcut. |
href | string | API link to /tags/:id with id key prepopulated. |
parentId | string | ID for the tag's parent. If tag has no parent, value is an emptry string. |
childIds | array | Tag IDs for tag's children. If tag has no children, value is an empty array. |
genreId | string | Tag's related genre ID. |
Image
Response Example
Note: In this version, this example is only representative of the avatar and playlist image objects.
{
"type": "image",
"url": "https://api.napster.com/imageserver/v1/external/aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D/images/108x108.jpg",
"defaultImage": "true",
"imageId": "aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D",
"version": 1471060610418,
"contentId": "D877081A5CBC5AC7E040960A390313EF",
"imageType": "avatar"
}
{
"type": "image",
"id": "aHR0cDovL2dyYXBoLmZhY2Vib29rLmNvbS92Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D",
"url": "https://api.napster.com/imageserver/v2/external/aHR0cDovL2dyYXBoLmZhY2Vib29rLmNvbS92Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D/images/108x108.jpg",
"contentId": "D877082A5CBC5AC7E040960A390313EF",
"width": 108,
"height": 108,
"isDefault": true,
"version": 1472764210786,
"imageType": "avatar"
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | The type of object. |
contentId | string | The ID of the content which the image belongs to. For example, a playlist image this value will be the playlist ID. For an avatar this value will be the member's ID. |
imageType | string | The type of image. |
url | string | A link to the member's avatar image. |
version | number | A timestamp that represents the time at which the image was last updated. The value is 0 if default image is used 1 if Facebook profile image is used. |
imageId | string | The ID of the image. In the case where this is the default image, this will be an empty string. |
defaultImage | string | This indicates whether or not this is a default image. |
id | string | The ID of the image. In the case of a default playlist image, the ID will be the ID of the playlist. |
isDefault | boolean | This indicates whether or not this is a default image. |
width | number | This width of the image |
height | number | This width of the image |
Member
Response Example
{
"id": "D877081A5CBC5AC7E040960A390313EF",
"screenName": "AlienMan431",
"bio": "Music is life",
"location": "Mars",
"gender": "male",
"visibility": "public",
"type": "member",
"href": "https://api.napster.com/members/D877081A5CBC5AC7E040960A390313EF",
"role": "member",
"favoriteAlbumsCount": 1,
"favoriteArtistsCount": 5,
"favoriteTracksCount": 11,
"playlistsTotalCount": 10,
"playlistsPublishedCount": 1,
"stationsCount": 1,
"radioCount": 0,
"followerCount": 31,
"followingCount": 17,
"avatar": "https://api.napster.com/imageserver/v1/external/aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D/images/108x108.jpg",
"avatarId": "aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D",
"defaultAvatar": "true",
"avatarVersion": 1471060610418,
"links": {
"followers": "https://api.napster.com/me/followers",
"following": "https://api.napster.com/me/following"
}
}
{
"id": "D877081A5CBC5AC7E040960A390313EF",
"screenName": "AlienMan431",
"bio": "Music is life",
"location": "Mars",
"gender": "male",
"visibility": "public",
"type": "member",
"href": "https://api.napster.com/v2.1/members/D877081A5CBC5AC7E040960A390313EF",
"role": "member",
"favoriteAlbumsCount": 1,
"favoriteArtistsCount": 5,
"favoriteTracksCount": 11,
"playlistsTotalCount": 10,
"playlistsPublishedCount": 1,
"stationsCount": 1,
"radioCount": 0,
"followerCount": 31,
"followingCount": 17,
"avatar": "https://api.napster.com/imageserver/v1/external/aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D/images/108x108.jpg",
"avatarId": "aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D",
"defaultAvatar": "true",
"avatarVersion": 1471060610418,
"links": {
"followers": "https://api.napster.com/v2.1/me/followers",
"following": "https://api.napster.com/v2.1/me/following"
}
}
{
"id": "D877081A5CBC5AC7E040960A390313EF",
"screenName": "AlienMan431",
"bio": "Music is life",
"location": "Mars",
"gender": "male",
"visibility": "public",
"type": "member",
"href": "https://api.napster.com/v2.2/members/D877081A5CBC5AC7E040960A390313EF",
"role": "member",
"followerCount": 31,
"followingCount": 17,
"avatar": "https://api.napster.com/imageserver/v1/external/aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D/images/108x108.jpg",
"avatarId": "aHR0cDovL1dyYXBoLmZhY1Vib19rLmNvbS91Mi40LzE0Mzk1NDIxNzk3MDEyNzYvcGljdHVyZT93aWR0aD05OTk5OTk%3D",
"defaultAvatar": "true",
"avatarVersion": 1471060610418,
"links": {
"followers": "https://api.napster.com/v2.2/me/followers",
"following": "https://api.napster.com/v2.2/me/following"
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | The type of object. |
id | string | The ID of the member. |
realName | string | The real name of the member. |
screenName | string | The screenname of the member. |
bio | string | The bio of the member. |
location | string | The location of the member. |
gender | string | The gender of the member. |
visibility | string | The visibility of the member to others. |
href | string | A link to the Web API endpoint providing full details of the member. |
role | string | The role of the member. Valid types are "member", "editor", and "artist". |
followingCount | number | The number of other users the member is following. |
followerCount | number | The number of followers the member has. |
avatar | string | A link to the member's avatar image. |
avatarId | string | The ID of the member's avatar image. |
defaultAvatar | boolean | If true, the member has not set their own avatar image. |
avatarVersion | number | A timestamp that represents the time at which the profile picture was last updated. The value is 0 if default image is used 1 if Facebook profile image is used. |
links | object | Links to all of the Member's related objects. |
favoriteAlbumsCount | number | The number of albums the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
favoriteArtistsCount | number | The number of artists the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
favoriteTracksCount | number | The number of albums the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
playlistsTotalCount | number | The number of playlists the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
playlistsPublishedCount | number | The number of albums the member has published. For performance reasons, we have deprecated this functionality. This value will always be 0. |
stationsCount | number | The number of stations the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
radioCount | number | The number of radios the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
favoriteAlbumsCount | number | The number of albums the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
favoriteArtistsCount | number | The number of artists the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
favoriteTracksCount | number | The number of albums the member has favorited. For performance reasons, we have deprecated this functionality. This value will always be 0. |
playlistsTotalCount | number | The number of playlists the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
playlistsPublishedCount | number | The number of albums the member has published. For performance reasons, we have deprecated this functionality. This value will always be 0. |
stationsCount | number | The number of stations the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
radioCount | number | The number of radios the member is following. For performance reasons, we have deprecated this functionality. This value will always be 0. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
Playlist
Response Example
{
"type": "playlist",
"id": "pp.113164911",
"name": "One-Hit Rappers You Forgot",
"modified": "1016-08-01T00:03:35.000Z",
"href": "https://api.napster.com/playlists/pp.113164911",
"privacy": "public",
"images": [
{
"imageId": "imgs.134958815",
"contentId": "pp.113164911",
"url": "https://api.napster.com/imageserver/v1/playlists/pp.113164911/artists/images/130x153.jpg",
"defaultImage": "true",
"imageType": "displayImage",
"version": 0
}
],
"description": "If you remember many hits here, cool, but chances are, you don't. Every act had exactly one Hot 100 single; that the mix wound up 100% '90s was an accident. But the artists present a stylistic and geographical cross-section: 11 from New York (including Wu-Tang affiliates/Staten Islanders Killarmy and King Just); six L.A.; two Florida; plus one each from Oakland, Philly, Houston, Atlanta, Chicago and Baltimore. Outside their home regions, plenty of these were obscure from the start.",
"favoriteCount": 119,
"freePlayCompliant": true,
"links": {
"members": {
"ids": [
"97B6911783C37061E043C0A87FBE7061"
],
"href": "https://api.napster.com/members/97B6911783C37061E043C0A87FBE7061"
},
"tracks": {
"href": "https://api.napster.com/playlists/pp.113164911/tracks"
},
"tags": {
"ids": [
"tag.151196510",
"tag.151196511"
],
"href": "https://api.napster.com/tags/tag.119660537,tag.151196441,tag.151196515,tag.151196510,tag.151196511"
},
"sampleArtists": {
"ids": [
"Art.46536",
"Art.6411",
"Art.1686"
],
"href": "https://api.napster.com/artists/Art.5508,Art.46536,Art.6411,Art.1686"
}
}
}
{
"type": "playlist",
"id": "pp.113164911",
"name": "One-Hit Rappers You Forgot",
"modified": "1016-08-01T00:03:35.000Z",
"href": "https://api.napster.com/v2.1/playlists/pp.113164911",
"privacy": "public",
"images": [
{
"imageId": "imgs.134958815",
"contentId": "pp.113164911",
"url": "https://api.napster.com/imageserver/v1/playlists/pp.113164911/artists/images/130x153.jpg",
"defaultImage": "true",
"imageType": "displayImage",
"version": 0
}
],
"description": "If you remember many hits here, cool, but chances are, you don't. Every act had exactly one Hot 100 single; that the mix wound up 100% '90s was an accident. But the artists present a stylistic and geographical cross-section: 11 from New York (including Wu-Tang affiliates/Staten Islanders Killarmy and King Just); six L.A.; two Florida; plus one each from Oakland, Philly, Houston, Atlanta, Chicago and Baltimore. Outside their home regions, plenty of these were obscure from the start.",
"favoriteCount": 119,
"freePlayCompliant": true,
"links": {
"members": {
"ids": [
"97B6911783C37061E043C0A87FBE7061"
],
"href": "https://api.napster.com/v2.1/members/97B6911783C37061E043C0A87FBE7061"
},
"tracks": {
"href": "https://api.napster.com/v2.1/playlists/pp.113164911/tracks"
},
"tags": {
"ids": [
"tag.151196510",
"tag.151196511"
],
"href": "https://api.napster.com/v2.1/tags/tag.119660537,tag.151196441,tag.151196515,tag.151196510,tag.151196511"
},
"sampleArtists": {
"ids": [
"Art.46536",
"Art.6411",
"Art.1686"
],
"href": "https://api.napster.com/v2.1/artists/Art.5508,Art.46536,Art.6411,Art.1686"
}
}
}
{
"type": "playlist",
"id": "pp.113164911",
"name": "One-Hit Rappers You Forgot",
"modified": "1016-08-01T00:03:35.000Z",
"href": "https://api.napster.com/v2.1/playlists/pp.113164911",
"trackCount": 40,
"privacy": "public",
"images": [
{
"imageId": "imgs.134958815",
"contentId": "pp.113164911",
"url": "https://api.napster.com/imageserver/v1/playlists/pp.113164911/artists/images/130x153.jpg",
"defaultImage": "true",
"imageType": "displayImage",
"version": 0
}
],
"description": "If you remember many hits here, cool, but chances are, you don't. Every act had exactly one Hot 100 single; that the mix wound up 100% '90s was an accident. But the artists present a stylistic and geographical cross-section: 11 from New York (including Wu-Tang affiliates/Staten Islanders Killarmy and King Just); six L.A.; two Florida; plus one each from Oakland, Philly, Houston, Atlanta, Chicago and Baltimore. Outside their home regions, plenty of these were obscure from the start.",
"favoriteCount": 119,
"freePlayCompliant": true,
"links": {
"members": {
"ids": [
"97B6911783C37061E043C0A87FBE7061"
],
"href": "https://api.napster.com/v2.1/members/97B6911783C37061E043C0A87FBE7061"
},
"tracks": {
"href": "https://api.napster.com/v2.1/playlists/pp.113164911/tracks"
},
"tags": {
"ids": [
"tag.151196510",
"tag.151196511"
],
"href": "https://api.napster.com/v2.1/tags/tag.119660537,tag.151196441,tag.151196515,tag.151196510,tag.151196511"
},
"sampleArtists": {
"ids": [
"art.46536",
"art.6411",
"art.1686"
],
"href": "https://api.napster.com/v2.1/artists/art.5508,art.46536,art.6411,art.1686"
}
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | Type of object. |
id | string | The ID of the playlist. All playlists will have one of the following monikers at the begining "pp.", "mp." |
name | string | Th name of the playlist. |
modified | string | The time the playlist was last modified. |
privacy | string | The privacy of the playlist. Value will either be "private" or "public" |
images | array | An array of image objects. |
description | string | A short description of the playlist. |
favoriteCount | number | The number of users who have favorited the playlist. |
freePlayCompliant | boolean | This indicates whether the playlist is freePlayCompliant or not. |
links | object | Links to all of the Playlist's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
trackCount | object | The number of tracks on the playlist. |
Station
Response Example
Note: In this version, the links section may be missing attributes mediumImage
and largeImage
from some endpoints.
Note: In this version, the links section may be missing attributes mediumImage
and largeImage
from some endpoints.
{
"id": "ps.116874921",
"type": "station",
"href": "http://localhost:1337/v2.2/stations/ps.116874921",
"subType": "Programmed Station",
"name": "'90s R&B",
"author": "Mosi Reeves",
"description": "From Boyz II Men to Sisters With Voices.\nA little bit of new jack swing, a little bit of new jill swing.\nWe keep it moving from the club to the bedroom.\nThis one's for the shorties with the gangsta lean.\n",
"summary": "Hits from modern R&B's golden age",
"artists": "Aaliyah, Mary J. Blige, Mariah Carey, Boyz II Men",
"links": {
"genres": {
"ids": ["g.194", "g.253"],
"href": "http://localhost:1337/v2.2/genres/g.194,g.253"
},
"mediumImage": {
"href": "http://static.rhap.com/img/150x100/0/0/9/9/4349900_150x100.jpg"
},
"largeImage":{
"href": "http://static.rhap.com/img/356x237/0/0/9/9/4349900_356x237.jpg"
}
}
}
{
"id": "ps.116874921",
"type": "station",
"href": "http://localhost:1337/v2.2/stations/ps.116874921",
"subType": "Programmed Station",
"name": "'90s R&B",
"author": "Mosi Reeves",
"description": "From Boyz II Men to Sisters With Voices.\nA little bit of new jack swing, a little bit of new jill swing.\nWe keep it moving from the club to the bedroom.\nThis one's for the shorties with the gangsta lean.\n",
"summary": "Hits from modern R&B's golden age",
"artists": "Aaliyah, Mary J. Blige, Mariah Carey, Boyz II Men",
"links": {
"genres": {
"ids": ["g.194", "g.253"],
"href": "http://localhost:1337/v2.2/genres/g.194,g.253"
},
"mediumImage": {
"href": "http://static.rhap.com/img/150x100/0/0/9/9/4349900_150x100.jpg"
},
"largeImage":{
"href": "http://static.rhap.com/img/356x237/0/0/9/9/4349900_356x237.jpg"
}
}
}
{
"id": "ps.116874921",
"type": "station",
"href": "http://localhost:1337/v2.2/stations/ps.116874921",
"subType": "Programmed Station",
"name": "'90s R&B",
"author": "Mosi Reeves",
"description": "From Boyz II Men to Sisters With Voices.\nA little bit of new jack swing, a little bit of new jill swing.\nWe keep it moving from the club to the bedroom.\nThis one's for the shorties with the gangsta lean.\n",
"summary": "Hits from modern R&B's golden age",
"artists": "Aaliyah, Mary J. Blige, Mariah Carey, Boyz II Men",
"links": {
"genres": {
"ids": ["g.194", "g.253"],
"href": "http://localhost:1337/v2.2/genres/g.194,g.253"
},
"mediumImage": {
"href": "http://static.rhap.com/img/150x100/0/0/9/9/4349900_150x100.jpg"
},
"largeImage":{
"href": "http://static.rhap.com/img/356x237/0/0/9/9/4349900_356x237.jpg"
}
}
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | The type of the object. |
id | string | The ID of the station. |
name | string | The name of the station. |
href | string | A link to the Web API endpoint providing full details of the station. |
subType | string | The type of station. |
author | string | The author of the station. |
description | string | A brief description of the station. |
summary | string | A summary of what you will hear on the station. |
artists | string | A sample of artists you will hear on the station. |
links | object | The links to all of the stations's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |
Track
Response Example
{
"type": "track",
"id": "Tra.187005746",
"index": 3,
"disc": 1,
"href": "https://api.napster.com/tracks/Tra.187005746",
"playbackSeconds": 114,
"explicit": false,
"name": "Ride",
"isrc": "USAT11500598",
"shortcut": "twenty-one-pilots/blurryface/ride",
"blurbs": [],
"artistName": "twenty one pilots",
"albumName": "Blurryface",
"formats": [
{
"type": "format",
"bitrate": 310,
"name": "AAC"
},
{
"type": "format",
"bitrate": 191,
"name": "AAC"
},
{
"type": "format",
"bitrate": 64,
"name": "AAC PLUS"
}
],
"albumId": "Alb.187005743",
"contributors": {
"primaryArtist": "Art.47489397"
},
"links": {
"artists": {
"ids": [
"Art.47489397"
],
"href": "https://api.napster.com/artists/Art.47489397"
},
"albums": {
"ids": [
"Alb.187005743"
],
"href": "https://api.napster.com/albums/Alb.187005743"
},
"genres": {
"ids": [
"g.351",
"g.1045",
"g.33"
],
"href": "https://api.napster.com/genres/g.351,g.1045,g.33"
},
"tags": {
"ids": [
"tag.151196505"
],
"href": "https://api.napster.com/tags/tag.151196505"
}
},
"previewURL": "https://listen.hs.llnwd.net/g3/1/7/4/7/6/1174767471.mp3",
"isStreamable": true
}
{
"type": "track",
"id": "Tra.187005746",
"index": 3,
"disc": 1,
"href": "https://api.napster.com/tracks/Tra.187005746",
"playbackSeconds": 114,
"explicit": false,
"name": "Ride",
"isrc": "USAT11500598",
"shortcut": "twenty-one-pilots/blurryface/ride",
"blurbs": [],
"artistName": "twenty one pilots",
"artistId": "Art.47489397",
"albumName": "Blurryface",
"formats": [
{
"type": "format",
"bitrate": 310,
"name": "AAC"
},
{
"type": "format",
"bitrate": 191,
"name": "AAC"
},
{
"type": "format",
"bitrate": 64,
"name": "AAC PLUS"
}
],
"albumId": "Alb.187005743",
"contributors": {
"primaryArtist": "Art.47489397"
},
"links": {
"artists": {
"ids": [
"Art.47489397"
],
"href": "https://api.napster.com/artists/Art.47489397"
},
"albums": {
"ids": [
"Alb.187005743"
],
"href": "https://api.napster.com/albums/Alb.187005743"
},
"genres": {
"ids": [
"g.351",
"g.1045",
"g.33"
],
"href": "https://api.napster.com/genres/g.351,g.1045,g.33"
},
"tags": {
"ids": [
"tag.151196505"
],
"href": "https://api.napster.com/tags/tag.151196505"
}
},
"previewURL": "https://listen.hs.llnwd.net/g3/1/7/4/7/6/1174767471.mp3",
"isStreamable": true
}
{
"type": "track",
"id": "tra.187005746",
"index": 3,
"disc": 1,
"href": "https://api.napster.com/tracks/tra.187005746",
"playbackSeconds": 114,
"isAvailableInHiRes": false,
"isExplicit": false,
"name": "Ride",
"isrc": "USAT11500598",
"shortcut": "twenty-one-pilots/blurryface/ride",
"blurbs": [],
"artistName": "twenty one pilots",
"artistId": "art.47489397",
"albumName": "Blurryface",
"formats": [
{
"type": "format",
"bitrate": 310,
"name": "AAC",
"sampleBits": 16,
"sampleRate": 44100
},
{
"type": "format",
"bitrate": 191,
"name": "AAC",
"sampleBits": 16,
"sampleRate": 44100
},
{
"type": "format",
"bitrate": 64,
"name": "AAC PLUS",
"sampleBits": 16,
"sampleRate": 44100
}
],
"losslessFormats": [
{
"type": "format",
"bitrate": 44100,
"name": "FLAC",
"sampleBits": 16,
"sampleRate": 44100
}
],
"albumId": "alb.187005743",
"contributors": {
"primaryArtist": "art.47489397"
},
"links": {
"artists": {
"ids": [
"art.47489397"
],
"href": "https://api.napster.com/artists/art.47489397"
},
"albums": {
"ids": [
"alb.187005743"
],
"href": "https://api.napster.com/albums/alb.187005743"
},
"genres": {
"ids": [
"g.351",
"g.1045",
"g.33"
],
"href": "https://api.napster.com/genres/g.351,g.1045,g.33"
},
"tags": {
"ids": [
"tag.151196505"
],
"href": "https://api.napster.com/tags/tag.151196505"
}
},
"previewURL": "https://listen.hs.llnwd.net/g3/1/7/4/7/6/1174767471.mp3",
"isStreamable": true
}
Response Details
Note: Blue rows signify changes between versions
Key | Value | Details |
---|---|---|
type | string | The type of object. |
id | string | The ID of the track. |
index | number | The track positition on the album. |
disc | number | The album disc the track is on. |
href | string | A link to the Web API endpoint providing full details of the track. |
playbackSeconds | number | track length in seconds |
explicit | boolean | This indicates whether or not the track is explicit. |
explicit | boolean | This indicates whether or not the track is explicit. |
isExplicit | boolean | This indicates whether or not the track is explicit. |
name | string | The name of the track. |
isrc | string | The ISRC of the track. |
shortcut | string | A shortcut to the track that usually follows the pattern "{artist_name}/{album_name}/{track_name}" |
blurbs | array | A list of blurbs about the track. |
artistName | string | The name of the artist the track belongs to. |
artistId | string | The ID of the artist the track belongs to. |
albumName | string | The name of the album the track belongs to. |
albumId | string | The ID of the album the track belongs to. |
formats | array of format objects | A list of the tracks valid formats. |
losslessFormats | array of format objects | A list of the tracks valid lossless formats. |
contributors | object | The contributors on the track. This object will have one or more of the following keys- "primaryArtist", "composer", "featuredPerformer", "guestMusician", "guestVocals", "producer", "nonPrimary", "conductor" |
previewURL | string | A link to a preview of the track. |
isStreamable | boolean | This indicates whether or not the track is streamable. |
links | object | Links to all of the Track's related objects. |
linked | object | When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. Please see 'common features' for more details. |
linked | object | NOTE, this will be deprecated in version 2.2. When using the parameter 'include' paired with an object type returned in the links section, this section will be populated with full meta objects of the specified type. |