Re: search/retrieve via url (sru)

From: Eric Lease Morgan <eric_morgan_at_nyob>
Date: Mon, 19 Oct 2026 12:29:16 -0400
To: CODE4LIB_at_LISTS.CLIR.ORG
On Oct 19, 2026, at 12:00 PM, Thomas Scharff <scharff_thomas_at_wheatoncollege.edu> wrote:

> I was not aware of SRU, thank you! This is very cool and useful.


You're welcome. SRU was articulated "a long time ago" which means the protocol is not in a state of flux and it offers a stable development environment.

It works in the standard REST-like way but responses are in XML not JSON:

  1. Articulate a standardized GET request which includes parameters
     for the query, the protocol version, the number of records to
     return, and the desired structure of returned records

  2. Wait

  3. Get back a not-only well-formed but valid XML stream which usually
     including three parts: 1) an echo of the query, 2) bibliographic
     results, and 3) facets

The SRU client is expected to read, interpret, and reformat the results. A full-fledged and well-written client will make the results more meaningful by including things like business logic, librarian interpretation, supplementary services such as pouring the results into a citation database, or... downloading the full text of found items.

One of our Code4Lib mailing list archives's search interface is a "thin" SRU client. Query the archive with your browser [1], and then view the resulting page's source. There you will find a valid XML SRU response. "Ed, didn't you write the SRU interface?"

SRU is as cool as, if not cooler than, OAI-PMH.


[1] archive - http://serials.infomotions.com/code4lib/

--
Eric Morgan <eric_morgan_at_infomotions.com <mailto:eric_morgan_at_infomotions.com>>
Received on Mon Oct 19 2026 - 12:28:35 EDT