OCLC Developer Network

SRU

Using SRU

The simplest form of an SRU request is:
http://www.worldcat.org/webservices/catalog/search/sru?query=[search terms]&wskey=[key]

The query terms can be specified in CQL syntax, to select other indexes, relations, and operators. For example:

  • srw.kw%3D%22civil%20war%22 -- a keyword search for records matching civil war

For a complete list of SRU Parameters see the Parameters documentation

Some examples

The simplest formulation of an SRU request, as a keyword search for civil war returning all default response properties:
http://www.worldcat.org/webservices/catalog/search/sru?query=civil%20war&wskey=[key]

A CQL keyword search for civil war with results returned in Dublin Core format:
http://www.worldcat.org/webservices/catalog/search/sru?query=srw.kw%3D%22civil%20war%22&recordSchema=info%3Asrw%2Fschema%2F1%2Fdc&wskey=[key]

A subject search for globalization with MARC XML results sorted in descending Date order:
http://www.worldcat.org/webservices/catalog/search/sru?query=srw.su%3D%22globalization%22&sortKeys=Date,,0&wskey=[key]

A search for the author mann and title faustus
http://www.worldcat.org/webservices/catalog/search/sru?query=srw.au+%3D+%22mann%22+and+srw.ti+%3D+%22faustus%22&wskey=[key]

A search for the keyword civil war and the subject antietam or sharpsburg http://www.worldcat.org/webservices/catalog/search/sru?query=srw.kw+%3D+%22civil+war%22+and+%28srw.su+%3D+%22antietam%22+OR+srw.su+%3D+%22sharpsburg%22%29&wskey=[key]

Other SRU Resources

Note that other SRU standard request parameters are supported and can be included in the URL, but they are not required as default values will be supplied. The name/value pairs are: version=1.1, operation=searchRetrieve, and resultSetTTL=300.

Navigation

You can navigate through the result sets using the startRecord and maximumRecords parameters. The default is to start at the first record and to present 10 records. The maximum records possible with a single query are 100 records.

 

Please be sure to also consider the impact of FRBR Grouping and Service Level when determining the meaning and impact on the results.

FRBR Grouping

Note: the default option is to present a single represented record for all records of the same item found in multiple editions.  This is sometimes referred to as a "FRBRized" result set, and it removes the many records with slight differences that may appear to be duplicates to some users and for most discovery applications.  To see every record for every edition and variation available, include the parameter frbrGrouping=off.

Service Level

Note: the indexes available and the data retrieved will be impacted by what Service Level is used. 

  • If no service level is given the indexes and data will be provided at the default level. This level can be used for any users without the user being authenticated as a library user.
  • If the data will be used only by authenticated users [library staff, patrons, faculty, students, and people within the library building} then the full service level can be used for more options and more data.

 

Sample Responses

Sample MARC XML Response
Sample Dublin Core Response

Follow the OCLC Developer Network:

The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »

© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates


Powered by Drupal, an open source content management system