| NPR Shop | NPR Social Media | Sign In | Register

Get started!
Login
| Register

 

API Overview

An API, or Application Programming Interface, is a way for two computer applications to talk to each other in a common language that they both understand. NPR's API is a content API, which essentially provides a structured way for other computer applications to get NPR stories in a predictable, flexible and powerful way. The content that is available includes audio from most NPR programs dating back to 1995 as well as text, images and other web-only content from NPR and NPR member stations. This archive consists of over 250,000 stories that are grouped into more than 5,000 different aggregations.

New Features!
 

With the launch of the new NPR.org, there are a few changes to the API. Because of these changes, we are incrementing the API version number from 0.92 to 0.93.

  • The Story API output now contains links to the new Transcript API when a transcript is available. With the Transcript API, you can get full transcripts of stories heard on air.
  • M3U streams have been available in the API since our initial launch and MP3 downloads, through our Podcast output, have been available since our December launch. Previously, we have made available our archive dating back to early 2005. As of this launch, we have extended our M3U/MP3 repository to date back to 2001 for some shows and 2003 for others. We intend to continue to build out this MP3 repository over time.
  • There are some new topics available on the topics tab, while other topics have changed or been retired. Requests to retired topics will be redirected to a similar topic.
  • The Story API can now be queried for stories that contain specific assets. For example, your query can now return only stories that contain full text, or images, or audio. For more details, go to our API Input Reference.
  • The <thumbnail> node will contain a <large> node instead of or in addition to the <medium> node. Large thumbnails will typically be 90 pixels wide. Additionally, thumbnail images will also appear in the list of <image> nodes.
  • The <list> node contains <link> elements that link to an API call and HTML page for the result list as a whole.

 
Using NPR's API
 

After registering, you can access the API by constructing a URL with parameters indicating what stories you want the API to return. The default format of the results is NPRML, a custom XML structure specifically designed to represent all of NPR's digital content comprehensively. The API can also return results in RSS, MediaRSS, JSON, Atom and through HTML and JavaScript widgets (other formats are pending). To learn more about how to access the API, go to the Story API documentation or use our Query Generator to help you get started. To see the complete list of NPR lists that you can query against, see our Mapping Index.

 
Terms of Use
 

The API requires a registration key. Click here to register. During the registration process, you must agree to the Terms of Use for NPR's Web Sites. The main points of these terms as they relate to use of the API can be found below. The spirit of these terms is that we want you to use, enjoy and share the journalism and programming produced by NPR and participating NPR member stations, but it is also important to respect the rights and integrity of the work and of the dedicated people who created it. Distorting the journalism or not giving credit properly goes against the very premise of the API. We have great trust that the NPR community will use our API in good faith. Thank you.

See NPR's Terms of Use
NPR's Privacy Policy
NPR's Permissions Policy

 
Rights, Exclusions and Qualifiers
 

Since launching NPR.org in 1995, NPR has amassed a library of award-winning, interactive media content. This library includes NPR radio programming and other features that, until now, have only been available on or through the website. With the exception of those elements that are excluded below, this complete library is now available for use by the public through the API. The following are more details about this archive:

  • The API currently only includes stories from programs that can be found as part of the NPR.org archive. This currently excludes stories from other NPR programs, such as The Diane Rehm Show, Radio Labs, Fresh Air and Car Talk. Other non-NPR public radio programs, such as This American Life, Marketplace, and A Prairie Home Companion, are also not included in this offering.
  • The API currently excludes stories that aired prior to the launching of NPR.org in 1995. NPR may in the future retrieve stories from the deep archive prior to 1995 and make them available through the API.
  • The API currently does not include any NPR Blogs.
  • The API currently excludes all stories and assets to which NPR does not have redistribution rights. This could result in the suppression of complete stories from result sets or the exclusion of individual assets, such as images, audio, text or other pieces of stories. Stories and assets from providers, such as Associated Press and Reuters, will not appear in the API results.
  • The API currently excludes some acquired programs or series that are in the NPR.org archive, such as This I Believe, World Cafe, From the Top, and others. These programs and series cannot be found in the Mapping Index or the Query Generator.
  • The API currently excludes all video assets.
  • All available audio content delivered via the API, unless distinctly labeled as downloadable based on the documentation or available through the Podcast option, must be streamed from NPR servers. Audio URLs in the API results, other than those found through the Podcast option, are to our streaming audio links.
  • The audio for songs and for pieces that contain extensive music content will be suppressed.
  • The API currently will exclude all book excerpts and recipes.
  • Because our staff and tools have changed throughout the years, the quality of the content returned by the API may vary. Older stories will have less rich content and may not adhere to the same standards that you see on NPR.org today. Some stories may even appear incomplete or may have odd configurations. Over the next months and years, NPR will work to continually update and normalize the archived content to meet today's standards.