> For the complete documentation index, see [llms.txt](https://docs.webscrapingapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webscrapingapi.com/google-search-api/google-apis-response/google-search-api/pagination.md).

# Pagination

Each API call returns Google results scraped from one page. In order for you to have a better look over the length of the search result, the response body will include a special key, named `pagination` which holds information about the page you scraped and its 'neighbours':

<table><thead><tr><th width="169">Element</th><th width="109">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>other_pages</code></td><td><code>Object</code></td><td>Lists the rest of the pages with the key set as the page number and the value as the page link</td></tr><tr><td><code>next</code></td><td><code>String</code></td><td>Link to the next page</td></tr><tr><td><code>current</code></td><td><code>Integer</code></td><td>The value of the current page</td></tr></tbody></table>

### Pagination Results Request Example

## Request Example That Returns Pagination Elements

<mark style="color:blue;">`GET`</mark> `https://serpapi.webscrapingapi.com/v1?engine=google&api_key=<YOUR_API_KEY>&q=ozark`

This is a basic GET request that returns the pagination results found on the Google page.

#### Query Parameters

| Name                                       | Type   | Description      |
| ------------------------------------------ | ------ | ---------------- |
| q<mark style="color:red;">\*</mark>        | String | `ozark`          |
| api\_key<mark style="color:red;">\*</mark> | String | `<YOUR_API_KEY>` |

{% tabs %}
{% tab title="200: OK API response" %}

```javascript
{
    ...
	"pagination": {
		"other_pages": {
			"2": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=10&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARA3",
			"3": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=20&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARA5",
			"4": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=30&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARA7",
			"5": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=40&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARA9",
			"6": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=50&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARA_",
			"7": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=60&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARBB",
			"8": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=70&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARBD",
			"9": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=80&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARBF",
			"10": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=90&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8tMDegQIARBH"
		},
		"next": "https://www.google.com/search?q=ozark&ei=VHIKYdXkDo24tQbkiqqIDA&start=10&sa=N&ved=2ahUKEwjV3pe4mpfyAhUNXM0KHWSFCsEQ8NMDegQIARBJ",
		"current": 1
	},
    ...
}
```

{% endtab %}
{% endtabs %}

<figure><img src="/files/5mp66u9IHRGUToNl3mvM" alt=""><figcaption><p>Scrape Google Search and Get Pagination Results</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webscrapingapi.com/google-search-api/google-apis-response/google-search-api/pagination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
