Yahoo! Query Language FAQ

Getting Started

What can I query with YQL?
YQL allows you to query web service APIs (such as REST, XML-RPC, SOAP, etc) or data from web pages. YQL queries are performed on YQL tables which provide the interface between a web service and YQL. The html YQL table allow you to query web pages for data inside them. You can find more information in the YQL documentation.

Do I have to install anything to use YQL?
No. YQL is a service that Yahoo runs, you can access it using XML or JSON. As long as your system allows you to request resources from the web you can use YQL. If you are happy to install software there are a YQL libraries for many popular languages and frameworks.

If YQL is like SQL why doesn't feature X work?
While YQL is modelled on SQL querying web services isn't exactly the same as querying a database. The primary difference is that YQL can only operate on a subset of data returned by a given request to the web service. As such features of SQL such as joins are not supported and features such as limit have both a 'local' and 'remote' syntax not found in SQL.

Some web services support features such as joins, however the syntax is not standardized and as such in order to those features YQL allows you to pass through the filters as regular keys.

Using YQL in projects

Does YQL work with my web framework/JavaScript library?
Yes! YQL works with almost all web frameworks with very little effort. JavaScript libraries with YQL support:

Languages or frameworks with plug-ins for YQL: For those that don't you just need to be able to import XML or JSON into your project. More information on getting XML or JSON from YQL can be found in the YQL documentation.

YQL Syntax

When there are multiple <select> elements within an Open Data Table, how do you specify when to use which?
If a table has multiple <select> elements then YQL will try and choose the select block that best fits the incoming query by selecting the first one that matches all the keys marked as required. If two select clauses match the incoming request similarly (i.e. Same number of required keys) then the first select clause will be used.

Community Tables

What is the official process for getting my open data table listed so that it shows up in the YQL console list in the community tables?
If you add your table to github and do a pull request, the moderators for the community tables will have to approve the request, then it should get into the next pull of data to refresh the community tables env file that we host. You can follow the guide on our blog.

Usage limits and restrictions

Can I use YQL for commercial projects?
Absolutely! We'd love you to use YQL for all your projects. However, we cannot give you extra permissions to the APIs you use through YQL. For example, if you access Flickr through YQL you will still need to use a Flickr commercial API key for commercial projects.

While we do our best to make sure as many default keys are available as possible (for example the New York Times) you still need to ensure you have the correct permissions to anything you access.

How many times can I call YQL in a minute/hour/day?
Rate limits in YQL are based on your authentication. If you use IP-based authentication, then you are limited to 2,000 calls/hour/IP to the public YQL Web service URL (/v1/public/*) or 20,000 calls/hour/IP to the private YQL Web service URL (/v1/yql/*) that requires OAuth authorization. See the YQL Web Service URLs for the public and private URLs. Applications (identified by an Access Key) are limited to 100,000 calls/day/key*. However, in order to make sure the service is available for everyone we ask that you don't call YQL more than 0.2 times/second or 1,000 times/hour for IP authenticated users and 2.7 times/second or 10,000 times/hour.

*Please don't create multiple keys to 'avoid' rate limits. If you would like us to increase your limit please contact us with details of your project and we'll do our best to accommodate you.

Can I install YQL on my own machine/for my business?
Currently we are providing YQL as a free service and it is not available to download and install. If you are interested in hosting YQL yourself feel free to contact us and we'll let you know if this becomes an option.

How much data can I query at once?
YQL will let you request files of up to 1.5mb in a single request. However, all queries must also complete in less than 30 seconds.