NPR ONE Api

NPR ONE Api

This document was created by importing official specification in swagger format [DEMO Purposes ONLY].
Operations
Authorization

The interface to our OAuth2 server

POST /authorization/v2/token
GET /authorization/v2/authorize
POST /authorization/v2/token/revoke
Create a new OAuth2 access token
POST /authorization/v2/token

Please be aware that the required parameters are contingent on the grant_type that you select.

For the authorization_code grant type, you are required to pass in the code and redirect_uri parameters. service, username and password parameters will be ignored.

For the client_credentials grant type, you do not need to pass in any additional parameters beyond the basic requirements. code, redirect_uri, service, username and password parameters will be ignored.

For the device_code grant type, you are required to pass in the code parameter. redirect_uri, service, username and password parameters will be ignored.

For the password grant type, you are required to pass in the username and password parameters. If you are logging in via a social service, you should also pass in the service parameter. (In this case, the access token you receive from the social service will serve as both your username and password.) The code and redirect_uri parameters are ignored. Third-party developers do not have access to this grant type.

For the refresh_token grant type, you are required to pass in the refresh_token parameter. The scope parameter can optionally be used to request a different set of scopes than were used in the original request, but it cannot contain any scopes that were not previously requested. If not specified, then scope will be set to whichever scopes were used for the original access token request. If trading in an old non-expiring access token for a refresh-enabled token, set the value of refresh_token to the access token value and token_type_hint must be set to access_token. code, redirect_uri, service, username and password parameters will be ignored.

The temporary_user and anonymous_user grant types are custom grant types created by NPR to suit our needs for functionality such as our "try-before-you-buy" experience. If you are a third-party developer, you will not have access to these grant types unless we have explicitly given you permission within our system. For these grant types, you do not need to pass in any additional parameters beyond the basic requirements. code, redirect_uri, service, username and password parameters will be ignored.

If you are unsure of which grant type to select, assume that authorization_code is the one you want.

Note that at this time, refresh tokens are an opt-in feature; however, in the future, they will gradually transition to being opt-out, and ultimately required for all clients. Our general guidance at this time is that if this endpoint starts returning refresh tokens for you, you are responsible for implementing the code to handle them appropriately in accordance with the OAuth 2.0 spec. For more information about our gradual rollout of this feature, please contact the NPR One API team.

Request body

application/x-www-form-urlencoded
Object
grant_type
string required

The type of grant the client is requesting

Enumeration:
authorization_code
client_credentials
device_code
password
refresh_token
temporary_user
anonymous_user
client_id
string required

The client’s ID, required for all grant types.

client_secret
string required

The client’s secret, required for all grant types.

code
string

Required for authorization_code and device_code grant types. The authorization code from a successful call to /authorization/v2/authorize, or a device code from a successful call to /authorization/v2/device.

redirect_uri
string

Required for authorization_code grant type. The requested redirect_uri.

username
string

Required for password grant type. The email address of an NPR user.

password
string

Required for password grant type. The password that matches the user specified with the username parameter.

service
string

If logging in via a social service, this parameter should be set. Only used for the password grant type.

Enumeration:
facebook
google
microsoft
janrain
refresh_token
string

Required for refresh_token grant type. A valid refresh token from a previous successful call to POST /authorization/v2/token.

scope
string

Optionally used by the refresh_token grant type only. A space-separated list of scope(s) requested by the application.

token_type_hint
string

A hint about the type of the token submitted for a new access and refresh token. If unspecified, the default value is assumed to be refresh_token.

Enumeration:
access_token
refresh_token

Responses

200 200

A new token was successfully created

200 Simple400

A bad request; generally, one or more parameters passed in were incorrect or missing

401 401

The client credentials were invalid (any grant type), the user credentials were invalid (password grant type), the user has not yet logged in or has purposely denied the request (device_code grant type), or the authorization server denied the request.

200 Simple500

A server error

200 Simple503

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Show a web-based login/signup form to a user
GET /authorization/v2/authorize

If the parameters passed to this endpoint are correct, it will redirect to npr.org/oauth2/login for the user to complete the sign-in.

Currently acceptable values for scope are any combination of the following:

  • identity.readonly - for read-only access to the Identity Service
  • identity.write - for write access to the Identity Service
  • listening.readonly - for read-only access to the Listening Service
  • listening.write - for write access to the Listening Service
  • localactivation - for all access to the Local Activation Service

It is generally suggested that you assume that you will need all of the current scopes in order to successfully implement an NPR One application.

