Setup
Put them in your environment or
.env; Data APIs 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 the authenticated user
Get workspace credit balances
- Free.
Get the search query reference
- Read it before writing a query for clay.search.create.
Start a people or company search
- 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
- 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
- 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
- Poll at a modest interval.