Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
usatoday.articles.search.xml
usatoday.articles.section.xml
usatoday.articles.topnews.xml

README.md

YQL tables for APIs of USA Today

Provides access to the Article API of USA Today via YQL.

NOTE: Currently these tables only create YQL mappings for the Article API. Feel free to add further tables for the APIS of Reviews, Census, etc. and send a pull request.

Examples of using the YQL tables

Before you can run the examples below, you need to request an API key from USA Today. Then you can load the YQL console, load these tables in there, and try the examples below. (Mind to always replace YOUR_API_KEY with the API you gout from USA Today.)

topnews

  • articles from topnews (by default returns 10 results)

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.topnews;
    
  • more articles from topnews (in this case 20)

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.topnews(0,20);
    
  • articles from topnews that fall into a certain section

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.topnews WHERE section='tech';
    

searching

  • articles matching a search query

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.search WHERE search='Germany';
    
  • articles from a certain reporter

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.search WHERE reporter='Zillgitt';	
    
  • articles with a given tag

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.search WHERE tag='barack obama';
    

sections

  • articles from a specific section

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.section WHERE section='tech';
    
  • articles from a specific section and time range

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.section WHERE section='tech' AND fromdate='2011-10-14' AND todate='2011-10-15';
    
  • most read article from a specific section

      SET api_key="YOUR_API_KEY" ON usatoday;
      SELECT * FROM usatoday.articles.section WHERE section='tech' AND most='read';