NPR

Core Publisher: How can I automatically publish content from the NPR Story API to my site?

You can create queries in your Core Publisher admin to automatically pull content into your site from the NPR Story API. This is especially helpful if you do not have the resources to create original content about a topic or topics that your listeners are interested in. Stories that you pull in from the NPR Story API will display on both your /npr-news page and the Category or Topic Page that you associate with your query.

All queries are created using either an API ID or an Org ID. The majority of tags and categories on NPR.org

Using NPR category API IDs and Org IDs, you can create queries that will pull content from the NPR Story API and automatically assign it to different Category, Program or Tag pages.
 
You can search NPR.org for pages for topics that you want to create queries for and grab the API from the URL.

lide2.png
Find the content you want by using the NPR API Query Generator:

http://www.npr.org/api/queryGenerator.php

1. Find your topic, series, program, etc. of your choice
2. Click the check box next to the appropriate content
3. Click the "Create API Query" button
4. Locate the ID in the string provided
5. Copy it to use later

Or, you can contact a Station Support Manager for a list of the most commonly used API IDs for you to use to create your queries.
 

To set up a Custom API Query:

To navigate to the Retrieve and Categorize NPR API Content admin, either click on the link in the Edit Queue block to the bottom left on the Content/Find Content page, or click on the link in the Manage Queues tab.
  1. If you want to automatically pull in posts on a specific topic using an API ID, add the ID to the API IDs field.
  2. If you want to automatically pull in posts from a specific station using an Org ID, add the ID to the Org IDs field.
  3. The Program, Category, or Tag field, enter the name of the Program Page, Category or Tag Page that you want to posts to automatically feed into. This is an autocomplete field, so make sure to select the name of the page from the autocomplete dropdown.
creen Shot 2016-07-06 at 3.32.15 PM.png
  1. To add a new query enter [the number of logos that you currently have + the number of logos that you want to add] into the Number of rows field, and hit the Rebuild button.
  2. Click on the Save Queue button to save your changes.
 Questions? Having Trouble? Contact Station Relations
 

Did you find this article helpful?