> ## Documentation Index
> Fetch the complete documentation index at: https://developers.clay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# search next

> Fetch the next page of results for a search.

Return the next page of records for an existing search, advancing the iterator. Create the search first with [`clay search create`](/cli/reference/search-create).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay search next <searchId> [--limit <n>]
```

A search is a forward-only iterator: each call returns the next records and advances it. Repeat `clay search next <searchId>` while `hasMore` is `true`. There is no cursor — the iterator position is server-side and cannot be replayed.

## Arguments

| Argument   | Description                                                                                                 |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| `searchId` | Search id returned by [`clay search create`](/cli/reference/search-create), e.g. `search_abc123`. Required. |

## Flags

| Flag          | Description                                       |
| ------------- | ------------------------------------------------- |
| `--limit <n>` | Max records to return. `1`-`500`. Defaults to 20. |

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": [{ "<field>": "..." }],
  "hasMore": true
}
```

| Field     | Type      | Description                                                               |
| --------- | --------- | ------------------------------------------------------------------------- |
| `data`    | object\[] | The next page of records. Each record's fields depend on the source type. |
| `hasMore` | boolean   | Whether more records remain. Call again while `true`.                     |

## Errors

| Code               | Exit | Notes                                                                                                      |
| ------------------ | ---- | ---------------------------------------------------------------------------------------------------------- |
| `validation_error` | 2    | `--limit` is not an integer in `1`-`500`, or exceeds your plan's per-request, per-search, or period limit. |
| `not_found`        | 6    | No search with that id, or it has expired.                                                                 |
| `auth_forbidden`   | 3    | The API key lacks access, or the public-API beta is not enabled for the workspace.                         |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay search next search_abc123
clay search next search_abc123 --limit 50 | jq '.data | length'
clay search create --source-type people --filters '{"job_title_keywords":["growth engineer"]}' | jq -r '.searchId' | xargs clay search next
```
