Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve book's information in XML/JSON from library of congress by ISBN

Tags:

api

isbn

z39.50

The Library of Congress has a site to search books by ISBN. A simple way to retrive book's information is using a URL like:

http://lccn.loc.gov/2009019559/mods

where it returns a XML structure that may parse easily. The URL requires a unique LCCN number in the the following format:

http://lccn.loc.gov/[lccn]/mods

I have a batch of books that has ISBN encoded in barcode. How may I retrieve/convert ISBN to LCCN in order to retrieve the XML data of the book?

like image 977
Chau Chee Yang Avatar asked Dec 02 '12 07:12

Chau Chee Yang


People also ask

How can I get ISBN information?

If you want to access this information, you can use the Product Advertising API. It will allow you to search books by ISBN as well as other variables: title, author, publication date, publisher, etc. You can also get additional data on selected titles and verify book details when you need to refresh data.

Is there an ISBN database?

ISBNdb: The World's largest book database™ ISBNdb gathers data from hundreds of libraries, publishers, merchants and other sources around the globe to compile a vast collection of unique book data searchable by ISBN, title, author, or publisher.

Does the Library of Congress have an API?

Available APIsThe Library of Congress makes three different loc.gov APIs available to the public: JSON/YAML for loc.gov: The loc.gov API provides structured data about Library of Congress collections.

Is there an API for books?

Using the Google Books API, your application can perform full-text searches and retrieve book information, viewability and eBook availability.


1 Answers

You can use the SRU catalog from the Library of Congress. The query would look something like this:

lx2.loc.gov:210/lcdb?version=1.1&operation=searchRetrieve&query=bath.isbn=[ISBN]&maximumRecords=1&recordSchema=mods

Replacing [ISBN] with the ISBN you want to look up

Within that response is an LCCN element. However, the catalog already returns MODS, so it might not be necessary to do anything at all.

like image 102
themattenatorknows Avatar answered Oct 04 '22 11:10

themattenatorknows