Google custom search next page

Google custom search next page

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.

Rate this article

Share this article

Read Remove URLs in Google custom search for more information.

Google custom search next page

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

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()

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.

You may also like