Search code examples
javagoogle-books

Google books api always returns nothing


I am trying to use Google books API but for any request I receive totalItems = 0.

I've tried to send the request in chrome, for example:

https://www.googleapis.com/books/v1/volumes?q=flowers+inauthor:keyes&key=MY_KEY

Also I've tried the approach, described here:

https://github.com/google/google-api-java-client-samples/blob/master/books-cmdline-sample/src/main/java/com/google/api/services/samples/books/cmdline/BooksSample.java

And for any query with any parameters I always receive nothing:

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

I generated key using developer console: https://console.developers.google.com and selected option Api Key.


Solution

  • As I've understood, the problem is in my country(Belarus). Looks like Google Books APi doesn't work in Belarus. Problem can be fixed by using VPN.