Thanks, Dan. Remember: if you are not from an OCLC member institution, there are limitations on the API. As I recall, less bibliographic data is returned from the open API. OpenLibrary is open, so all of the data is available.

kc



On 12/15/14 7:20 PM, Dan Scott wrote:
On Wed, Dec 10, 2014 at 2:39 PM, David Rissenberg <[email protected]
<mailto:[email protected]>> wrote:

    Hi, ____

    __ __

    I’m a developer and have been asked to put a function into an
    application which would return bibliographic data using an OCLC
    number (ISBN might also work).  The end purpose of this would be to
    create a bibliography for users with citations in MLA style.  I’m
    looking for the most direct way of accomplishing this and it looks
    as though the Open Library API can do it but confirmation (or other
    suggestions) would be most welcome.  The users are advanced
    humanities scholars so I imagine some of the items might be a bit
    obscure.


It's not OpenLibrary's API, but since you mentioned OCLC numbers the
OCLC xID service might barely work for your needs for constructing MLA
citations, although starting from an OCLC number it seems to take two
hops; ISBN would be more direct.

Starting with OCLC number 154684429:

curl
'http://xisbn.worldcat.org/webservices/xid/oclcnum/154684429?method=getMetadata&format=json&fl=*'

returns:

{
  "stat":"ok",
  "list":[{
     "isbn":["9780596515218",
      "9780596529260"],
     "owi":["owi67201841"],
     "oclcnum":["154684429"]
   }]
}
Then you can take one of the returned ISBNs and request that:

curl
'http://xisbn.worldcat.org/webservices/xid/isbn/9780596529260?method=getMetadata&format=json&fl=*'

which returns:

{
  "stat":"ok",
  "list":[{
     "url":["http://www.worldcat.org/oclc/154684429?referer=xid";],
     "publisher":"O'Reilly",
     "form":["BC"],
     "lccn":["2007278140"],
     "lang":"eng",
     "city":"Sebastopol, Calif.",
     "author":"Leonard Richardson and Sam Ruby.",
     "ed":"1st ed.",
     "year":"2007",
     "isbn":["9780596529260"],
     "title":"RESTful web services",
     "oclcnum":["154684429",
      "234290815",
...
}

This is straight from the docs at
http://www.oclc.org/developer/develop/web-services/xid-api/xstandardNumber-resource.en.html

With the OpenLibrary API, searching on OCLC numbers is going to be more
hit or miss; I'd suggest going with ISBN if you have them.

curl
'https://openlibrary.org/api/books?bibkeys=ISBN:9780596529260&format=json&jscmd=data'

returns much richer data than you get from OCLC, too much to bother
pasting here. See the OpenLibrary API docs at
https://openlibrary.org/dev/docs/api/books for more info.


_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
Archives: http://www.mail-archive.com/[email protected]/
To unsubscribe from this mailing list, send email to 
[email protected]


--
Karen Coyle
[email protected] http://kcoyle.net
m: 1-510-435-8234
skype: kcoylenet/+1-510-984-3600
_______________________________________________
Ol-tech mailing list
[email protected]
http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech
Archives: http://www.mail-archive.com/[email protected]/
To unsubscribe from this mailing list, send email to 
[email protected]

Reply via email to