Search code examples
google-custom-searchgoogle-api-python-client

Is there a limit to start option in google custom api CSE list?


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!


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.