Using the API
Pagination and dates
Page through long lists and choose a date range.
Pagination
Endpoints that can return many items use cursor pagination:
GET /brands/{brandId}/responsesGET /brands/{brandId}/alertsGET /brands/{brandId}/reddit/opportunities
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.
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
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
fromandto, so you can see which days were used.
Filtering by engine
Add engine to only include responses from one AI engine. Use a slug from GET /engines, such as chatgpt or perplexity.
curl "https://api.gensiv.com/v1/brands/$BRAND_ID/metrics?engine=perplexity" \
-H "Authorization: Bearer $GENSIV_API_KEY"