# Pagination

> [!WARNING]
> The Web Content API is **deprecated**. Use the [News, Blogs & Forums APIs](news-blogs-forums-overview) instead - same content, one endpoint per content type, and where new features land.

The API returns up to `size` posts per call (max 100). To collect more, follow the `next` link.

## How it works

1. Run your query.
2. Read `posts` and `moreResultsAvailable`.
3. Take the `next` value from the response (or the `X-WebHose-Next` header).
4. Append it to `https://api.webz.io` and call again.
5. Repeat until `moreResultsAvailable` is `0` (or `posts` is empty).

## Example

First call:

```bash
https://api.webz.io/filterWebContent?token=YOUR_TOKEN&q=bitcoin
```

Response:

```json
{
  "posts": [ ... ],
  "moreResultsAvailable": 8200,
  "next": "/filterWebContent?token=YOUR_TOKEN&ts=1748000000000&q=bitcoin&ni=abc123"
}
```

Next call:

```bash
https://api.webz.io/filterWebContent?token=YOUR_TOKEN&ts=1748000000000&q=bitcoin&ni=abc123
```

> [!NOTE]
> The `next` URL carries cursor fields (`ts`, `ni`, `ns`) so each page continues where the last one stopped. Use it as-is rather than building it yourself.
