This is the code snippet from my talk at YUIConf 2010.
Don’t use this code in production, because it will expose your API Key. If you want to use this publicly, you should use YQL storage to store this key somewhere so that it cannot be exposed. The goal of this code is to introduce how Y.DataSource can be used to query data from YQL. It also shows how to build a Y.AutoComplete that requests data from a DataSource.