SlideShare una empresa de Scribd logo
1 de 14
Query the Web with YQL
Sriram Viswanathan
http://slideshare.net/ramace
What is YQL?

  •Similar to SQL

  •Can query, filter and join data across Web services
Why YQL?
 •   Simple, SQL-like

 •   Hides complexity of Web service API

 •   Pre-defined tables for popular Yahoo! Web services such as

     Flickr, Social and others.

 •   Supports output format XML, JSON
YQL Console

  •   http://developer.yahoo.com/yql/console/

  •   Enables you to run YQL statements interactively from your

      browser
SELECT statement

  •   SELECT what FROM table WHERE filter

  Examples

  •   select * from social.connections where owner_guid=me

  •   select contactId from social.connections where owner_guid=me

  •   select image.imageUrl from social.profile where guid=me
Filtering Query Results

  Examples

  •select * from flickr.photos.search where text='Barcelona’ and

  api_key=‘your api key’

  •select * from upcoming.events where location in ("San Francisco",

  "San Jose”)

  •select * from flickr.photos.info where photo_id='7640771676' and

  api_key=’your api key'
Joining tables with sub-select

  Example

  select * from social.profile where guid in (select guid from

  social.connections where owner_guid=me)
Paging and Limits
  •   select * from flickr.photos.search where text="Cat" and

      api_key=”your api key" limit 10

  •   select * from flickr.photos.search(0,10) where text="Cat" and

      api_key=”you api key”

  •   select * from flickr.photos.search(0,10) where text="Cat" and

      api_key=“you api key” limit 5

  •   select * from flickr.photos.search where text="Cat" and

      api_key=“you api key” limit 5 offset 3
Using Query Builder

  •   YQL console includes a simple query builder tool. This tool

      allows you to customize and explore YQL statements.
Response Data
  •   Supported response XML, JSON

  •   Contains diagnostic and results elements

  <query ... (attributes such as count)>

  <diagnostics>

        ... (sub-elements such as publiclyCallable)

      <results>

        ... (data returned by the call to YQL)

      </results>

  </query>
YQL using Javascript and PHP

  •   YUI YQL Utility for Javascript

  http://yuilibrary.com/yui/docs/yql/

  •   YQL call from PHP

  http://developer.yahoo.com/yql/guide/yql-code-

      examples.html#yql_php
Usage Information and
Limitations
  •   YQL has a performance uptime target of over 99.5%.

  •   YQL relies on the correct operation of the Web services and

      content providers it accesses.

  •   Per application limit (identified by your Access Key): 100,000

      calls per day.

  •   Per IP limits: /v1/public/*: 2,000 calls per hour; /v1/yql/*: 20,000

      calls per hour.

  •   YQL rate limits are subject to the rate limits of other Yahoo! and

      3rd-party Web services.
References

  http://developer.yahoo.com/yql/

  http://developer.yahoo.com/yql/guide/

  http://yuilibrary.com/yui/docs/yql/

  http://developer.yahoo.com/yql/guide/yql-code-

  examples.html#yql_php
Thank You!
      &
happy hacking

Más contenido relacionado

Similar a Query the web with YQL

YQL Publicis Hackday
YQL Publicis HackdayYQL Publicis Hackday
YQL Publicis Hackday
Paul Donnelly
 
WPP Hackday presentation - YQL
WPP Hackday presentation - YQLWPP Hackday presentation - YQL
WPP Hackday presentation - YQL
sriramiyer2007
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geo
mambo91
 
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
markandey
 

Similar a Query the web with YQL (20)

YQL & Yahoo! Apis
YQL & Yahoo! ApisYQL & Yahoo! Apis
YQL & Yahoo! Apis
 
YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011YQL & Yahoo! APIs - Open Hack India 2011
YQL & Yahoo! APIs - Open Hack India 2011
 
Yql with geo
Yql with geoYql with geo
Yql with geo
 
SEA Open Hack - YQL
SEA Open Hack - YQLSEA Open Hack - YQL
SEA Open Hack - YQL
 
Yql hacku iitd_2012
Yql hacku iitd_2012Yql hacku iitd_2012
Yql hacku iitd_2012
 
YQL Publicis Hackday
YQL Publicis HackdayYQL Publicis Hackday
YQL Publicis Hackday
 
Yui conf nov8-2010-introtoyql
Yui conf nov8-2010-introtoyqlYui conf nov8-2010-introtoyql
Yui conf nov8-2010-introtoyql
 
Asp.Net MVC 5 in Arabic
Asp.Net MVC 5 in ArabicAsp.Net MVC 5 in Arabic
Asp.Net MVC 5 in Arabic
 
WPP Hackday presentation - YQL
WPP Hackday presentation - YQLWPP Hackday presentation - YQL
WPP Hackday presentation - YQL
 
Wicket Intro
Wicket IntroWicket Intro
Wicket Intro
 
YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012
 
YQL Presentation at Geek Girls Dinner Sydney
YQL Presentation at Geek Girls Dinner SydneyYQL Presentation at Geek Girls Dinner Sydney
YQL Presentation at Geek Girls Dinner Sydney
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geo
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0
 
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mix
 
Photos Around You
Photos Around YouPhotos Around You
Photos Around You
 
Get things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplicationsGet things done with Yii - quickly build webapplications
Get things done with Yii - quickly build webapplications
 
Google AJAX APIs
Google  AJAX APIsGoogle  AJAX APIs
Google AJAX APIs
 
Open Hack Taiwan 2012
Open Hack Taiwan 2012Open Hack Taiwan 2012
Open Hack Taiwan 2012
 
CodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.comCodeIgniter - PHP MVC Framework by silicongulf.com
CodeIgniter - PHP MVC Framework by silicongulf.com
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Query the web with YQL

  • 1. Query the Web with YQL Sriram Viswanathan http://slideshare.net/ramace
  • 2. What is YQL? •Similar to SQL •Can query, filter and join data across Web services
  • 3. Why YQL? • Simple, SQL-like • Hides complexity of Web service API • Pre-defined tables for popular Yahoo! Web services such as Flickr, Social and others. • Supports output format XML, JSON
  • 4. YQL Console • http://developer.yahoo.com/yql/console/ • Enables you to run YQL statements interactively from your browser
  • 5. SELECT statement • SELECT what FROM table WHERE filter Examples • select * from social.connections where owner_guid=me • select contactId from social.connections where owner_guid=me • select image.imageUrl from social.profile where guid=me
  • 6. Filtering Query Results Examples •select * from flickr.photos.search where text='Barcelona’ and api_key=‘your api key’ •select * from upcoming.events where location in ("San Francisco", "San Jose”) •select * from flickr.photos.info where photo_id='7640771676' and api_key=’your api key'
  • 7. Joining tables with sub-select Example select * from social.profile where guid in (select guid from social.connections where owner_guid=me)
  • 8. Paging and Limits • select * from flickr.photos.search where text="Cat" and api_key=”your api key" limit 10 • select * from flickr.photos.search(0,10) where text="Cat" and api_key=”you api key” • select * from flickr.photos.search(0,10) where text="Cat" and api_key=“you api key” limit 5 • select * from flickr.photos.search where text="Cat" and api_key=“you api key” limit 5 offset 3
  • 9. Using Query Builder • YQL console includes a simple query builder tool. This tool allows you to customize and explore YQL statements.
  • 10. Response Data • Supported response XML, JSON • Contains diagnostic and results elements <query ... (attributes such as count)> <diagnostics> ... (sub-elements such as publiclyCallable) <results> ... (data returned by the call to YQL) </results> </query>
  • 11. YQL using Javascript and PHP • YUI YQL Utility for Javascript http://yuilibrary.com/yui/docs/yql/ • YQL call from PHP http://developer.yahoo.com/yql/guide/yql-code- examples.html#yql_php
  • 12. Usage Information and Limitations • YQL has a performance uptime target of over 99.5%. • YQL relies on the correct operation of the Web services and content providers it accesses. • Per application limit (identified by your Access Key): 100,000 calls per day. • Per IP limits: /v1/public/*: 2,000 calls per hour; /v1/yql/*: 20,000 calls per hour. • YQL rate limits are subject to the rate limits of other Yahoo! and 3rd-party Web services.
  • 13. References http://developer.yahoo.com/yql/ http://developer.yahoo.com/yql/guide/ http://yuilibrary.com/yui/docs/yql/ http://developer.yahoo.com/yql/guide/yql-code- examples.html#yql_php
  • 14. Thank You! & happy hacking

Notas del editor

  1. Add Images here
  2. Add Images here
  3. Add Images here
  4. Add Images here
  5. Add Images here
  6. Add Images here
  7. Add Images here
  8. Add Images here
  9. Add Images here
  10. Add Images here
  11. Add Images here
  12. Add Images here