If the parameters passed in are NOT correct and the client passed in a valid redirect_uri parameter, the request will be redirected to {{YOUR_REDIRECT_URI}}?error={{ERROR_TYPE}}&message={{ERROR_DESCRIPTION}}. If the parameters passed are NOT correct and the client did not pass in a valid redirect_uri parameter, this endpoint will return the errors encoded as JSON objects (along with the corresponding HTTP status code – usually 400). The latter is intended for development and debugging purposes – in a real-world situation, errors returned as JSON objects are irretrievable by the client application, and thus passing in a valid redirect_uri is critical even for the purpose of capturing errors.

If the user successfully logs in and authorizes the application, the request will be redirected to {{YOUR_REDIRECT_URI}}?code={{AUTHORIZATION_CODE}}&state={{CSRF_TOKEN}}

If the user DENIES the application, they will be redirected to {{YOUR_REDIRECT_URI}}?error=denied&message=The%20user%20has%20denied%20the%20login%20and%20access%20request&state={{CSRF_TOKEN}}. This means that if your application flow requires a user to log in in order to proceed, it is up to you to give them the proper messaging explaining that the sign-in must be authorized in order to continue.

Finally, please do not confuse an authorization code with an access token. Once your app has completed this flow, you will still need to call POST /authorization/v2/token in order to swap the code for a valid access token.

Request parameters

client_id
string required

The client’s ID

redirect_uri
string required

The client’s URL to redirect to if the authentication is approved

response_type
string required

The type of response; currently, only code is supported

Enumeration:
code
scope
string required

A space-separated list of scope(s) requested by the application

state
string required

A CSRF token generated by the client, to be roundtripped through the request for added security

Responses

302 302

The correct parameters were passed in and we are redirecting to the authentication page; OR, a valid redirect_uri was supplied but there was another error, and the error type and message are embedded in the querystring.

text/html
Headers
Location
string url optional

The sign-in page to redirect to; most clients will process this redirect automatically.

Body
text/html
400 400

A bad request; generally, one or more parameters passed in were incorrect or missing. This error will only be shown if the client did not pass in a valid redirect_uri; otherwise, all errors will be returned as 302s to the supplied redirect_uri, with the error type and message embedded in the querystring.

Body
text/html
401 401

The client credentials were invalid (i.e., the redirect_uri does not match what we have stored for this client) or the authorization server denied the request. This error will only be shown if the client did not pass in a valid redirect_uri; otherwise, all errors will be returned as 302s to the supplied redirect_uri, with the error type and message embedded in the querystring.

Body
text/html
500 500

There was an unspecified server error. This error will only be shown if the client did not pass in a valid redirect_uri; otherwise, all errors will be returned as 302s to the supplied redirect_uri, with the error type and message embedded in the querystring.

Body
text/html
503 503

The system is undergoing maintenance and we are unable to fulfill this request. This error will only be shown if the client did not pass in a valid redirect_uri; otherwise, all errors will be returned as 302s to the supplied redirect_uri, with the error type and message embedded in the querystring.

Body
text/html
Initiate an OAuth2 login flow for limited input devices
POST /authorization/v2/device

This flow should only be used by clients who cannot show a native webview or do not have advanced input controls. It is an alternative to GET /authorization/v2/authorize.

Third-party clients will need to use one or the other of these two endpoints, but they will generally not use both.

Request body

application/x-www-form-urlencoded
Object
client_id
string required

The client’s ID

client_secret
string required

The client’s secret key

scope
string

A space-separated list of scope(s) requested by the application. Required for all untrusted clients; will be ignored for trusted clients.

Responses

201 201

We have generated a unique device code and user code. These will only be valid for the amount of time specified in the expires_in field; if the user does not complete the login process in that amount of time, the client will need to request a new set of codes.

200 Simple400

A bad request; generally, one or more parameters passed in were incorrect or missing

200 Simple401

The client credentials were invalid or the authorization server denied the request.

200 Simple500

A server error

200 Simple503

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Revoke an existing OAuth2 access token
POST /authorization/v2/token/revoke

Our implementation follows the proposed IETF specification RFC-7009.

If your client application offers the ability to for a logged-in user to log out, and you have access to a long-lived client_credentials token (i.e. you have generated one that you are storing securely for the lifetime of the entire app install), we suggest (but do not require) that you call this endpoint and revoke the access token belonging to the logged-in user as part of your logout process. If you do not already have a long-lived client_credentials token, please don’t generate one just for the purposes of calling this endpoint.

If you are building a prototype application, we also recommend that you use this endpoint to clean up access tokens that you generate during the testing of your app and do not intend to reuse.

Note that revoking an access token will automatically revoke any refresh tokens associated with it, and vice-versa.

Request headers

