# Pagination and dates

> Page through long lists and choose a date range.

Canonical URL: https://gensiv.com/docs/pagination
Product: Gensiv — Become the brand AI recommends

---

## Pagination [#pagination]

Endpoints that can return many items use cursor pagination:

* [`GET /brands/{brandId}/responses`](/docs/api-reference/responses/listResponses)
* [`GET /brands/{brandId}/alerts`](/docs/api-reference/alerts/listAlerts)
* [`GET /brands/{brandId}/reddit/opportunities`](/docs/api-reference/reddit/listRedditOpportunities)

They return a `nextCursor` value along with `data`. Pass it as the `cursor` parameter to get the next page. On the last page, `nextCursor` is `null`.

```bash
curl "https://api.gensiv.com/v1/brands/$BRAND_ID/responses?limit=100" \
  -H "Authorization: Bearer $GENSIV_API_KEY"

curl "https://api.gensiv.com/v1/brands/$BRAND_ID/responses?limit=100&cursor=$NEXT_CURSOR" \
  -H "Authorization: Bearer $GENSIV_API_KEY"
```

Use `limit` to set the page size (up to 100). Keep the other parameters the same on every page.

Lists that are always short, such as brands, competitors and prompts, return every item in one response and have no `nextCursor`.

## Date ranges [#date-ranges]

Endpoints that report on AI responses accept a date range:

| Parameter | Format       | Default             |
| --------- | ------------ | ------------------- |
| `from`    | `YYYY-MM-DD` | 29 days before `to` |
| `to`      | `YYYY-MM-DD` | Today               |

* Both days are included, and days run from midnight to midnight UTC.
* A range can cover at most 366 days.
* Responses that include a range echo the resolved `from` and `to`, so you can see which days were used.

## Filtering by engine [#filtering-by-engine]

Add `engine` to only include responses from one AI engine. Use a `slug` from [`GET /engines`](/docs/api-reference/engines/listEngines), such as `chatgpt` or `perplexity`.

```bash
curl "https://api.gensiv.com/v1/brands/$BRAND_ID/metrics?engine=perplexity" \
  -H "Authorization: Bearer $GENSIV_API_KEY"
```