xISBN (Web service)Use this Web service to map book-related identifiers (ISBN, LCCN, OCLC number), based on WorldCat information.
Free and subscription versions are available.
|
The xISBN API provides a set of methods corresponding to a single, known ISBN value. All request formats take a list of named parameters. The required parameter method is used to specify the calling method, the required parameter format is used to specify a response format, such as XML, XHTML, JSON, Python or Ruby formats; the optional parameter fl controls what fields to return; the optional parameter library limits search scope to a library or collection. The response is always a list of normalized ISBN numbers, with requested metadata fields. The xISBN service endpoint URL is:
http://xisbn.worldcat.org/webservices/xid/isbn/
For example, to request all editions of 0596002815 [Learning Python],
request is:
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml&fl=form,year,lang,ed
The response is an XML formatted message similar to this example.
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn form="BA" year="2004" lang="eng" ed="2nd ed.">0596002815</isbn>
<isbn form="BA DA" year="1999" lang="eng">1565928938</isbn>
<isbn form="BA" year="1999" lang="eng" ed="1st ed.">1565924649</isbn>
</rsp>
and to request a thirteen digits ISBN number of 0596002815,
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=to13&format=xmlThe response is:
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok"> <isbn>9780596002817</isbn> </rsp>
You are encouraged to obtain a Worldcat Affiliate ID before using the service. An affiliate ID can be used to track usage of your application. To provide an affiliate ID in request, simply add "&ai=[affiliate ID]", such as:
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml&ai=[affiliate ID]
Affiliate id based usage track is a free service and does not associate access privilege. You can check affiliate ID based usage from xISBN admin page.
ebook Limit search to ebooks, the ebook list is based on OCLC Openly's UHF Holdings Database.freeebook Limit search to free ebooks, the ebook list is based on OCLC Openly's UHF Holdings Database.bookmooch Limit search to bookmooch's inventory. paperbackswap Limit search to paperbackswap's inventory. wikipedia Limit search to ISBNs appeared in wikipedia, inspired by Lars Aronsson's work. oca Limit search to Open Content Alliance. xISBN by default returns first 1000 matched ISBNs, however there are a few works with more than 1000 matches (e.g. Bible), in that case, the remaining ISBNs can be fetched by the paging method. We use "startIndex" and "count" parameters to page the result. The same technique can be used if the client desired less than 1000 records in response. The definition of startIndex and count is same as OpenSearch Specification. To do a paging request:
http://xisbn.worldcat.org/webservices/xid/isbn/9789574760442?method=getEditions&startIndex=1&count=2
method: mandatory, possible values include: to10,to13, fixChecksum, getMetadata, getEditionsformat: mandatory, possible values include: xml, html,json,python,ruby,text,csvlibrary: optional, limits the search to a library, possible values include: ebook,bookmooch,wikipedia,paperbackswap,oca, freeebook,etc.fl:optional, "fl" parameter controls what stored fields are returned, e.g. fl=* return all fields, fl=ed,lang returns edition and language fields.startIndex:optional, the index of the first search result desired by the client.count:optioanl, the number of search results desired by the client.callback:optional, JSON callback functions, only valid for JSON format ai: optionaltoken:optional (subscription user-only)hash:optional (subscription user-only)This service returns a list of relevant ISBNs and requested metadata fields.
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml&fl=form,year,lang,ed
The response is an XML formatted message similar to this example.
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn form="BA" year="2004" lang="eng" ed="2nd ed.">0596002815</isbn>
<isbn form="BA DA" year="1999" lang="eng">1565928938</isbn>
<isbn form="BA" year="1999" lang="eng" ed="1st ed.">1565924649</isbn>
</rsp>
By default, this method returns a list of relevant ISBNs
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml
The response is an XML formatted message similar to this example.
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn>0596002815</isbn>
<isbn>1565928938</isbn>
<isbn>1565924649</isbn>
</rsp>
This service returns metadata information about requested ISBN.
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getMetadata&format=xml&fl=*
The response is an XML formatted message similar to this example.
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn title="Learning Python" form="BA" year="2004" lang="eng" ed="2nd ed.">0596002815</isbn>
</rsp>
This service converts an ISBN number to a normalized 13 digits ISBN format.
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=to13&format=xml
The response is an XML formatted message similar to this example.
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok"> <isbn>9780596002817</isbn> </rsp>
This service converts an ISBN number to a normalized 10 digits ISBN format.
http://xisbn.worldcat.org/webservices/xid/isbn/978-0-596-00281-7?method=to10&format=xml
The response is an XML formatted message similar to this example.
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok"> <isbn>0596002815</isbn> </rsp>
This service re-calculate the checksum digit of an ISBN number.
http://xisbn.worldcat.org/webservices/xid/isbn/978-0-596-00281-6?method=fixChecksum&format=xml
The response is an XML formatted message similar to this example.
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok"> <isbn>9780596002817</isbn> </rsp>
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn title="Learning Python" form="BA" year="2004" lang="eng" ed="2nd ed." author="Lutz, Mark." publisher="O'Reilly">0596002815</isbn>
</rsp>
A number of metadata fields can be associated with an ISBN number:
author: Author city: City of Publicationed: Edition form: The ONIX production form code, this field is space-delimited if multiple values exist. Current supported values include:
AA (Audio), BA (Book), BB (Hardcover), BC (Paperback), DA (Digital),FA (Film or transparency), MA(Microform), VA(Video).
lang: The language field uses three-character MARC Code List for Languages. lccn: Library Of Congress Control Number, this field is space-delimited if multiple values exist.oclcnum: OCLC number, this field is space-delimited if multiple values exist.originalLang: Original Languagepublisher: Publishertitle: Titleurl: URL link to electronic resource, this field is space-delimited if multiple values exist.year: Publication yearThe request decides which metadata field to return:
to10,to13, and fixChecksum method, only ISBN number is returned.getEditions and getMetadata method, the "fl" parameter is used to control what fields are returned, such as fl=lccn,oclcnmu, fl=*returns all fields. getEditions and default format is xml, for example:
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815
The response is an XML formatted message similar to this example.
<?xml version="1.0" encoding="UTF-8"?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="ok">
<isbn>0596002815</isbn>
<isbn>1565928938</isbn>
<isbn>1565924649</isbn>
</rsp>
http://xisbn.worldcat.org/webservices/xid/isbn/12345678901234returns following response:
<?xml version="1.0" encoding="UTF-8" ?>
<rsp xmlns="http://worldcat.org/xid/isbn/" stat="invalidId"/>
ok: correct request and responseunknownField: the request field is not supportedunknownFormat: the request format is not supportedunknownId: the request identifier looks like a valid ISBN number and unknown to xISBN serviceunknownLibrary: the request library is not supportedunknownMethod: the request method is not supportedinvalidId: the request identifier is not a valid ISBN numberoverlimit: the request is throttled, only header is returnedinvalidAffiliateId: invalid affiliate idinvalidHash: invalid hash (subscription only)invalidToken: invalid access token (subscription only)http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getMetadata&format=json&fl=*&callback=mymethodResults wrapped in callbacks look like this:
mymethod({
"stat":"ok",
"list":[{
"publisher":"O'Reilly",
"form":["BA"],
"lang":"eng",
"city":"Beijing",
"author":"by Mark Lutz and David Ascher.",
"ed":"2nd ed.",
"year":"2004",
"isbn":["0596002815"],
"title":"Learning Python",
"oclcnum":[
"51964644",
"54619668"]}]})
JSON output is native JavaScript, and callbacks are particularly useful for use with web service requests in client-side JavaScript. Yahoo's JSON page has more details about how JSON callback works.
Several other serialization formats are supported, You may check a sample such as:
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=html
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=json
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=python
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=ruby
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=php
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=csv (comma-delimited file)
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&fl=*&format=txt (tab-delimited file)
The OpenURL Framework defines an architecture for creating context-sensitive services. The OpenURL Endpoint URL is:
http://xisbn.worldcat.org/webservices/xid/openurl/In OpenURL request, the
rft_id is a complete ISBN URI, such as URN:ISBN:0596002815; and svc_id is "http://worldcat.org/xid/isbn/"+method+"_"+format. For example (Note: svc_id intentionally not URL-encoded for readability) :
http://xisbn.worldcat.org/webservices/xid/openurl?rft_id=URN:ISBN:0596002815&url_ver=Z39.88-2004&svc_id=http://worldcat.org/xid/isbn/to13_xml
unAPI is a tiny HTTP API for the few basic operations necessary to copy discrete, identified content from any kind of web application. The unAPI Endpoint URL is :
http://xisbn.worldcat.org/webservices/xid/unapi/In unAPI request, the
id is a complete ISBN URI, such as URN:ISBN:0596002815; and format argument is method+"_"+format. For example:
To get an XML response for ISBN number 0596002815:
http://xisbn.worldcat.org/webservices/xid/unapi?id=URN:ISBN:0596002815&format=getEditions_xml
To get a JSON response for ISBN number 0596002815:
http://xisbn.worldcat.org/webservices/xid/unapi?id=URN:ISBN:0596002815&format=getEditions_json
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815/editions.xml
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815/metadata.js
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815/to13.rb
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815
Commercial and heavy usage users could obtain an access token. To provide a token in request, add "&token=[token]&hash=[hashvalue]". The hash value is calculated per request, such as:
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml&token=[token]&hash=[hash]
The hash is calculated this way:
md5(requestURL+"|"+requestIPaddress+"|"+secret)
e.g. If you request ip address is "128.12.12.1", your token is "mytoken", and your secret is "mysecret", and you are requesting
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815?method=getEditions&format=xml, the md5 hash will be calculate like:
md5("http://xisbn.worldcat.org/webservices/xid/isbn/0596002815|128.12.12.1|mysecret")
=da82217b05017710f998f6ebe8b07ce6
And you complete request will be
http://xisbn.worldcat.org/webservices/xid/isbn/0596002815? method=getEditions&format=xml&token=mytoken&hash=da82217b05017710f998f6ebe8b07ce6At server end we will re-run the hash algorithm and compare hash value. You can maintain access token from xISBN account page.
Commercial and heavy usage users could also use IP address-controlled access. IP address-controlled access does not require any parameter in xISBN request, you can maintain IP address-controlled access from xid account page. It's mandatory to put affiliate ID in request if you choose to use IP address-controlled access.