Paging
Cursor paging: stable, and it never skips or repeats a person.
- 1Search with
limit(1 to 100, default 25). - 2If the response has a
next_cursor, send it back ascursorwith the same filters. - 3When
next_cursorisnull, that was the last page.
python
cursor = None
while True:
body = {"title": ["head of sales"], "countries": ["US"], "states": ["TX"], "limit": 100}
if cursor:
body["cursor"] = cursor
page = requests.post("https://people-api.arihaan.ai/v1/people/search", json=body, headers=headers).json()
handle(page["people"])
cursor = page["next_cursor"]
if not cursor:
breakEach page is one request. Keep the filters identical between pages; a cursor is tied to the order of the original search.