Recently I’ve been following Chris Heilmann’s enthusiastic posts about Yahoo! Query Language (YQL). Chris has also written a good introduction to YQL for developers. It’s a SQL-like language for getting data out of open web services. Sort of a single syntax for interacting with a variety of services, such as the APIs for flickr, upcoming or twitter, without needing to know a lot of the detail of those individual services. One of its features is open data tables, which allows you to describe your own web services using a simple XML syntax, not unlike OpenSearch.
Last year we made the National Maritime Museum collections available as OpenSearch RSS feeds. More recently we’ve developed a new manuscripts search which also publishes search results as RSS. After reading Chris’ blog I had a go at writing some YQL table descriptions for those feeds. They’re very simple to write and you can find my examples at
- http://eatyourgreens.org.uk/yql/nmm-search.xml (Collections search)
- http://eatyourgreens.org.uk/yql/nmm-archive-search.xml (Archive catalogue search)
Here are a couple of example queries using those tables. For example, search the NMM art collections for the phrase “tower bridge”:
use '' as nmm.collections.search;
select * from nmm.collections.search where category = 'art' and searchterm = '"tower bridge"'
use '' as nmm.archive.search;
select * from nmm.archive.search where searchterm = '"aircraft carrier"'