Remixing web data for your hacks the easy way YQL – the can opener of the web.

Slides:



Advertisements
Similar presentations
By Loukik Purohit & Rohit Ghatol
Advertisements

Using Evernote and Google Docs in your web or mobile application (and potentially Dropbox and Skydrive) By Peter Messenger Senior Developer – Triple Point.
UFCEKG-20-2 Data, Schemas & Applications Lecture 6 The Web of Data, API’s & PHP.
Easy add-ons for your Aleph OPAC Mark Watmough Edinburgh Napier University.
Introduction to Backend James Kahng. Install Node.js.
L. Grewe. YQL – what is it Yahoo! Query Language.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
Library Mashups Exploring new ways to deliver library data Nicole C. Engard, Book Editor.
High Performance Faceted Interfaces Using S2S Eric Rozell, Tetherless World Constellation.
LHCbPR V2 Sasha Mazurov, Amine Ben Hammou, Ben Couturier 5th LHCb Computing Workshop
XML on the Web: is it still relevant? O'Neil D. Delpratt.
UFCEKG-20-2 Data, Schemas & Applications Lecture 4 Server Side Scripting & PHP.
NextGen Technology upgrade – Synerizip - Sandeep Kamble.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 24 How Websites Work with Databases How Websites Work with Databases.
Server-side Scripting Powering the webs favourite services.
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
GDT V5 Web Services. GDT V5 Web Services Doug Evans and Detlef Lexut GDT 2008 International User Conference August 10 – 13  Lake Las Vegas, Nevada GDT.
Twitter.  Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
URails Meeting 001. HTTP Old/Young guys with beards decided “We need to communicate. Let’s use text!” Hypertext Transfer Protocol HTTP is just sending.
Web Mashups -Nirav Shah.
1 In the good old days... Years ago… the WWW was made up of (mostly) static documents. –Each URL corresponded to a single file stored on some hard disk.
Web Mashups Presented By: Saket Goel Uni: sg2679.
NOSQL DATABASES Please remember to read the NOSQL Distilled book and the Seven Databases book.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
Deploying a VGI application in one day Tom Brenneman.
flickr Open API & Mashup HOWTO Yahoo! Korea, Jinho Jung
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Introduction to InfoSec – SQLI and jQuery (R9)
DM_PPT_NP_v01 SESIP_0715_JR HDF Server HDF for the Web John Readey The HDF Group Champaign Illinois USA.
Twitter 101. What is Twitter? Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
Features. Yahoo! Features My Yahoo! Flickr Delicious Yahoo! Pipes Yahoo! Maps Yahoo! Developer Network (YDN) Yahoo! Finance Yahoo! Mobile Yahoo! Hot.
Facebook API Kelly Orser. Client Libraries Client libraries will simplify the calls to the platform by reducing the amount of code you have to write.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Data Collection and Web Crawling. Overview Data intensive applications are likely to powered by some databases. How do you get the data in your database?
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
RESTful Web Services A MIDAS MISSION PRESENTATION APRIL 29, 2015.
Users are moving towards web applications Content on the web is more personal & meaningful Development on the web is easier than the OS.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
CS 122: Last Lecture Tarik Booker California State University, Los Angeles.
NCCUCS 軟體工程概論 Lecture 5: Ajax, Mashups April 29, 2014.
Modern web tools and midas Ben Smith TRIUMF Midas workshop – July 2015 Ben Smith - Modern web tools and Midas 1 15/07/15.
1 Mashup Workflow. 2 What We Have 3 Challenges with REST APIs * Only ask what its built to answer * No standard - must relearn each time * Opaque - no.
Stata tweets and other API libraries: a practical guide William Matsuoka Stata Conference Chicago, IL - July 28, 2016.
Lesson 11: Web Services and API's
JavaScript and Ajax (Ajax Tutorial)
Web Mashups -Nirav Shah.
API (Application Program Interface)
WWU Hackathon May 6 & 7.
Programmer: Roman Martushev
Node.js Express Web Services
AJAX and REST.
Lesson 11: Web Services & API's
All about social networking
Application with Cross-Platform GUI
Centrally Managed Content with JSON Views and the Feeds Module
Twitter & NoSQL Integration with MVC4 Web API
Pentaho and Yahoo User Interface (YUI)
YQL Kevin Murphy CMPS 183.
SharePoint-Hosted Apps and JavaScript
Emergency Communications
Participating in the Web of Data
Please thank our sponsors!
Lesson 11: Web Services and API's
Getting Started With Solr
Technical Integration Guide
Consuming Web Services with 2E Generated Objects
MIS Professor Sandvig MIS 424 Professor Sandvig
Created by Atif Aziz. ELMAH means is "Error Logging Modules and Handlers". It is an application-wide error logging facility that is completely pluggable.
Computer Network Information Center, Chinese Academy of Sciences
Presentation transcript:

Remixing web data for your hacks the easy way YQL – the can opener of the web

Hacking together systems in 24 hours is a lot of fun.

But you want to spend that time thinking about the interface.

And not how you get to the right data in the right format.

The web is full of juicy and long lasting data.

And there is a lot of it around.

However, our attempts to get to it can be clumsy.

What we need is an easy way to get to that data.

