> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blitz-api.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

<div style={{position:'absolute',width:'1px',height:'1px',padding:0,margin:'-1px',overflow:'hidden',clipPath:'inset(50%)',whiteSpace:'nowrap',border:0}}>
  > **Agents & LLMs**: a Markdown version of this page is available by appending `.md` to the URL, and the full documentation index is at [llms.txt](https://docs.blitz-api.ai/llms.txt).
</div>

The search methods return an **auto-paginating page**. Iterate it and the SDK fetches each subsequent page for you — no cursor or page bookkeeping. This works identically in Python and TypeScript; only the syntax differs.

## Which methods paginate

| Method                                                        | Pagination                   |
| :------------------------------------------------------------ | :--------------------------- |
| `client.search.people()`                                      | Cursor-based                 |
| `client.search.companies()`                                   | Cursor-based                 |
| `client.search.employee_finder()`                             | Page-based                   |
| `client.jobs.search()`                                        | Cursor-based                 |
| `client.jobs.company()`                                       | Cursor-based                 |
| `client.search.waterfall_icp()`                               | None — one ranked result set |
| `client.enrichment.*` / `client.utils.*` / `client.account.*` | None — a single response     |

Cursor vs page is an implementation detail — the SDK exposes the same interface for both. Cursors are stable even if new records are added between calls, so you won't see duplicates.

## Stream every result

Iterate the returned page to walk every match across all pages. Each page is fetched on demand, through the client's [rate limiter](/sdks/rate-limits).

<CodeGroup>
  ```python Python theme={null} theme={null}
  # The SDK fetches each subsequent page for you.
  for person in client.search.people(people={"job_level": ["VP"]}):
      print(person.full_name)
  ```

  ```ts TypeScript theme={null} theme={null}
  // The SDK fetches each subsequent page for you.
  for await (const person of client.search.people({ people: { job_level: ["VP"] } })) {
    console.log(person.full_name);
  }
  ```
</CodeGroup>

<Warning>
  `max_results` is the **page size** (1–50), not a total — and on the Trial plan the API bills **1 credit per result returned** (Unlimited plans are flat-rate). A bare loop streams *every* match up to the server-side cap (people / companies: 50,000 results or 1,000 pages; employee finder: 10,000; jobs: 5,000). Bound it with `max_items`, `break` out of the loop, or drive pages manually (below).
</Warning>

## Bound how much you pull

`max_items` is a **client-side** total cap — it stops the SDK fetching once reached and is never sent on the wire. Use it (with `max_results` tuned for page size) to keep spend predictable.

<CodeGroup>
  ```python Python theme={null} theme={null}
  # Stop after 200 results, across however many pages that takes.
  for person in client.search.people(people={"job_level": ["VP"]}).auto_paging_iter(max_items=200):
      print(person.full_name)
  ```

  ```ts TypeScript theme={null} theme={null}
  // max_items goes in the options object.
  for await (const person of client.search.people({ people: { job_level: ["VP"] }, max_items: 200 })) {
    console.log(person.full_name);
  }

  // Or collect into an array (also honors max_items):
  const people = await client.search.people({ people: { job_level: ["VP"] }, max_items: 200 }).collect();
  ```
</CodeGroup>

## Per-page and manual control

Take the first page, inspect totals and cursors, and fetch the next page yourself when you need explicit control (your loop, your spend).

<CodeGroup>
  ```python Python theme={null} theme={null}
  # First page + manual paging.
  page = client.search.people(people={"job_level": ["VP"]}, max_results=50)
  print(page.results, page.cursor)        # items on this page; cursor is None once exhausted
  nxt = page.get_next_page()              # None once exhausted

  # Or walk pages and inspect totals as you go.
  for p in client.search.companies(company={"industry": {"include": ["Software Development"]}}).iter_pages(max_pages=5):
      print(p.total_results, len(p.results), p.cursor)
  ```

  ```ts TypeScript theme={null} theme={null}
  // First page + manual paging.
  const page = await client.search.companies({ company: { industry: { include: ["Software Development"] } }, max_results: 25 });
  page.data;                    // Company[] — items on this page
  page.response.total_results;  // the full parsed response (snake_case, 1:1 with the API)
  if (page.has_next_page()) {
    const next = await page.get_next_page();
  }

  // Or walk pages directly:
  const first = await client.search.employee_finder({ company_linkedin_url: "https://www.linkedin.com/company/openai", max_results: 50 });
  for await (const p of first.iter_pages()) {
    console.log(`page ${p.response.page}/${p.response.total_pages} — ${p.data.length} items`);
  }
  ```
</CodeGroup>

## Page object shape

* **Python** — items are on `page.results`; cursor on `page.cursor`. The page types (`CursorPage`, `PageNumberPage`, and their `Async*` variants) are exported from `blitz_api`.
* **TypeScript** — items are on `page.data`; the full parsed response (snake\_case, 1:1 with the API — e.g. `total_results`, `page`, `total_pages`) is on `page.response`.

## Next steps

<CardGroup cols={2}>
  <Card title="Rate limits & retries" icon="gauge-high" href="/sdks/rate-limits">
    How the client-side limiter and automatic `429`/`5xx` retries work.
  </Card>

  <Card title="Python SDK" icon="python" href="/sdks/python">
    Full method reference for `blitz-api-py`.
  </Card>

  <Card title="TypeScript / JavaScript SDK" icon="node-js" href="/sdks/typescript">
    Full method reference for `blitz-api-js`.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/people-search/find-people">
    Request/response schemas and a try-it console.
  </Card>
</CardGroup>
