SlideShare uma empresa 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

Mais conteúdo relacionado

Semelhante a Query the web with YQL

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 2011Saurabh Sahni
 
YQL Publicis Hackday
YQL Publicis HackdayYQL Publicis Hackday
YQL Publicis HackdayPaul Donnelly
 
Yui conf nov8-2010-introtoyql
Yui conf nov8-2010-introtoyqlYui conf nov8-2010-introtoyql
Yui conf nov8-2010-introtoyqlmirekgrymuza
 
WPP Hackday presentation - YQL
WPP Hackday presentation - YQLWPP Hackday presentation - YQL
WPP Hackday presentation - YQLsriramiyer2007
 
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 SydneyPratibha Gannavarapu
 
YQL and Geo
YQL and GeoYQL and Geo
YQL and Geomambo91
 
ASP.NET MVC 2.0
ASP.NET MVC 2.0ASP.NET MVC 2.0
ASP.NET MVC 2.0Buu Nguyen
 
YQL: Master Of the Mix
YQL: Master Of the MixYQL: Master Of the Mix
YQL: Master Of the Mixmarkandey
 
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 webapplicationsGiuliano Iacobelli
 
Open Hack Taiwan 2012
Open Hack Taiwan 2012Open Hack Taiwan 2012
Open Hack Taiwan 2012Cody Schwebke
 
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.comChristopher Cubos
 

Semelhante 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

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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 WorkerThousandEyes
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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 do 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