News

New York Times Open Announces API Tool

The New York Times actually announced its API tool last week, but when I tried to use it I got a 404 error. Now the link from the announcement of July 20th actually works. You can try the API tool at http://prototype.nytimes.com/gst/apitool/index.html.

So what the heck is an API tool? It’s a quick place to play with the different New York Times APIs — for getting information about articles, movie reviews, Congress, and a lot more — without having to write code or figure out just the right URL structure. I have a screen shot below showing the result of one query for the article search API.

New York Times' API Tool

What you do is choose which API you want to work with. The nav on the left will change to show you different options depending on the API. Enter your query and any options you want to enact. Your results on the right will include showing what the results will look like (mostly, it looks like you have the option of getting them in XML or JSON, though I saw one API that had SPHP as an option. At times the only result option was JSON.)

At the top of the page you’ll also get a view of what the proper request URL would look for your query. You can’t use this request URL — you need to have a working NYT API key — but it’ll at least show you what proper syntax looks like.

Some of the APIs are more self-explanatory than others. For some you will definitely need to use the documentation. (Look for a documentation link right under the pulldown box for choosing an API.) It’s a nifty sandbox for seeing just how much you can slice and dice the New York Times’ vast amount of data.

Categories: News

Tagged as: , , ,