Authorization
string required

A client_credentials access token from the same client application as the token being revoked. Should start with Bearer, followed by a space, followed by the token.

Request body

application/x-www-form-urlencoded
Object
token
string required

The access token or refresh token that the client wants to have revoked.

token_type_hint
string

A hint about the type of the token submitted for revocation. If unspecified, the default value is assumed to be access_token.

Enumeration:
access_token
refresh_token

Responses

200 200

The old token was successfully revoked

Body
Object
200 Simple400

A bad request; generally, one or more parameters passed in were incorrect or missing

200 Simple401

The client credentials were invalid or the authorization server denied the request.

403 403

The client associated with the access token in the header does not own the access token that this request is attempting to revoke.

200 Simple500

A server error

200 Simple503

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get the latest state information about the logged-in user
GET /identity/v2/user

Authentication

oauth2
identity.readonly

After a successful login, the client should send a GET call approximately once an hour to refresh the user data.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 IdentitySuccess

The request was successful

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Examples

GET /identity/v2/user HTTP/1.1 


HTTP/1.1 200 OK 

Content-Type: application/json

{
    "version": "",
    "href": "",
    "links": {},
    "attributes": {
        "id": "",
        "firstName": "",
        "lastName": "",
        "email": "",
        "cohort": {
            "id": "",
            "name": "",
            "directory": ""
        },
        "organizations": [
            {
                "id": "",
                "displayName": "",
                "call": "",
                "city": "",
                "logo": "",
                "smallLogo": "",
                "donationUrl": "",
                "notif_org": [
                    ""
                ]
            }
        ],
        "affiliations": [
            {
                "id": 1,
                "title": "",
                "rating": 1,
                "href": "",
                "daysSinceLastListen": 1,
                "notif_following": [
                    ""
                ],
                "notif_rated": [
                    ""
                ],
                "following": true
            }
        ]
    }
}
Update the logged-in user's favorite station(s)
PUT /identity/v2/stations

Authentication

oauth2
identity.write

Right now, only the primary station can be changed. Previously selected stations will not be deleted, but the new station will be moved to first in the array.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Request body

A JSON-serialized array of station IDs

Array of integer

Responses

200 IdentitySuccess

The request was successful

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Copy listening data from a temporary user account to the logged-in user's account
POST /identity/v2/user/inherit

Authentication

oauth2
identity.write

This can and should only be used by clients who have access to the temporary_user grant type. Third-party developers do not have access to this grant type by default, and will not need this endpoint.

Request parameters

temp_user
integer required

The temporary user’s ID before the user registered or logged in

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 IdentitySuccess

The request was successful

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Update the following status of the logged-in user for a particular aggregation
POST /identity/v2/following

Authentication

oauth2
identity.write

After a successful call, this returns a User document with an updated list of affiliations.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Request body

A JSON-serialized object which contains data about a user affiliation such as the aggregation ID, affiliation rating, aggregation URL, days since last listen, and following status.

Responses

200 IdentitySuccess

The request was successful

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Listening

Audio recommendations tailored to a user’s preferences

Get the list of available channels
GET /listening/v2/channels

Authentication

oauth2
listening.readonly

These channels allow the user to specify a focus for the content returned in the recommendations endpoint.

Request parameters

exploreOnly
boolean optional

If set to true, this call will return only channels that should be shown in the client’s Explore view

Default:
false

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of channels

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Examples

GET /listening/v2/channels HTTP/1.1 

Authorization: Bearer 1234

HTTP/1.1 200 OK 

Content-Type: application/json

{
    "version": "",
    "href": "",
    "errors": [
        null
    ],
    "attributes": {
        "defaultChannel": ""
    },
    "items": [
        {
            "version": "",
            "href": "",
            "errors": [
                null
            ],
            "attributes": {
                "id": "",
                "fullName": "",
                "description": "",
                "displayType": "default",
                "emptyText": "",
                "refreshRule": 1
            },
            "items": [
                null
            ],
            "links": {}
        }
    ],
    "links": {}
}
Get a variety of details about an organization including various lists of recent audio items
GET /listening/v2/organizations/{orgId}/recommendations

Authentication

oauth2
listening.readonly

This endpoint provides a variety of details about an organization including various lists of recent audio items.

Path variables

orgId
integer int64 required

ID of an organization, such as an NPR One station

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of up to three different categories of audio items from a specific organization

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get a list of recommendations from a category of content from an organization
GET /listening/v2/organizations/{orgId}/categories/{category}/recommendations

Authentication

oauth2
listening.readonly

This endpoint provides a list of recommendations from a category of content from an organization.

Path variables

