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
- The API Content is protected by U.S. and international copyright laws. It is owned by or licensed to NPR or its member stations and content providers. You may not use the API Content except as permitted herein.
- National Public Radio, NPR and NPR program names, member station names, logos and program names, and other third party content names and logos are service marks of either National Public Radio, Inc. its member stations or the producers of the programs or other content. All rights reserved. You may not use any NPR-provided service marks, logos or graphics without NPR's prior written consent, except that you shall have the right and obligation to use any NPR-provided service mark or logo to provide attribution to API content, as included in the API content or as directed by NPR.
- The API is for personal, non-commercial use, or for noncommercial online use by a nonprofit corporation which is exempt from federal income taxes under Section 501(c)(3) of the Internal Revenue Code.
- Your use or display of API Content must not suggest that NPR promotes or endorses you or any third party or the causes, ideas, web sites, products or services of you or any third party.
- API users shall not modify any API Content, headlines, links or metadata included in the API Content. API users shall not use content in any way that changes or distorts the fundamental meaning of the content.
- API users may use only a limited amount of content from the API. API users may not re-create NPR.org, or any portion of NPR.org.
- Use of content from the API must appropriately attribute the content source (NPR or an NPR member station) and provide a link back to the source's web site. You may not insert any intermediate page, splash page or other content between the links and the applicable NPR or member station web page.
- NPR reserves the right to track the usage of the API content.
- Content from the API must be used for non-promotional, internet-based purposes only. Uses can include desktop gadgets, blog posts and widgets, but must not include e-newsletters.
- NPR reserves the right to include or apply sponsorship to any content delivered by the API.
- All links to API Content must redirect the user to the NPR Web Sites when the user clicks on them. API users must stream audio from NPR servers (through links to NPR) unless specified otherwise in the NPR API Documentation.
- For all NPR content, the date of that content must be displayed with it.
- For any desktop gadgets, blog posts and/or widgets that you provide to NPR for posting on the NPR Web Sites ("User Materials"), you represent and warrant that you have the rights to the User Materials, that there are no encumbrances or restrictions on the User Materials or their use on the NPR Web Sites, that use of the User Materials by NPR, NPR member stations, users and others will not defame any person or violate or infringe upon the copyright, trademark, patent, trade secret, privacy, reputation, creative or other rights of any person or entity, and that the User Materials will conform with all rules for the site. You agree to indemnify NPR, its member stations and users for any breach of these representations and warranties.
- You are solely responsible for any User Materials that you submit.
- You may not submit any software or other materials which contain a virus, worm, Trojan horse or other harmful computer code, files, scripts, agents, programs or devices.
- You may not interfere with or disrupt the integrity or performance of the NPR Web Sites or any portion of contents thereof, or use the NPR Web Sites in any way which degrades the reliability, speed or operation of the site or its underlying hardware or software. You may not attempt to gain unauthorized access to the site or its related systems or networks.
- By providing User Materials for posting on the NPR Web Sites, you agree to grant NPR, NPR member stations, and other users of the NPR Web Sites, the right and license to use that User Material.
- NPR reserves the right to terminate access of any user, at any time, for any reason.
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.