views:

2946

answers:

10

I am planning on creating a small website for my personal book collection. To automate the process a little bit, I would like to create the following functionality:

The website will ask me for the ISBN number of the book and will then automatically fetch the title and add it to my database.

Although I am mainly interested in doing this in php, I also have some Java implementation ideas for this. I believe it could also help if the answer was as much language-agnostic as possible.

+2  A: 

You could use the isbndb's web service

Galwegian
+1  A: 

I haven't tried it, but take a look at isbndb

API Description: Introduction

ISBNdb.com's remote access application programming interface (API) is designed to allow other websites and standalone applications use the vast collection of data collected by ISBNdb.com since 2003. As of this writing, in July 2005, the data includes nearly 1,800,000 books; almost 3,000,000 million library records; close to a million subjects; hundreds of thousands of author and publisher records parsed out of library data; more than 10,000,000 records of actual and historic prices.

Some ideas of how the API can be used include:

- Cataloguing home book collections
- Building and verifying bookstores' inventories
- Empowering forums and online communities with more useful book references
- Automated cross-merchant price lookups over messaging devices or phones

Using the API you can look up information by keywords, by ISBN, by authors or publishers, etc. In most situations the API is fast enough to be used in interactive applications.

The data is heavily cross-linked -- starting at a book you can retrieve information about its authors, then other books of these authors, then their publishers, etc.

The API is primarily intended for use by programmers. The interface strives to be platform and programming language independent by employing open standard protocols and message formats.

Giovanni Galbo
A: 

To obtain data for given ISBN number you need to interact with some online service like isbndb. One of the best sources for bibliographic information is Amazon web service. It provides you with all bibliographic info + book cover.

aku
+5  A: 

Check out ISBN DB API. It's a simple REST-based web service. Haven't tried it myself, but a friend has had successful experiences with it.

It'll give you book title, author information, and depending on the book, number of other details you can use.

fencliff
+1  A: 

Or Ottobib, another free online ISBN web service.

James A. Rosen
A: 

You might want to look into LibraryThing, it has an API that would do what you want and they handle things like mapping multiple ISBNs for different editions of a single "work".

Tom
A: 

As an alternative to isbndb (which seems like the perfect answer) I had the impression that you could pass an ISBN into an Amazon product URL to go straight to the Amazon page for the book. While this doesn't programmatically return the book title, it might have been a useful extra feature in case you wanted to link to Amazon user reviews from your database.

However, this link appears to shows that I was wrong. Actually what Amazon uses is the ASIN number and while this used to be the same as 10-digit ISBN numbers, those are no longer the only kind - ISBNs now have 13 digits (though there is a straight conversion from the old 10-digit type).

But more usefully, the same link does talk about the Amazon API which can convert from ISBN to ASIN and is likely to also let you look up titles and other information. It is primarily aimed at Amazon affiliates, but no doubt it could do the job if for some reason isbndb does not.

Edit: Tim Spalding above points out a few practical facts about ISBNs - I was slightly too pessimistic in assuming that ASINs would not correspond any more.

Leigh Caldwell
+11  A: 

Hi. This is the LibraryThing founder. We have nothing to offer here, so I hope my comments will not seem self-serving.

First, the comment about Amazon, ASINs and ISBN numbers is wrong in a number of ways. In almost every circumstance where a book has an ISBN, the ASIN and the ISBN are the same. ISBNs are not now 13 digits. Rather, ISBNs can be either 10 or 13. Ten-digit ISBNs can be expressed as 13-digit ones starting with 978, which means every ISBN currently in existance has both a 10- and a 13-digit form. There are all sorts of libraries available for converting between ISBN10 and ISBN13. Basically, you add 978 to the front and recalculate the checksum digit at the end.

ISBN13 was invented because publishers were running out of ISBNs. In the near future, when 979-based ISBN13s start being used, they will not have an ISBN10 equivalent. To my knowledge, there are no published books with 979-based ISBNs, but they are coming soon. Anyway, the long and short of it is that Amazon uses the ISBN10 form for all 978 ISBN10s. In any case, whether or not Amazon uses ten or thirteen-digit ASINs, you can search Amazon by either just fine.

Personally, I wouldn't put ISBN DB at the top of your list. ISBN DB mines from a number of sources, but it's not as comprehensive as Amazon or Google. Rather, I'd look into Amazon—including the various international Amazons—and then the new Google Book Data API and, after that, the OpenLibrary API. For non-English books there are other options, like Ozone for Russian books.

If you care about the highest-quality data, or if you have any books published before about 1970, you will want to look into data from libraries, available by Z39.50 protocol and usually in MARC format, or, with a few libraries in Dublin Core, using the SRU/SRW protocol. MARC format is, to a modern programmer, pretty strange stuff. But, one you get it, it's also better data, and includes useful fields like the LCCN, DDC, LCC and LCSH.

LibraryThing runs off a homemade Python library that queries some 680 libraries and converts the many flavors of MARC into Amazon-compatible XML, with extras. We are currently reluctant to release the code, but may be releasing a service soon.

A: 

This seems to be a lot of overkill for a home project. I recently installed zbarcam (and zbarimg as part of the zbar tools package) on Ubuntu 9.10, and have found that it can work very nicely with the webcam built into my Sony Vaio P series netbook. I can set it to "raw" to scan a book's UPC barcode for the ISBN number, and that works fairly well (many books yield the code even before the camera fully focuses, others just don't want to be scanned no matter how clear the image...). I save those captured ISBN numbers to a simple text file, and want to have a shell script read each, plug it into a URL to pass to lynx or links with the "-dump" option to get basic book info to then capture into another text file for my home library "database". I am thinking of having the file names reflect the location - i.e. "homeoffice-small-shelf.lib", "comp-room-case-1.lib", etc. Just trying to KISS it.

That all seems to be too simple for what I have found so far with sites like books.google.com, worldcat.org, and isbndb.com which want to spit out lots of graphically oriented web page output (google), API's for Java, or xml (isbn.db) that lynx/linx cannot seem to capture (I see just the last line). Am I not looking for this simple text mode web interface/output the right way, or does it not even exist?

TIA, RO

rokky
A: 

Google has is own API for Google Books that let's you query Google Book database with ease. The protocol is XML based, you can view the technical information about it here.

I wrote a simple wrapper to query the API, you can find the source here. Here's how you can use it to get the title of a book by his ISBN.

<?php
include('BookSearcher.class.php');    
$googleBook = new BookSearcher();

$book= $googleBook->getBookByISBN('2844272592');
echo $book['titre'];
?>

I haven't done any documentation in English for that project yet, but if anyone need it, I will do the translation.

HoLyVieR