NPR API Query Generator

In response to Catherine’s comment:

One easy way to use the NPR API Query Generator is to:

Build the Query for NPR Stories
1. Check Fields> Output Format > HTML Widget (this will allow you to see the results).

2. Under the tab: Control, try some Search Terms, Dates, Number of Results, and any other tabs, Topics, Series, Fields, etc, to get the content you want to display.

3. Click the button: Create API Call button (the query url will appear in the Generated API Call box.

4. Now click the button: Run API Call. The results will show in the Output box, as they would on a webpage (if you have HTML Widget) checked.

5. Alter the Control> Search Terms, Dates, etc., and repeat the Create API Call and Run API Call, until you get the results you want displaying in the Output.

Get the API Call (Query URL) for NPR Stories
6. Now check Fields> Output Format > Javascript Widget.

7. Click the button: Create API button.

8. Copy the query URL from that appears in the API Call box.

Insert the NPR Stories Into Your Web Page/Post
9, Paste your query URL, and your API Key, into this Javascript code:
<script type="text/javascript" src="PasteYourQueryURLHere"></script>

10. Paste the above js code, with your query URL into your web-page or blog-post.

Bookmark and Share
« | HV NEWS | »
Comment (1)

[…] While there, check out the many other possibilities for interacting with NPR database of stories, audio, text, and photos. You can specify search terms, NPR shows, topics, and a host of other criteria for creating custom lists. And you can see how the lists will display. If there’s demand I’ll add another how-to sometime on using the Query Generator. (UPDATE: QG how-to added.) […]

Pingback added by NPR API How-to : HearVox on 03.25.09



Leave a comment:

(required)

(required) (will be hidden)


(Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> )