SRU (Search/Retrieval Using URL)

SRU is Simple!

This page illustrates how simple SRU is.  Click on the links below for a demonstration; each link is an SRU URL representing an SRU request. Clicking on the link will result in the corresponding SRU response.

  1. Start with an Explain request.

    The Explain record for an SRU server is an XML document that explains features, defaults, etc. It may be used by a client to self-configure and allow it to fully interoperate with the server. 
    As an example, for the above server/database ( you can see that "title" is a supported index, within context set "dc". That means that the query "dc.title=<search term>" is supported. This is used in step 6 below.
    Advanced clients may use Explain information in more sophisticated ways, but this is not strictly necessary. Most clients don't rely on Explain.

  2. Next, a simple search for the term "dinosaur".
    version=1.1& operation=searchRetrieve&query=dinosaur

    For this SRU request, no records are requested in the response. The response shows that there are 2492 records containing the term "dinosaur". (This is subject to change.)

  3. Now the user wants to see the first of the 2492 records.

    The response includes a single record -- a marcxml record.  Note that the request does not specify a particular schema for the record-to-be-retrieved, and so the default, marcxml, is used.

  4. Retrieve the same record, different schema -- DC.

    Again the response includes a single record -- this time a DC record.  Note that DC is one of the supported-schemas listed in the Explain record.

  5. Retrieve the next five records, this time, MODS records:

    This request says start with record 2 and return five records. The response includes five MODS records, each wrapped with a <recordPostition>, two through six.

  6. Search for "dinosaur" in the title.

    This query turned up 1928 records (as in step 2, the number is subject to change).