We had a way to do that for quite a while now.

Pipes, however is high end technology…

We’re developers, not interface users.

So for a long time people asked Yahoo for a command line version of pipes. Can we have one?

Yes, we can!

The Yahoo Query Language, or short YQL is a unified interface language to the web.

Using YQL, accessing the web and its services becomes as easy as SQL: select {what} from {service} where {condition}

Say you want kittens in your hack (who doesn’t?) select * from flickr.photos.search where text="kitten"

Say you want kittens in your hack (who doesn’t?)

Say you only want 5 kittens select * from flickr.photos.search where text="kitten" limit 5

Say you only want 5 kittens

Nice, but where can you get this?

YQL is a REST API in itself, and it has two endpoints.

The public endpoint does not need any authentication. q={query} &format={format}

The private endpoint needs oauth authentication. ry} &format={format} uthorization-access.html

Output formats are XML or JSON. JSON also allows for a callback parameter to use the output directly as JSON-P.

m flickr.photos.search%20where%20text=%22kitten%22limit%20 5&format=json&callback=meow

You can mix and match several web services using the in() command.

Guess what this does: select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text='london,uk') and license=4)

Find photos in London, UK with a Creative Commons “By” license and give me all the information you have about them.

select * from flickr.photos.info where photo_id in (select id from flickr.photos.search where woe_id in (select woeid from geo.places where text='london,uk') and license=4)

Using a command like this and some out-of-the-box UI elements like Yahoo Maps and the YUI carousel, you can build something *very* quickly.

ovent+garden

Instead of selecting all the information you can also limit the results: select name,url from upcoming.venue where metro_id in (select id from upcoming.metro where search_text="stokey")

select name,url from upcoming.venue where metro_id in (select id from upcoming.metro where search_text="stokey")

The diagnostics part of the returned data shows you what happened and how long it took

Here’s what Yahoo offers you in this format: flickr.photos.exif flickr.photos.info flickr.photos.interestingness flickr.photos.recent flickr.photos.search flickr.photos.sizes flickr.places flickr.places.info geo.places geo.places.ancestors geo.places.belongtos geo.places.children geo.places.neighbors geo.places.parent geo.places.siblings geo.placetypes gnip.activity local.search music.artist.id music.artist.popular music.artist.search music.artist.similar music.release.artist music.release.id music.release.popular music.release.search music.track.id music.track.popular music.track.search music.video.category music.video.id music.video.popular music.video.search music.video.similar mybloglog.community.find mybloglog.member mybloglog.member.contacts mybloglog.member.newwithcontacts mybloglog.member.newwithme mybloglog.members.find mybloglog.stats.find upcoming.category upcoming.country upcoming.events upcoming.events.bestinplace upcoming.groups upcoming.metro upcoming.state upcoming.user upcoming.venue

Here’s what Yahoo offers you in this format: search.images search.news search.siteexplorer.inlinks search.siteexplorer.pages search.spelling search.suggest search.termextract search.web social.connections social.contacts social.presence social.profile social.updates weather.forecast yahoo.identity yap.setsmallview search.images search.news search.siteexplorer.inlinks search.siteexplorer.pages search.spelling search.suggest search.termextract search.web social.connections social.contacts social.presence social.profile social.updates weather.forecast yahoo.identity yap.setsmallview search.images search.news search.siteexplorer.inlinks search.siteexplorer.pages search.spelling search.suggest search.termextract search.web social.connections social.contacts social.presence social.profile social.updates weather.forecast yahoo.identity yap.setsmallview

You want even more?

Alright, how about this? atom csv feed html json microformats rss xml

Telegraph’s headlines anyone? select * from html where url=' and xpath='//h3/a'

Telegraph’s headlines anyone?

You can dynamically create YQL queries to collate several sources…

Then use cURL to pull them off the web with one single http request!

YQL caches and compresses the results for you. Pretty easy, isn’t it?

Here’s another fun part: Anyone can be part of the YQL interface.

All we need the data provider to do is to create a schema that explains their data structure. opentables-chapter.html

And people do… amazon bitly delicious dopplr etsy friendfeed github Greader guardian imdb iplocation lastfm nestoria netflix nmm nyt opensocial search shopping social twitter update.groovy weather wesabe whitepages yahoo yelp zillow

For example the national maritime museum: select * from nmm.archive.search where searchterm=‘horatio nelson'

That’s pretty cool – allowing anyone to be part of this interface.

The only shame is that you can’t do all the things in YQL that you can do in Pipes – for example string manipulation.

We wondered how to make this possible. One thing we didn’t want to sacrifice is the simplicity of the language itself.

So instead of inventing an own language, we decided to piggy- back on one you already know.

YQL execute allows you to embed JavaScript in the open table schema that runs on the YQL server and converts the data for you. chapter.html

For example you can augment an existing service to do something different. The following example adds a rank to search results.

Stored as XML this can be used in a YQL query: use ' ' as searchrank; select * from searchrank where query='pizza' and dispurl like '%pizzahut% '

Anyways, the *easiest* way to start with YQL is to use the console.

Of course, you can also spend half the hack day reading API docs

Check out some code examples on.

THANKS! Chris Heilmann