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.
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
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.