OCLC Developer Network

OpenSearch Responses

OpenSearch responses will include title, link, and description elements for the entire search result, whether the responses are in RSS or Atom format. For example, an Atom-formatted response:

<title>OCLC Worldcat Search: civil war</title>
<link href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?
q=civil+war&start=1&count=5&format=atom"/>
<subtitle>Search results for civil war at http://worldcat.org/webservices/catalog</subtitle>

The title offers a human-readable string that could be used to present a label for the search result, the link field contains a URL that represents the current search in the web service, and the subtitle gives a brief annotation for the search.

In addition, responses include some OpenSearch response elements that are used to extend the RSS and Atom syndication formats. The additional metadata can be helpful for result set context and navigation, including the result size, starting position, number of items, and the search terms. For example:

<opensearch:totalResults>322066</opensearch:totalResults>
<opensearch:startIndex>1</opensearch:startIndex>
<opensearch:itemsPerPage>5</opensearch:itemsPerPage>

<opensearch:Query role="request" searchTerms="civil war" startPage="1"/>

Other response elements differ, depending on the requested format.

For Atom responses, these elements are especially useful:

The link elements with rel attributes of alternate, self, first, next and last include pre-built URLs for navigation through the search result.

For each entry in the result set ...

  • title includes the item's title from the MARC 245 field.
  • author includes the MARC 100 field, or if the 100 field is not present, all the MARC 700 fields. It is available in most but not all records.
  • link includes a pre-built URL for linking to the title in WorldCat.org.
  • id includes the OCLC record number, as part of a WorldCat.org link. As other OCLC web services emerge, this ID will be an important key for input into other types of requests (for example, to get the reviews for an item, to add it to a list, etc.)
  • dc:identifier provides the ISBN, ISSN, and LCCN information.
  • if a valid cformat value was included in the request, content includes an encoded HTML string in the requested citation format for the title. This field could be especially helpful for producing a standard format reading list from a web service response.
  • summary includes a summary of the title from the MARC 520 field. It isn’t available for all records.

For RSS responses, these elements are especially useful for each "item" in the result:

  • title includes the item's title from the MARC 245 field.
  • author includes the MARC 100 field, or if the 100 field is not present, all the MARC 700 fields. It is available in most but not all records.
  • link includes a pre-built URL for linking to the title in WorldCat.org.
  • guid includes the OCLC record number, as part of a WorldCat.org link. As other OCLC web services emerge, this ID will be an important key for input into other types of requests (for example, to get the reviews for an item, to add it to a list, etc.)
  • dc:identifier provides the ISBN, ISSN, and LCCN information.
  • if a valid cformat value was included in the request, content:encoded includes an encoded HTML string in the requested citation format for the title. This field could be especially helpful for producing a standard format reading list from a web service response.
  • description includes a summary of the title from the MARC 520 field. It isn’t available for all records.

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