Read google custom search next page for more information.

When using the custom search JSON API, you can use the cse.list method to return metadata about the search performed, metadata about the custom search engine used for the search, and the search results.google custom search next page

This method requires three query parameters:

  • The search engine to use in your request (using the cx query parameter)
  • The search terms for in this request (using the q query parameter).
  • Your API key (using the key query parameter).

All other query parameters are optional.

Create a search engine without any coding

The response object contains a ‘nextPage’ dictionary. You can use this to determine the start index of the next request. Like so:

res = service.cse().list(
     q='lectures',
     cx='013036536707430787589:_pqjad5hr1a',
     num=10, #Valid values are integers between 1 and 10, inclusive.
).execute() 

next_response = service.cse().list(
     q='lectures',
     cx='013036536707430787589:_pqjad5hr1a',
     num=10,
     start=res['queries']['nextPage'][0]['startIndex'],
).execute()

You may also like