orgId
integer int64 required

ID of an organization, such as an NPR One station

category
string required

One of the three categories of content - newscast, story, or podcast

Enumeration:
newscast
story
podcast
Default:
story

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of audio items from a category of content from an organization

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Collect new ratings for media previously recommended to the logged-in user
POST /listening/v2/ratings

Authentication

oauth2
listening.write

This endpoint is the main mechanism for providing feedback from the user to NPR about the recommendations that are obtained from GET /listening/v2/recommendations.

A fully-populated link to this endpoint is returned with each individual recommendation and is located in the AudioItemDocument under the links['recommendations'] object. The query parameters in this link should not be modified. Be sure to copy and send back the entire ratings object (RatingData), as new fields may be added to it in the future.

This endpoint can return a blank JSON.doc or AudioItemDocument depending on the recommend=true|false parameter. The recommend=true flag allows this endpoint to both receive ratings and send back recommendations in the same call.

Request parameters

channel
string optional

Determines the focus of the recommendations returned. Channel npr is recommended for most use cases.

Enumeration:
npr
followed
recommended
emailstories
emailprograms
lapsedusersemail
ongoing email
newscasts
shows
Default:
npr
recommend
boolean optional

If set to false, this call will return a blank document; otherwise it will return a new recommendation object

Default:
true

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

X-Advertising-ID
string optional

A device-specific advertising identifier, if possible. Apple’s IDFA is an example.

Request body

A list of RatingData objects which contains data about ratings such as the id of the content, the rating value, elapsed time and more.

Array of RatingData

Responses

200 200

If the recommend param was set to true, this returns a list of audio items; otherwise, a blank document is returned.

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get a list of media for the logged-in user from NPR's recommendation engine
GET /listening/v2/recommendations

Authentication

oauth2
listening.readonly

This endpoint returns a list of audio recommendations. It is designed to be used for an initial list of recommendations, and then GET /listening/v2/ratings?recommend=true should be used for subsequent requests for recommendations.

A fully-populated link to the ratings endpoint is returned with each individual recommendation and is located in the AudioItemDocument under the links['recommendations'] object. The query parameters in this link should not be modified. Be sure to copy and send back the entire ratings object (RatingData), as new fields may be added to it in the future.

Request parameters

channel
string optional

Determines the focus of the recommendations returned. Channel npr is recommended for most use cases.

Enumeration:
npr
followed
recommended
emailstories
emailprograms
lapsedusersemail
ongoing email
newscasts
shows
Default:
npr
sharedMediaId
string optional

This media was shared directly with the user; if provided, the service will add this recommendation to the top of the list

notifiedMediaId
string optional

The user received a push notification about this media; if provided, the service will add this recommendation to the top of the list

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

X-Advertising-ID
string optional

A device-specific advertising identifier, if possible. Apple’s IDFA is an example.

Responses

200 ListeningSuccess

A list of audio items (recommendations)

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get recent ratings the logged-in user has submitted
GET /listening/v2/history

Authentication

oauth2
listening.readonly

This endpoint provides the list of recently-rated audio recommendations that the logged-in user has consumed. Some rated recommendations are filtered, such as sponsorship and donation.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 ListeningSuccess

A list of audio items (recommendations)

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Retrieve the most recent promo audio heard by the logged-in user
GET /listening/v2/promo/recommendations

Authentication

oauth2
listening.readonly

Gets the most recently played promo for which the user has neither tapped through the promo or listened to the target story.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 ListeningSuccess

A list of audio items (recommendations)

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get a set of recommendations for an aggregation
GET /listening/v2/aggregation/{aggId}/recommendations

Authentication

oauth2
listening.readonly

This endpoint provides a list of recent audio items associated with the aggregation along with metadata about the aggregation.

Path variables

aggId
integer int64 required

ID of an aggregation such as a program or podcast

Request parameters

startNum
integer int32 optional

The result to start with. Allows paging through the episodes of a podcast or program, with the default, startNum=0, being the most recent episode

Default:
0

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of audio items from the specified aggregation

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Get a list of recent audio and aggregation items associated with search terms
GET /listening/v2/search/recommendations

Authentication

oauth2
listening.readonly

In the schema shown below, SearchItemDocument is not an actual type of returned object; the object returned by a search will be either an AggregationAudioItemListDocument or an AudioItemDocument.

Request parameters

searchTerms
string required

Search terms to search on; can include URL-encoded punctuation

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of audio and aggregation items matching the search query

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Local Activation

Connects users to their local stations

Send a donation email to the logged-in user (only on request)
GET /localactivation/v2/donate_email

Authentication

