Connect Clay to Your AI Agent

Turn a defined search or existing routine into a usable research table.

12 tools API key

Try a Clay Task

Copy a prompt into your agent with the oo Skill installed. Add your page links and source notes before running it.

oo Skill Clay

Create a supported company search and collect its result pages.

Run an existing enrichment routine

Process supplied records and separate successful and failed item results.

/oo Clay: Run Clay routine [routine ID] on these items [items with stable IDs and required fields]. Keep the routine run ID, check progress and read result pages using their cursor. Return successful output fields in a table keyed by item ID and list item errors separately, even if the overall run is complete.

Start Working with Clay

  1. Install OOMOL

    Set up oo CLI and the oo Skill in your agent.

    Install OOMOL →
  2. Connect Clay

    Connect with a Clay API key for your workspace.

    Connect Clay →
  3. Give Your Agent a Task

    Use /oo with the pages to read, the changes to make, and where to save the result.

    Connection Guide →

Choose Your Agent

  • Provide search criteria or an existing routine ID with the required inputs.
  • Searches and routines may use workspace quotas or credits. A completed routine can still contain failed items.
  • Existing routines may update downstream systems. Confirm the routine’s purpose before running it.

Clay Tools

Search people and company data through Clay’s query tools, run existing routines on supplied items or a batch file, and retrieve results. Table and workflow-run queries also support inspection of existing workspace data.

People and company search

Create a query-based search and retrieve successive results.

Existing routines

Run routines on items or JSONL batch files and inspect results.

Workspace queries

Read table data (Enterprise capability) and workflow-run records with supplied queries.

12 tools

Run Routine Batch

Download a JSONL file, upload it to Clay, and start an asynchronous batch routine. Each line must contain id and inputs. The routine may perform arbitrary downstream mutations. Connector transfer limit: 2 GiB, five minutes each for download and upload; JSONL validation is performed by Clay.

clay.run_routine_batch

Get Routine Batch Results

Get batch progress, a result download URL, or validation/processing failure details. Download result_url separately after completion and inspect individual item outcomes; results are not loaded into the action response.

clay.get_routine_batch_results

Get Me

Get the Clay user and workspace associated with the API key.

clay.get_me

Get Credit Balance

Get workspace credit balances without consuming credits.

clay.get_credit_balance

Get Search Query Reference

Get the current Clay search query grammar and fields before creating a search.

clay.get_search_query_reference

Create Search

Create a stateful company or people search from a Clay query. Count-mode and jobs queries are unsupported.

clay.create_search

Get Search Results

Fetch the next page and advance a Clay search iterator. Do not retry blindly: each call advances the iterator.

clay.get_search_results

Run Routine

Run a configured Clay routine on 1–100 items asynchronously. The routine may perform arbitrary downstream mutations; inspect its definition before running.

clay.run_routine

Get Routine Results

Get routine progress or one page of completed results. Follow cursor until absent and check each item's status.

clay.get_routine_results

Query Tables

Query known Clay tables on Enterprise plans. Concurrent updates can repeat rows; deduplicate by ID. Custom ordering and aggregation do not support cursor pagination.

clay.query_tables

Get Workflow Run Query Reference

Get the workflow-run query grammar and supported fields (beta).

clay.get_workflow_run_query_reference

Query Workflow Runs

Search or count workflow runs (beta). Results are eventually consistent; recently changed runs may be stale or absent.

clay.query_workflow_runs

Frequently Asked Questions

How do I process a larger input file?

Provide an accessible JSONL file URL and existing routine ID. Batch execution returns a run ID; check that run for progress, errors and a result file URL when complete.

What if a routine finishes with failed items?

Keep successful results and list failed item IDs with their errors. Overall completion means processing ended, not that every item succeeded.

Can I invent a search query from plain criteria?

The assistant can read the current query reference first and translate your criteria into that syntax. Supply clear criteria and a result limit.

Connect Clay

About Clay ↗