How to solve google books api 403 restriction?


I'm trying to collect about 40 books from the google api. This is the code

const title = ["0596007124","0704381362", ...]
  url = ""  + isbn; 

It works sometimes if I only loop through 3 books. But I have been able to get all of them at one point.

From searching it seems that using this line somewhere would do the trick

content: `script-src 'self' ${url} 'unsafe-inline' 'unsafe-eval'`

But I don't know how to use it. I tried to put it with the get method

content: `script-src 'self' ${url} 'unsafe-inline' 'unsafe-eval'`

But didn't work.


So what is the exact error response? It actually sounds more like you exceeded your request rate limit, in which case you might increase the per-user quota (requires an account, obviously). However 40 individual requests is quite a lot anyway, so I'd suggest to query these books in a single request instead:

const isbns = ['0596007124', '0704381362']

const url = isbns.reduce(
  (res, isbn, index) => res + (index > 0 ? '+OR+' : '') + 'isbn:' + isbn,



Oh I love it. I didn't know that could be done.

Thanks so, much it works


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.