What is Yahoo Query Language (YQL) ?

YQL is an abbreviation for Yahoo Query Language. The Yahoo Query Language is same as structured Query language. The only difference between YQL And SQL is that YQL allows us to filter data from the Web Services where as SQL allows us to filter data from the database. When we have to query data from the web service one thing that we have to kept in mind is the right URL of the web service.

Developers can easily access query data across internet with the use of YQL. Whenever someone talks about YQL at that web service come in mind.

YQL can also access web contents format like HTML,XML or RSS. You can also run YQL on command line(console) to hit web service. Its up to you ,how you want to use service with Insert, update, delete operation to web service.

Following are the operation of YQL :

  • Select
  • Insert
  • Update
  • Delete

How To Use YQL ?

  1. First of all get your web service URL for eg. http://query.yahooapis.com/v1/public/test/yql
  2. Write simple query as in SQL select * from table tablename where name=”Master Software Solutions“.
  3. Merge your query with you URL : http://query.yahooapis.com/v1/public/test/yql?q=select * from table tablename where name=”Master Software Solutions“.
  4. Now hit the web service.
  5. You will get result or respionse in either xml format or Json format.

Extract Meta Tag with YQL

select * from xml where url in (select content from uritemplate where template=”http://services.w3.org/tidy/tidy?docAddr={addr}&forceXML=on” and addr=”http://www.pricetree.com/mobile/nokia-lumia-925-price-8988″) and itemPath=”//*[local-name()=’meta’ and starts-with(@itemprop, ‘lowPrice’)]”

S. No Parameter Description
1 addr web service URL from where you want to get meta Tag.
2 itempath it will get your meta tag.
3 itemprop name of meta tag.
4 lowprice replace this with you propery name.