> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Paginate Through Results

> Get more than the first page of results by requesting page 0 to 10 with the page parameter

> [!NOTE]
>
> **Capability:**`page`

Use this when the first page of results is not enough, such as collecting candidate URLs for a list or checking further down the ranking.

```python Python theme={null}
from tinyfish import TinyFish

client = TinyFish()

urls = []
for page in range(3):
    response = client.search.query(query="python tutorial", page=page)
    urls.extend(r.url for r in response.results)

print(len(urls), "results across 3 pages")
```

```typescript TypeScript theme={null}
import { TinyFish } from "@tiny-fish/sdk";

const client = new TinyFish();

const urls: string[] = [];
for (let page = 0; page < 3; page++) {
  const response = await client.search.query({ query: "python tutorial", page });
  urls.push(...response.results.map((r) => r.url));
}

console.log(urls.length, "results across 3 pages");
```

```bash cURL theme={null}
curl -G "https://api.search.tinyfish.ai" \
  --data-urlencode "query=python tutorial" \
  --data-urlencode "page=1" \
  -H "X-API-Key: $TINYFISH_API_KEY"
```

Pages start at `0`, so `page=1` is the second page. The response echoes the `page` you asked for.

## Common Mistakes

> [accordion] Asking for a page beyond 10
>
> The highest page number is `10`. A larger value is rejected with HTTP 400, and so is a negative number.

> [accordion] Reading total\_results as the number of matches
>
> `total_results` is the number of results returned for the page you requested, not the number of matches overall. Page 10 can return fewer results than earlier pages.

> [accordion] Merging pages without removing repeats
>
> Neighboring pages can share a result. When you combine pages, de-duplicate by `url`.

## Related

> [card] [Search, Then Fetch Full Page Content](https://docs.tinyfish.ai/tinysearch/how-to/search-then-fetch.md)
>
> Read the pages behind the results you collect

> [card] [TinySearch API Reference](https://docs.tinyfish.ai/tinysearch/reference)
>
> Every parameter, accepted value, and error code


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.