oauth2
localactivation

This will send a station-specific donation email to the logged-in user.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

On success only a blank document

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

Sponsorship

Sponsorship for non-NPR One client applications

Request DAAST sponsorship units
GET /sponsorship/v2/ads

Not for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to request sponsorship on behalf of a user. Sponsorship units are returned in the form of DAAST XML. It is worth noting that this endpoint attempts to always return XML, even in the case of exceptions.

The default behavior of this endpoint is asynchronous; on an initial request, a call to our external sponsorship provider is placed on a queue, which is typically processed within 3 minutes. Once the sponsorship call is received and processed, the returned sponsorship units are placed in a cache on our server for the current user. Subsequent calls to this endpoint will return DAAST sponsorship units from this cache until tracking information is submitted, which removes the ad from the cache and will automatically request additional ads asynchronously if there are fewer than a certain number remaining in the cache.

For development purposes, it’s worth noting that there is currently no way to clear a user’s cache without submitting some form of tracking.

Request parameters

forceResult
boolean optional

Whether to force a synchronous call to our external sponsorship provider; the default behavior is asynchronous.

adCount
integer int32 optional

How many sponsorship units to request in one call; if left unspecified, the default behavior is to return only 1.

Min: 1
Max: 5

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

X-Advertising-ID
string optional

A device-specific advertising identifier, if possible. Apple’s IDFA is an example.

Responses

200 200

Request completed successfully; a DAAST XML document is returned. Note that this response will only be returned if either force=true was passed in the querystring, or a call to get sponsorship was previously made, and ads now exist in the cache for this user; otherwise, the 202 response is returned.

Body
application/xml
202 202

Request accepted. Check back later for actual ads.

application/xml
400 400

A bad request; generally, one or more parameters passed in were incorrect or missing

Body
application/xml
500 500

A server error

Body
application/xml
Record tracking data for DAAST sponsorship units
POST /sponsorship/v2/ads

Not for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to submit tracking information for sponsorship units obtained from the GET /sponsorship/v2/ads endpoint.

The tracking information should be submitted in the body of the request in the form of a JSON object following the Collection.Doc+JSON specification.

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

X-Advertising-ID
string optional

A device-specific advertising identifier, if possible. Apple’s IDFA is an example.

Request body

A JSON object representing sponsorship tracking data to submit to our external provider.

Responses

204 204

Request completed successfully, but there is nothing that we need to return to the caller.

400 400

A bad request; generally, one or more parameters passed in were incorrect or missing

Body
500 500

A server error

Body
Organization DataService

Allows clients to look up information for organizations that partner with NPR, including stations and third-party content providers.

GET /organization/v3/organizations/{orgId}
Retrieve metadata for the organization with the given numeric ID.
GET /organization/v3/organizations/{orgId}

This endpoint retrieves information about a given organization, based on its numeric ID, which is consistent across all of NPR’s APIs. NPR partners, as defined by this service, include member stations as well as third-party content providers. A successful request will return a document with metadata for the requested organization, including branding assets such as links to the organization’s logo and homepage, if such links are available.

Path variables

orgId
integer int64 required

The numeric ID of an organization

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A document describing the organization with the given ID.

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

200 500WithDocument

A server error

StationFinder

Allows clients to look up NPR member station information

GET /stationfinder/v3/stations/{stationId}
List stations close to you or filter by search criteria
GET /stationfinder/v3/stations

This endpoint has two main use cases:

  • If no query parameters passed in, it returns a list of stations that are geographically closest to the calling client (based on GeoIP information)
  • If one or more query parameters are passed in, it performs a search of NPR stations that match those search criteria (not taking into account the client’s physical location)

Clients wanting to implement a ‘Change Station’ UI should use this endpoint to power their search. In most cases, you’ll want to build a search interface that uses one of the 3 provided schemas: lat and lon (using e.g. the HTML5 Geolocation API), city and state, or the generic q query which can accept a station name, call letters, network name, or zip code. Technically speaking, q can also take in either a city name or a state name, but using the city and state parameters together will yield more accurate geographic search results than q={cityName}.

The lat and lon query parameters should always be passed in together (otherwise the API will return a 400 error), and if included in the query, they will take precedence over any other search criteria; that is, lat and lon will do a purely geographic search and not take into account q, city or state.

Similarly, city and/or state will take precedence over (and ignore) q.

If clients want to be able to offer multiple types of searches (e.g. ‘Search for a station name, city or zipcode’) using a single search input form, q should be used. But again, be aware that using city and state together will yield more accurate search results than q={cityName}.

Request parameters

q
string optional

Search terms to search on; can be a station name, network name, call letters, or zipcode

