Npr

NPR Listening Service

Audio recommendations tailored to a user's preferences

Media & content#openapi#entertainment

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Audio recommendations tailored to a user's preferences

Endpoints 9

  • GETGet a set of recommendations for an aggregation independent of the user's listening history/v2/aggregation/:aggId/recommendations?startNum=0This endpoint provides a list of recent audio items associated with the aggregation along with metadata about the aggregation.
  • GETGet the list of available channels/v2/channels?exploreOnly=falseThese channels allow the user to specify a focus for the content returned in the recommendations endpoint.
  • GETGet recent ratings the logged-in user has submitted/v2/historyThis endpoint provides the list of recently-rated audio recommendations that the logged-in user has consumed. Some rated recommendations are filtered, such as…
  • GETGet a list of recommendations from a category of content from an organization/v2/organizations/:orgId/categories/:category/recommendationsThis endpoint provides a list of recommendations from a category of content from an organization.
  • GETGet a variety of details about an organization including various lists of recent audio items/v2/organizations/:orgId/recommendationsThis endpoint provides a variety of details about an organization including various lists of recent audio items.
  • GETRetrieve the most recent promo audio heard by the logged-in user/v2/promo/recommendationsGets the most recently played promo for which the user has neither tapped through the promo or listened to the target story.
  • POSTCollect new ratings for media previously recommended to the logged-in user/v2/ratings?channel=npr&recommend=trueThis endpoint is the main mechanism for providing feedback from the user to NPR about the recommendations that are obtained from GET…
  • GETGet a list of media for the logged-in user from NPR's recommendation engine/v2/recommendations?channel=npr&sharedMediaId=string&notifiedMediaId=stringThis endpoint returns a list of audio recommendations. It is designed to be used for an initial list of recommendations, and then POST…
  • GETGet a list of recent audio and aggregation items associated with search terms/v2/search/recommendations?searchTerms=stringIn the schema shown below, SearchItemDocument is not an actual type of returned object; the object returned by a search will be either an…

API details

Base URL
https://listening.api.npr.org
Authentication
OAuth 2.0 (authorization code flow) with 5 scopes
Operations
9 operations on 9 pathsGET 8POST 1
Response formats
application/json application/vnd.collection.doc+json
Description format
Swagger 2.0, API version 2
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the NPR Listening Service in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the NPR Listening Service collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 5 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Get a set of recommendations for an aggregation independent of the user's listening history” (GET /v2/aggregation/:aggId/recommendations?startNum=0), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the NPR Listening Service?

Audio recommendations tailored to a user's preferences It is listed under Media & content and has 9 endpoints.

Who publishes the NPR Listening Service?

It is listed from Npr's public API description (an OpenAPI document), not published by Npr on Swastik Codes. Anyone who controls npr.org can claim the profile by adding a DNS TXT record.

What is the base URL of the NPR Listening Service?

Requests go to https://listening.api.npr.org. Endpoint paths are added to this base URL.

How do I authenticate with the NPR Listening Service?

With OAuth 2.0 (authorization code flow) with 5 scopes.

How many endpoints does the NPR Listening Service have?

9 operations on 9 paths (8 GET, 1 POST).

Is forking the NPR Listening Service free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.