The Transcript API provides access to full transcripts of stories airing on selected NPR programs.
Note: NPR transcripts are created on a rush deadline by a contractor for NPR, and accuracy and availability may vary. This text may not be in its final form and may be updated or revised in the future. Please be aware that the authoritative record of NPR's programming is the audio.
The following get passed to the Transcript API, as query string parameters on the base URL (http://api.npr.org/transcript):
The apiKey parameter is required for all API requests. To get a key, you must register. Once registered, you can get and/or change your apiKey from your Account Manager.
Upon registration, your apiKey will be saved to a cookie that will enable the Query Generator to apply your apiKey to your queries.
Story ID of the story for which you want a transcript.
Besides the api key, the only parameter for Transcript API calls is the id. The id will be the same id number that is used in the Story API and in the URL of story pages on NPR.org:
Below is a description for each of the elements returned by the Transcript API.
<transcript> is the top-level element that includes all results returned by the query.
<link> nodes provide links to other pages associated with this transcript.
The <link type="html"> node that is a direct descendant of <transcript> is a link to an HTML version of the transcript.
The <link type="api"> node that is a direct descendant of <transcript> is a link to the transcript API for this transcript. In other words, it is a self-referential link to this transcript result itself.
The <link type="html"> node that is a descendant of <story> is a link to the HTML page of the story related to this transcript.
The <link type="api"> node that is a descendant of <story> is a link to the story API for the story related to this transcript. This link will provide you access to story assets such as images and audio.
The <story> node contains links to the story related to this transcript. See link for more information.
The <paragraph> nodes contain the actual text of the transcript. Note that the text is inside CDATA blocks.