Question

using google custom API, I have a problem when I try to get results of more than 100. I got an error as shown below. The code I am using is below:

res = service.cse().list(
    q='lectures',
    cx='my custom search engine id',
    num=10,
    start=100,
).execute()

I want to extract several pages every day.I got this error.

  HttpError 400 when requesting .. "Invalid Value">

if I make the start=90 or less it works!

Was it helpful?

Solution

From the documentation for the Google Custom Search API:

https://developers.google.com/custom-search/v1/using_rest

This role is not present if the current results are the last page. Note: This API returns up to the first 100 results only.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top