Yahoo! Developer Network Blog

« Previous | Main | Next »


October 6, 2009

YQL now with API keys baked in! Access the NYT, AMEE and Sunlight APIs more easily than ever before

It's with a great deal of pleasure that I get to announce a little something for you the developer. Our wonderful friends over at the New York Times, AMEE, and Sunlight Labs have kindly provided us with some default credentials for you to use when accessing their services.

This means YQL is the easiest way to access these APIs, no sign-up, no need to read documentation, no bull. Just query and go. Just add ?env=store://datatables.org/alltableswithkeys to your query url.

How did we work this marvel? We actually used some of the features of YQL that you can use for your other personal APIs keys too. The first thing we did was take the http://datatables.org/alltables.env environment file which adds all the "community tables". Next we added some set lines to it.

   set apikey="1234567890" on nyt.movies.picks

In this line I set the fake API key 1234567890 for the key apikey on the nyt.movies.picks. By adding a bunch of these sets lines to an environment file you include with every query you can configure keys or other default values you want to use every query.

Finally, to protect the secret sauce we stored the environment files using yql.storage so you can happily use the store://datatables.org/alltableswithkeys but you can't access the secrets in it. This is a great way to store your own secret environment file.

But, don't forget, you don't have to use our default keys for any of the services above, you can always set your own keys or provide them with the where clause.

Enjoy, and get hacking!

Tom Hughes-Croucher
Yahoo! Developer Network

Posted at October 6, 2009 2:03 PM | Permalink

Bookmark this on Delicious

Comments

Post a comment

Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service. Fields marked with asterisk '*' are required.

Remember Me?

Subscribe

YDN Blog: Get Yahoo! Developer Network Blog on your personalized My Yahoo! home page.

Add To My RSS Feed

YDN Link Blog: Get Yahoo! Developer Network Linkblog on your personalized My Yahoo! home page.

Add To My RSS Feed

Recent Readers

Copyright © 2010 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions