Library Catalogue SRU Queries via YQL and Yahoo Pipes

I got a question from @liwazi last week wondering why a SRU request to the Cambridge Library catalogue wasn’t being handled properly in Yahoo pipes… I think it’s because the Yahoo Pipes XML parser is sometimes like that!

Anyway, here was my fix – to use YQL as a proxy, based around a SRU request URL of the form:

Here’s the the form of YQL query (try it in YQL developer console):

select * from xml where url=''

You can find a copy of the pipe here: SRU demo pipe

Note that as well as accessing the data via the pipe, you can also pull the results of a search into a web page directly from YQL as a JSON feed:

If you’re really keen, you might also define a YQL data table that would allow you to make a request of the form “select * from camsru where q=’learning perl'”, and then set up a short alias for the query so you could run it using a construction of the form based on a YQL query of the form select * from camsru where q=@q

PS tomorrow is Mashed Library day at Lincoln – Pancakes and Mash. Be sure to follow #mashlib and chip in if you can ;-)

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

%d bloggers like this: