user6732360
user6732360

Reputation:

Google Books API - Book Details not Returned

So I started using the Google Books API for an application that I am building and I am fairly happy with the results.

But I have noticed a strange behaviour sometimes. Some ISBNs do not return any book details even though the book exists in the database.
For example, if I give: https://www.googleapis.com/books/v1/volumes?q=isbn:0262527359,
I get the following response:

{
 "kind": "books#volumes",
 "totalItems": 0
}

I digged around the internet regarding this problem and found this link:
https://productforums.google.com/forum/#!topic/books-api/R5DvlRh-EKo

They suggest a workaround by not mentioning isbn: in the search query. So, the query becomes: https://www.googleapis.com/books/v1/volumes?q=0262527359
This method is not perfect but it's the only workaround I found.

That's when I noticed another problem. There is a mismatch between the description given on the webpage and the one in the response to the API call.

Can someone explain these strange behaviours to me? Are there any better solutions?

Upvotes: 3

Views: 1974

Answers (1)

Ishaan Kanwar
Ishaan Kanwar

Reputation: 447

So i did some digging around and found out about this strange behaviour, when your query is of the form ...?q=isbn:0262527359, the results you get are the books that have this same isbn only and when you use the query of the form ...?q=0262527359, the results you get are the books that have any instance of this number in the record fields of any book. It can be either in editions isbn array or any other, this query will search all fields for matching results whereas the former query will only search isbn for matching results

Upvotes: 1

Related Questions