ISBN Title Lookup Google Doc Spreadsheet

We needed to do a quick inventory of some discarded books, and while we could pull the majority of the information from our catalog, we have some donations and other books we had no quick method of getting title data.

We’ll scan the barcodes in using a barcode scanner

This uses the ISBNdb API and a quick bit of importXML

There is a 25 ISBN/day limit on this API key for testing. Google limits importXML to 50/sheet. Please get your own ISBNdb account to implement this.

https://isbndb.com/

Here’s the bit of code for the spreadsheet. Copy the example here

=importXML( concatenate( "http://isbndb.com/api/v2/xml/EV31C4LJ/books?q=", A2), "//title")

=importXML( – grabs the XML response from the ISBNdb API

concatenate( – assembles the API call URL

http://isbndb.com/api/v2/xml/EV31C4LJ/books?q= – initial APIcall string. Specifies v2 API, XML response, key and the source we’re pulling from (books)

A2 – The cell from which we’re pulling the ISBN from

“//title” – The section of the XML response that we want to put in the cell, in this case the title of the book.

Advertisements

8 Responses

  1. is there a way of doing this in reverse? taking the title and getting the number?

    • Yes, but it’s far more complex. If you’re going to try to do it programatically, you should probably use the Amazon API first to get the ISBN, then use the xISBN OCLC API to get all of their recorded variations of the ISBN. There are often a huge number of ISBN’s attached to various versions of a work.

      I know how to structure the program to get that result, but it’s a bit beyond my skills as a programmer

  2. Brett, thanks for this very helpful post!

    I’m attempting to create a spreadsheet that queries the database for more information than just the title. I can’t seem to find what the names of the sections of the response are to retrieve things like author and publication date.

    Thanks again.

    • Have you taken a look at the documentation? http://isbndb.com/api/v2/docs

      The raw data returned (this is from my testing API key with a 25/day limit) looks like this. The title is in the first level of the XML, so the XPath is just //title. Author is under author data. It’s xpath is //author_data/name

      Publication date is under book_id is //edition_info but it’s not completely straightforward, it will return both the format and the publication date.

      I updated the example 25/day spreadsheet with examples here

      • Brett,

        Thanks so much, I was able to finally figure things out based on this.

  3. This is an extremely useful post for greytops like me whose programming probably ended around Fortran77 !!!

    Like the previous comment, I want a list of the available parameters as I need more than Title, author and edition_info. I have looked at the documentation as you suggested but I still cannot find a list of all available parameters. I cannot access your updated examples as it returns an “exceeded daily allowance” error.

    A list or pointer to a list of parameters would be extremely helpful. as I wish to catalogue my personal collection of mostly non-fiction books (probably between 5-10000 books).

    I apologise in advance if it just my ignorance that causes the answer to elude me.

    Thanks,
    Simon Morgan

  4. Further to my previous comment, I have been able to access your raw XML file so I can see the available parameters. I was quite surprised how few there were.
    One thing that is puzzling me is the subject_ids. This returns a number of cells of data in the column which causes any new data row entries to report an error (overwriting data etc).
    Is there a way that I can just extract the first line of subject_ids data?

    Regards
    Simon Morgan

    • Yes, you can play with the xpath. It should be //subject_ids[1], but it’s not playing nicely with the import into GoogleSheets. It may work easier with something like Python.
      Best of luck!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: