Querying the library of congress using Search/Retrieve via URL

SRU (Search/Retrieve via URL) is an interesting REST Web Service protocol.

Enough technobabble. Let’s run an example.

Suppose you want to retrieve the data that the library of congress has on a book called “First Impressions of the New World” by “Trotter Isabella Strange”, you issue the following query (follow the hyperlink for the XML result):

(dc.title=”First Impressions of the New World”) and (dc.creator all “Trotter Isabella Strange”)

You want to use this in software? Download my corresponding Perl and Python code examples: srucodeexamples.zip.

Further reading: See the wikipedia entry or even better, check the refbase entry.

(Special thanks to Owen Kaser for making me discover this exciting new technology.)

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax