SRU (Search/Retrieval Using URL)

Open Search Interface to LC SRU    

This is an experimental demo in development.       

Using Firefox (this is supposed to work with IE7 too, but we can't test it) look in the search box at the upper right. Immediately to the left of the seach box is a little triangle. Click it. That will give you a list of search engines.

You should see:

'Add "LC SRU" '

Click it. That should add "LC SRU" to the list. Select it as your search engine. Now you can enter CQL queries in the search box.

For example, try:

  • bath.standardIdentifier=0385504209
  • bath.uniformTitle=godfather
  • bath.uniformTitle=godfather and bath.genreForm=film


  • An OpenSearch description file has been put in this directory, with the following template:

  • And a <link> element has been put in the HTML for this page:
    <link rel="search" href=""
    title="LC SRU" />

The result is that when your browser (if it has openSearch support) comes to this page, the <link> element tells it that there is a search engine so go get the openSearch description to find out about it.

Note that the template hardcodes the maximumRecords and recordSchema values, and startRecord (omitted) will always be 1. However the SRU query parameter will take on the value of the string that you put in the search window. That means it will be treated as a CQL query.

startRecord will always be 1 and there is no way yet to page through records. Next step: improve the stylesheet to provide paging.

Note:For version 2.0, there is a new parameter that lets the client indicate that it wants an alternative response format. Once such choice can be html. When html is chosen, the results can be formated locally according to the stylesheet and returned as html.