A smart young programmer from a book-related company and I were talking. It turns out that, to validate ISBNs and get back both 10- and 13-digit versions he was submitting ISBNs to Amazon Web Services. That’s like calling NORAD to find out if it’s raining.* Nor did he seem likely to hunt around for an ISBN library for Ruby. After all, what he was doing worked.
So I made a quick, very stupid API, ie. http://www.librarything.com/isbncheck.php?isbn=0765344629
- Give it any old ISBN and it does the math to return the ISBN10 and ISBN13 forms, if both exist.
- It removes dashes and other junk.
- It transparently fixes missing initial zeroes. This is a common problem with data from Excel files, which turn 0765344629 into 765344629.
- If the ISBN isn’t valid and can’t be easily fixed, it returns an error.
Don’t hit it more than 10 times/second. Otherwise, there are no usage restrictions.