Query with Pagination

This documentation provides an example of how to send a GET request to the SERP API with pagination parameters and interpret the response.

API Request with Pagination

To send a GET request to the SERP API for a news-related query with pagination, you can use the following:

  • Bash

  • Javascript

  • Python

  • Go

curl -L 'https://serp-api.netnut.io/search?device=desktop&q=news&num=10&start=10' \
-H 'Accept: application/json' \
-H 'Authorization: Basic base64(username:password)'

In this request, we've added two pagination parameters:

  • num: This optional parameter defines the result offset, skipping the given number of results. It's used for pagination. For example, num=10 will skip the first 10 results.

  • start: This optional parameter defines the maximum number of results to return. For example, to return the second page, start=10 will return 10 results starting from the 11th result.

API Response

The API will respond with a JSON object containing the search results for the specified pagination parameters. Here is an example of the response for the second page of results (skipping the first 10 results):

n the response, you'll see that the currentPage indicates the current page of results, and the nextPage and nextPageLink provide information about the next page of results. The nextPageStart parameter specifies the starting position for the next page of results.

This demonstrates how to use the num and start parameters for pagination in the SERP API. You can adjust these parameters in your GET request to retrieve the desired page of results.

Last updated