# Pagination

Every search response includes a `next` field - a ready-made relative URL for the next page. You never need to build paging parameters yourself.

## The loop

1. Send your first request.
2. Fetch the results from the `posts` array.
3. Append `next` to `https://api.webz.io` and call it.
4. Repeat until `more_results_available` is `0`.

```json
{
  "posts": [ ... ],
  "next": "/api/news?q=bitcoin&ts=1751713632000&ni=6bd4f2f1a2...",
  "more_results_available": 12353
}
```

> [!NOTE]
> `next` carries your query, cursor, and the `highlight`, `webz_reporter`, and `allowNewsHistory` flags - but **not** `includeSyndicated`. Re-append it on every page if you need syndicated copies. If you authenticated with the `token` query parameter, `next` already includes it; with Bearer authentication, keep sending the header on every call.

## Following new content over time

With the default `crawled` sort, `next` carries your position forward in time. Keep calling it on a schedule (for example every few minutes) and you receive only posts crawled since your last call - a simple way to consume a continuous stream of matching content.

## How the cursor works

`next` encodes the position using `ts` plus the `ni`/`ns` cursor parameters (and `from` for relevancy-style sorts). Treat them as opaque - copy the URL as-is.

> [!WARNING]
> Each page is a new request and consumes credits - see [Errors, Rate Limits & Credits](news-blogs-forums-errors-limits).
