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

# Clay

> Clay's Public API: people and company search, results of saved enrichment routines, and queries over your Clay tables.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/clay.webp?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=712a3c1c1427f0d27e46d8fda63b0df9)

[Web Catalog · Enrichment](https://docs.webrouter.net/data-apis.md?category=enrichment)

Needs&#x20;

`CLAY_PUBLIC_API_KEY`

Endpoints

7

Auth

Key in header

[Vendor docs](https://developers.clay.com/public-api/quickstart)

&#x20;·&#x20;

[Pricing](https://www.clay.com/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `CLAY_PUBLIC_API_KEY` | required | A personal Clay Public API key (API and CLI > API keys in the Clay app); the legacy workspace API key does not work. Sent in the clay-api-key header. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* The key acts as its user, within that user's workspace access and monthly credit limit.
* Per-workspace rate limit: a 429 carries Retry-After in seconds, and X-RateLimit-\* headers when available.
* Two paging styles: cursor (send back cursor until it is absent) and stateful iterators (call again while has\_more is true).
* Waterfall enrichment runs through routines built in the Clay app; the API has no generic enrich-a-person call.
* Batch (JSONL) routine runs, filters-mode search (deprecated), workflow-run queries and Audiences privacy deletion are not in this entry.

## Endpoints

GET

Get the authenticated user

The Clay user and workspace the API key belongs to.

[Open](#clay-me-get)

GET

Get workspace credit balances

Workspace credit balances and the key owner's monthly credit limit.

[Open](#clay-credits-balance)

GET

Get the search query reference

Markdown reference of Clay's advanced search query grammar and queryable people and company fields.

[Open](#clay-search-reference)

POST

Start a people or company search

Creates a search from a Clay advanced search query; answers with search\_id and the detected source\_type (people or companies).

[Open](#clay-search-create)

POST

Get the next page of search results

The next page of people or company records for a search.

[Open](#clay-search-next)

POST

Query Clay tables

Records from one or more of the workspace's Clay tables, with filters, joins, grouping and aggregates.

[Open](#clay-tables-query)

GET

Get a routine run's progress and results

Status and paginated results of an asynchronous routine run.

[Open](#clay-routines-results)

### Get the authenticated user

GET

`/me`

`clay.me.get`

The Clay user and workspace the API key belongs to.

Input

No inputs.

[Vendor docs](https://developers.clay.com/api-reference/me/get-the-authenticated-user)

```python Python theme={null}
router.call_data_api("clay.me.get")
```

```text MCP theme={null}
call_data_api(endpoint="clay.me.get")
```

### Get workspace credit balances

GET

`/credits/balance`

`clay.credits.balance`

Workspace credit balances and the key owner's monthly credit limit.

Input

No inputs.

[Vendor docs](https://developers.clay.com/api-reference/credits/get-workspace-credit-balances)

```python Python theme={null}
router.call_data_api("clay.credits.balance")
```

```text MCP theme={null}
call_data_api(endpoint="clay.credits.balance")
```

> [!NOTE]
>
> * Free.

### Get the search query reference

GET

`/search/query-mode/reference`

`clay.search.reference`

Markdown reference of Clay's advanced search query grammar and queryable people and company fields.

Input

No inputs.

[Vendor docs](https://developers.clay.com/api-reference/search/get-the-clay-search-query-reference) · Same job: [CompanyEnrich](https://docs.webrouter.net/data-apis/companyenrich.md#companyenrich-keywords-autocomplete), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-reference-keywords), [GetProspect](https://docs.webrouter.net/data-apis/getprospect.md#getprospect-reference-suggest), [Open Food Facts](https://docs.webrouter.net/data-apis/openfoodfacts.md#openfoodfacts-suggest), [SalesIntel](https://docs.webrouter.net/data-apis/salesintel.md#salesintel-reference-tech-categories), [ZoomInfo](https://docs.webrouter.net/data-apis/zoominfo.md#zoominfo-lookup-search-fields)

```python Python theme={null}
router.call_data_api("clay.search.reference")
```

```text MCP theme={null}
call_data_api(endpoint="clay.search.reference")
```

> [!NOTE]
>
> * Read it before writing a query for clay.search.create.

### Start a people or company search

POST

`/search/query-mode`

`clay.search.create`

Creates a search from a Clay advanced search query; answers with search\_id and the detected source\_type (people or companies).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `query`

        required
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        A Clay advanced search query (grammar from clay.search.reference). Count-mode and jobs queries are not supported.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.clay.com/api-reference/search/create-a-search-from-a-clay-search-query) · Same job: [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-people-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-people-search), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-search-people), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-people-search), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-person-search), [BetterContact](https://docs.webrouter.net/data-apis/bettercontact.md#bettercontact-leads-search)

> [!NOTE]
>
> * A read over POST. Returns no rows: page them with clay.search.next. A 402 means not enough credits.

### Get the next page of search results

POST

`/search/query-mode/{search_id}/run`

`clay.search.next`

The next page of people or company records for a search.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `search_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The search\_id from clay.search.create.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Records per page, 1-500, default 20.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.clay.com/api-reference/search/run-the-query-mode-iterator-and-return-the-next-page-of-results) · Same job: [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-people-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-people-search), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-search-people), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-people-search), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-person-search), [BetterContact](https://docs.webrouter.net/data-apis/bettercontact.md#bettercontact-leads-search)

> [!NOTE]
>
> * A read over POST on a stateful iterator: each call consumes the page it returns. Call again while has\_more is true.

### Query Clay tables

POST

`/tables/query`

`clay.tables.query`

Records from one or more of the workspace's Clay tables, with filters, joins, grouping and aggregates.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>object</td><td>body</td><td>\{tables: \[\{id, alias}], select, filter, join, group\_by, order\_by, field\_mode: names|ids}; tables is required (1-5). Example `{"tables": [{"id": "t_abc123"}]}`</td></tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Records per page, 1-100, default 50.
      </td>
    </tr>

    <tr>
      <td>
        `cursor`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        cursor from the previous answer.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.clay.com/api-reference/tables/run-a-structured-query-across-one-or-more-tables) · Same job: [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-groups-search), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-objects-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-lists), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-datasets-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-list), [CMS Open Payments](https://docs.webrouter.net/data-apis/cms-open-payments.md#cms-open-payments-datasets-list)

```python Python theme={null}
router.call_data_api("clay.tables.query", {'query': {'tables': [{'id': 't_abc123'}]}})
```

```text MCP theme={null}
call_data_api(endpoint="clay.tables.query", params={"query": {"tables": [{"id": "t_abc123"}]}})
```

> [!NOTE]
>
> * A read over POST. Pages run least-recently-updated first and pick up concurrent writes, so a record can repeat: deduplicate by id. A custom order\_by disables cursor paging.

### Get a routine run's progress and results

GET

`/routines/run/{routine_run_id}/results`

`clay.routines.results`

Status and paginated results of an asynchronous routine run.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `routine_run_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The run id from clay.routines.run.
      </td>
    </tr>

    <tr>
      <td>
        `cursor`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        cursor from the previous page.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per page.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.clay.com/api-reference/routines/fetch-progress-and-results-for-a-routine-run) · Same job: [BetterContact](https://docs.webrouter.net/data-apis/bettercontact.md#bettercontact-contacts-enrich-result), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-snapshot-download), [Decodo](https://docs.webrouter.net/data-apis/decodo.md#decodo-task-results), [Dune](https://docs.webrouter.net/data-apis/dune.md#dune-execution-results), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-person-work-email-result), [FullEnrich](https://docs.webrouter.net/data-apis/fullenrich.md#fullenrich-contact-enrich-result)

> [!NOTE]
>
> * Poll at a modest interval.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.