OCLC Introduces an API for Anyone to Access Book Data

OCLC announced on Monday the availability of a new API for querying the WorldCat database: the WorldCat Basic API. This is a big deal — it opens up part of the metadata in WorldCat to anyone who wants it (for non-commercial purposes). Previously, access to WorldCat data through the developer network was limited to institutions that are members of OCLC. Data returned includes text strings for author names and book titles, ISBN and OCLC identifiers, a link to the HTML display of the record on WorldCat.org, and an optional HTML-formatted citation.

Getting access to the API is pretty easy. One signs up for an API key that plugs into the URL when making a request. The key are limited to 1,000 queries per day. Requests are made to the API using a REST-style URL, and results are returned in RSS or Atom format.

This is incredibly useful for finding out data when what you have is an ISBN. For example, an API request for ISBN 0-8161-1889-2 would look like this:

http://worldcat.org/webservices/catalog/search/worldcat/opensearch?
q=0816118892&
start=1&
count=10&
wskey=omitted&
format=atom&
cformat=mla

…returns a results set with this data:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:URLEncoder="java://java.net.URLEncoder"
    xmlns:oclcterms="http://purl.org/oclc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
  <title>OCLC Worldcat Search: 0816118892</title>
  <id>http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&start=1&count=10&format=atom&wskey=[omitted]</id>
  <updated>2009-12-16T13:54:55-05:00</updated>
  <subtitle>Search results for 0816118892 at http://worldcat.org/webservices/catalog</subtitle>
  <opensearch:totalResults>2</opensearch:totalResults>
  <opensearch:startIndex>1</opensearch:startIndex>
  <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
  <opensearch:Query role="request" searchTerms="0816118892" startPage="1"/>
  <link rel="alternate"
     href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&start=1&count=10&wskey=[omitted]"
     type="text/html"/>
  <link rel="self"
     href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&start=1&count=10&wskey=[omitted]&format=atom"
     type="application/atom+xml"/>
  <link rel="first"
     href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&start=1&count=10&wskey=[omitted]&format=atom"
     type="application/atom+xml"/>
  <link rel="last"
     href="http://worldcat.org/webservices/catalog/search/worldcat/opensearch?q=0816118892&start=2&count=10&wskey=[omitted]&format=atom"
     type="application/atom+xml"/>
  <link rel="search" type="application/opensearchdescription+xml"
     href="http://worldcat.org/webservices/catalog/opensearch.description.xml"/>
     
  <entry>
     <author>
        <name>Crawford, Walt.</name>
     </author>
     <title>MARC for library use : understanding integrated USMARC</title>
     <link href="http://worldcat.org/oclc/18909048"/>
     <id>http://worldcat.org/oclc/18909048</id>
     <updated>2008-04-03T16:22:32Z</updated>
     <content type="html"><p class="citation_style_MLA">Crawford, Walt.
        <u>MARC for Library Use: Understanding Integrated
        USMARC</u>. [Professional librarian series]. Boston: G.K. Hall, 1989.
        </p></content>
     <dc:identifier>urn:ISBN:0816118876</dc:identifier>
     <dc:identifier>urn:ISBN:9780816118878</dc:identifier>
     <dc:identifier>urn:ISBN:0816118892</dc:identifier>
     <dc:identifier>urn:ISBN:9780816118892</dc:identifier>
     <oclcterms:recordIdentifier>18909048</oclcterms:recordIdentifier>
  </entry>
  
  <entry>
     <author>
        <name>Crawford, Walt.</name>
     </author>
     <title>MARC for library use : understanding integrated USMARC</title>
     <link href="http://worldcat.org/oclc/473475190"/>
     <id>http://worldcat.org/oclc/473475190</id>
     <updated>2009-12-11T02:48:57Z</updated>
     <content type="html"><p class="citation_style_MLA">Crawford, Walt.
        <u>MARC for Library Use: Understanding Integrated
        USMARC</u>. Boston, Mass: G.K. Hall, 1989. </p></content>
     <dc:identifier>urn:ISBN:0816118876</dc:identifier>
     <dc:identifier>urn:ISBN:9780816118878</dc:identifier>
     <dc:identifier>urn:ISBN:0816118892</dc:identifier>
     <dc:identifier>urn:ISBN:9780816118892</dc:identifier>
     <oclcterms:recordIdentifier>473475190</oclcterms:recordIdentifier>
  </entry>
</feed>

From that, one can provide information about other editions of the same work and links back to OCLC for more information and to have people use the locate-in-a-library feature of WorldCat.org.

The WorldCat Basic API joins other free WorldCat services. Unlike the WorldCat Basic API, these services embed pre-formatted HTML into the page without having to understand any coding at all: the “list” widget for displaying a list of items already created in WorldCat; the “keyword search” widget for displaying the results of a search in WorldCat; the “search box” widget that lets users enter a search term and be taken to the full-blown WorldCat.org; and embedded search WorldCat links for pre-constructing a search that leads into the full-blown WorldCat.org. All of these are free for non-commercial use, as described by the OCLC Affiliate Services Terms and Conditions.

If I were to have a complaint about the WorldCat Basic API, it would not be about the API itself but rather how it is described on the WorldCat Affiliate Services page. Those that have been following OCLC’s efforts in providing developer API access into WorldCat data know about other services such as the WorldCat Search API, xISBN/xISSN, and the Registry Search. What isn’t clear from any of the pages is “What is the definition of affiliate?” and “Given different tiers of affiliate status, who has access to (how much of) what?” Since OCLC is a cooperative organization, does “Affiliate” mean a member of the cooperative? In a conversation with Roy Tennant on the code4lib IRC channel, he cleared this up this question: in this case “affiliate” means more of the Internet-era definition of the word where a site offers services for other developers to consume. One is still left with the second question, though, as to what services are available at what limits to which categories of consumers. For instance, the page describing the xISBN service lists several tiers: free for any non-commercial use up to 500 requests/day, free (presumably with no daily limit) to all OCLC cataloging members, and available on a subscription baseis for non-commercial use that exceeds 500 requests per day or for commercial use. There a similar tiers described in other services, but there isn’t an acknowledgement of these tiers on the main WorldCat affiliates page or a convenient list of what is possible in what tiers. I hope OCLC will consider revising the description of these services to include these details.