Paging

Cursor paging: stable, and it never skips or repeats a person.

  1. 1
    Search with limit (1 to 100, default 25).
  2. 2
    If the response has a next_cursor, send it back as cursor with the same filters.
  3. 3
    When next_cursor is null, 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:
        break
Each page is one request. Keep the filters identical between pages; a cursor is tied to the order of the original search.