city
string optional

A city to look for stations from; intended to be paired with state

Pattern: ^[A-Za-z '\.]+$
state
string optional

A state to look for stations from (using the 2-letter abbreviation); intended to be paired with city

Pattern: ^[A-Z]{2}$
lat
number float optional

A latitude value from a geographic coordinate system; only works if paired with lon

lon
number float optional

A longitude value from a geographic coordinate system; only works if paired with lat

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A list of one or more stations matching the search query

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Retrieve metadata for the station with the given numeric ID
GET /stationfinder/v3/stations/{stationId}

This endpoint retrieves information about a given station, based on its numeric ID, which is consistent across all of NPR’s APIs.

A typical use case for this data is for clients who want to create a dropdown menu, modal/pop-up or dedicated page displaying more information about the station the client is localized to, including, for example, links to the station’s homepage and donation (pledge) page.

Path variables

stationId
integer int64 required

The numeric ID of a station

Request headers

Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

Responses

200 200

A document describing the station with the given ID

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

200 500WithDocument

A server error

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Type Definitions
SimpleError

A simple representation of an error result from an API call, rarely used; in most cases we still return a Collection.doc+JSON document for errors

Object
message
string required
type
string required
AccessTokenData
Object
access_token
string required
token_type
string required
Enumeration:
Bearer
MAC
expires_in
integer int32 required
refresh_token
string
DeviceCodeData
Object
device_code
string required
user_code
string required
verification_uri
string required
expires_in
integer int32 required
interval
integer int32 required
Error

A serialized version of any error encountered when processing this request

Object
code
integer int32 required
text
string
debug
string
CollectionDocument

Base Collection.Doc+JSON output

Object
version
string required
href
string required
attributes
Object required
items
Array of unknown required
links
Object required
errors
Array of unknown required
HALDocument

Base HAL output

Object
_links
Object required
ErrorDocument

A Collection.doc+JSON representation of an error result from an API call

All of
Object
attributes
Object
items
Array of unknown
links
Object
errors
Array of Error
Object
href
string uri required
All of
Object
content-type
string required
UserDocument
All of
Object
items
Array of unknown
links
Object
attributes
UserData

Object; see description of a user object below

Object
id
string required
firstName
string
lastName
string
email
string
cohort
Cohort required
organizations
Array of Organization required
affiliations
Array of Affiliation
Cohort

An experimental grouping for User Experience A/B Testing

Object
id
string required
name
string required
directory
string
Organization

A station that a user has an affiliation with

Object
id
string required
displayName
string required
call
string required
city
string required
logo
string
smallLogo
string
donationUrl
string
notif_org
Array of string
RatingData
Object
mediaId
string required
Pattern: ^\d{3,}:[\w-]{5,}$
origin
string required
Pattern: ^[A-Z0-9_]{2,10}$
rating
string required
Pattern: ^[A-Z0-9_]{2,10}$
elapsed
integer int32 required
Min: 0
Max: 9,999
duration
integer int32 required
Min: 0
Max: 9,999
timestamp
string date-time required
affiliations
Array of unknown
channel
string required
cohort
string required
Affiliation

A program (aggregation) that a given user has shown an affiliation with

Object
id
integer int64 required
title
string
rating
number float
href
string required
daysSinceLastListen
integer int32
notif_following
Array of string
notif_rated
Array of string
following
boolean required
AggregationAudioItemListDocument

An array of audio recommendations with additional metadata about the aggregation they are associated with

All of
Object
attributes
items
AggregationData
Object
type
string required
Enumeration:
aggregation
affiliation
string required
affiliationMeta
title
string required
description
string
station
string
Object
web
Array of OtherLink
more
Array of OtherLink
image
Array of ImageLink
AudioItemDocument
All of
Object
attributes
items
Array of unknown
AudioItemData
Object
type
string required
Enumeration:
audio
sponsorship
stationId
intro
donate
featureCardInformational
featureCardNotification
featureCardPromotion
featureCardExternalLink
featureCardAsyncRequest
uid
string required
Pattern: ^\d{3,}:[\w-]{5,}$
title
string required
audioTitle
string
unavailableText
string
primary
boolean
geofence
button
string
skippable
boolean required
rationale
string required
slug
string
provider
string
program
string
duration
integer int32
Min: 0
Max: 9,999
date
string date-time
expires
string date-time
description
string
song
string
artist
string
album
string
label
string
rating
RatingData required
Geofence

The geographic restrictions that should be applied by the client before playing this media

Object
restricted
boolean required
countries
Array of string required
RecommendationOrganization

Data about the organization with which this media is associated

Object
name
string required
logoUrl
string
homepageUrl
string
donateUrl
string
AudioItemListDocument
All of
Object
attributes
Object
items
links
Object
ChannelDocument
All of
Object
attributes
items
Array of unknown
links
Object
ChannelData
Object
id
string required
fullName
string required
description
string required
displayType
string
Enumeration:
default
show
playable
newscast
emptyText
string
refreshRule
integer
ChannelsDocument
All of
Object
attributes
items
Array of ChannelDocument
links
Object
ChannelsData
Object
defaultChannel
string

A link to audio files for the item

All of
Object
content-type
string required
Enumeration:
audio/mp3
audio/aac
audio/3gp
application/vnd.apple.mpegurl
audio/x-ms-wax

An image, along with metadata for display

All of
Object
content-type
string required
Enumeration:
image/jpeg
image/png
image/gif
image
string
rel
string
Enumeration:
logo_square
icon
wide
standard
square
enlargement
custom
producer
string
provider
string

An individual link from a list of links

All of
Object
content-type
string required
Enumeration:
application/json
application/xml
text/html
Object
audio
Array of AudioLink
image
Array of ImageLink
web
Array of OtherLink
onramps
Array of OtherLink
up
Array of OtherLink
recommendations
Array of OtherLink
action
Array of OtherLink
OrganizationCategoryAudioListDocument

An array of a certain category of audio recommendations from a provider

All of
Object
attributes
items
CategoryData
Object
type
string required
orgId
integer int64 required
title
string required
displayType
string
Enumeration:
default
show
playable
newscast
Object
more
Array of OtherLink
OrganizationOverviewDocument

a variety of details about an organization including various lists of recent audio items

OrganizationOverviewData
Object
type
string required
Enumeration:
organization
orgId
integer int64 required
home
boolean
brand
Brand required
Brand

Branding information for the organization

Object
band
string
call
string required
frequency
string
marketCity
string required
marketState
string
name
string required
tagline
string
Object
web
Array of OtherLink
related
Array of OtherLink
image
Array of ImageLink
SearchListDocument

An array of aggregation or audio recommendations

All of
Object
attributes
items
links
Object
SearchMetaData
Object
query
string required
SearchItemDocument

A search result, which is either an AggregationAudioItemListDocument or an AudioItemDocument

Object
type
string required
Enumeration:
audio
aggregation
ifTypeAudio
AdTrackingData

All the information needed for the Sponsorship Service to send back tracking information to our external sponsorship provider

Object
adId
string required
event
string required
Enumeration:
start
firstQuartile
midpoint
thirdQuartile
complete
UserAdData

All information relevant to a user who has requested sponsorship or submitted tracking information

Object
userAgent
string
ipAddress
string
listenerId
string
AdTrackingDocument

All the information needed for the Sponsorship Service to send back tracking information to our external sponsorship provider

All of
Object
attributes
items
Array of unknown
DAASTXml

Please visit <a href='http://www.iab.net/DAAST' target='_blank'>http://www.iab.net/DAAST</a> for more information on the DAAST XML specification.

Object
version
string required
Ad
AdXml
Object
id
string
InLine
InLineXml
Object
AdSystem
string
AdTitle
string
Description
string
Category
string
Impression
Array of ImpressionXml
Creatives
Array of CreativeXml
Extensions
Array of string
ImpressionXml
Object
id
integer int32 required
CreativeXml
Object
id
integer int32
sequence
integer int32 required
Linear
CompanionAds
Array of CompanionXml
LinearXml
Object
Duration
string
TrackingEvents
Array of TrackingXml
MediaFiles
Array of MediaFileXml
TrackingXml
Object
event
string
Enumeration:
start
firstQuartile
midpoint
thirdQuartile
complete
creativeView
MediaFileXml
Object
bitrate
integer int32
type
string
delivery
string
CompanionXml
Object
height
integer int32
width
integer int32
id
integer int32
StaticResource
TrackingEvents
Array of TrackingXml
CompanionClickThrough
string
StaticResourceXml
Object
creativeType
string
ErrorXmlDocument

One or more errors represented in a DAAST XML document

Object
version
string required
error
Array of string required
UserAdDocument

All information relevant to a user who has requested sponsorship or submitted tracking information

All of
Object
attributes
items
OrganizationDocument
All of
Object
orgId
integer
name
string
guid
string
tagline
string
abbreviation
string
_links
Object
StationDocument
All of
Object
attributes
items
Array of unknown
StationData
Object
orgId
string required
Pattern: ^\d{1,4}$
guid
string required
Pattern: ^[0-9a-f]{32}$
brand
eligibility
network
StationBrandData

An associative array of brand-related metadata for this station

Object
name
string required
call
string
Pattern: ^(W|K)[A-Z]{2,3}$
frequency
string
Pattern: ^\d{2,3}\.?\d$
band
string
Enumeration:
FM
AM
tagline
string required
marketCity
string required
Pattern: ^[A-Za-z '\.]+$
marketState
string required
Pattern: ^[A-Z]{2}$
StationEligibilityData

An associative array of eligibility-related metadata for this station

Object
nprOne
boolean required
format
string required
musicOnly
boolean required
status
string required
Enumeration:
1
9
10
12
15
StationNetworkData

Metadata about the network, if this station is part of a network

Object
currentOrgId
string required
Pattern: ^\d{1,4}$
usesInheritance
boolean required
StationNetworkTierOneData

Metadata about the top-level organization in the network, if this station is part of a network

Object
id
string required
Pattern: ^\d{1,4}$
name
string required
status
string
Enumeration:
1
9
10
12
15
usesInheritance
boolean required
StationNetworkTierTwoData

Metadata about a tier 2 organization in the network, if this station is part of a network

Object
id
string required
Pattern: ^\d{1,4}$
name
string required
usesInheritance
boolean required
StationNetworkTierThreeData

Metadata about a tier 3 organization in the network, if this station is part of a network

Object
id
string required
Pattern: ^\d{1,4}$
name
string required
usesInheritance
boolean required
StationNewscastData

Metadata about the newscast for this station; newscasts are handled internally by other microservices such as the NPR One Listening Service, so this data should typically not be used by consumers

Object
id
string required
Pattern: ^\d{1,4}$
recency
integer int32 required
Object
brand
Array of StationBrandLink required
donation
podcasts
streams
related

A link related to the station

All of
Object
guid
string
Pattern: ^[0-9a-f]{32}$
typeName
string required
title
string required

A link to a web page, logo, or audio file related to the branding of the station

All of
Object
rel
string required
Enumeration:
homepage
logo
small-logo
hello-id-audio
station-message-audio
twitter
facebook

A link to an audio stream related to the station

All of
Object
typeId
string required
Enumeration:
10
11
12
13
isPrimaryStream
boolean

A link to an audio podcast or podcast feed related to the station

All of
Object
typeId
string required
Enumeration:
9

A link to a pledge page for the station

All of
Object
typeId
string required
Enumeration:
4
27
28

A link to miscellaneous related content for the station; these typically are not present, and clients should generally not need to use these

All of
Object
typeId
string required
StationListDocument

A collection of stations close to you or filtered by search criteria

All of
Object
items
Array of StationDocument
links
Object
StationSearchMetaData
Object
query
string
city
string
state
string
lat
number float
lon
number float
Parameters
channel
string optional

Determines the focus of the recommendations returned. Channel npr is recommended for most use cases.

Enumeration:
npr
followed
recommended
emailstories
emailprograms
lapsedusersemail
ongoing email
newscasts
shows
Default:
npr
Headers
Authorization
string required

Your access token from the Authorization Service. Should start with Bearer, followed by a space, followed by the token.

X-Advertising-ID
string optional

A device-specific advertising identifier, if possible. Apple’s IDFA is an example.

Responses
200 Simple400

A bad request; generally, one or more parameters passed in were incorrect or missing

200 Simple401

The client credentials were invalid or the authorization server denied the request.

200 Simple500

A server error

200 Simple503

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Headers
Retry-After
string date-time optional

The predicted time the system will be back up

200 400WithDocument

A bad request; generally, one or more parameters passed in were incorrect or missing

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 401WithDocument

The client is not authorized to complete this request. Check to ensure a valid access token was passed in the headers.

200 404WithDocument

The resource with the requested ID could not be found, and the server was unable to complete the request.

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 429WithDocument

The client has exceeded the number of daily calls as per their rate limit. For now, this only applies to prototype applications and untrusted clients. Trusted clients will never be rate-limited, nor will any production apps.

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 500WithDocument

A server error

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 503WithDocument

The system is undergoing maintenance and we are unable to fulfill this request. Look for a Retry-After header to see the predicted time the system will be back up.

Headers
Retry-After
string date-time optional

The predicted time the system will be back up

200 IdentitySuccess

The request was successful

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period

200 ListeningSuccess

A list of audio items (recommendations)

Headers
X-RateLimit-Limit
integer optional

The number of allowed requests in the current period

X-RateLimit-Remaining
integer optional

The number of remaining requests in the current period

X-RateLimit-Reset
integer optional

The number of seconds left in the current period