All docs
/
Getting started
/
Clay API & CLI

Clay API & CLI

Access Clay's data and enrichments programmatically with the Clay CLI and Public API — no UI required.

Overview

Clay’s Agent Plugin lets you use Clay programmatically — from coding agents, terminals, and backend systems — without working in the UI. With the API and CLI, you can run searches over Clay's GTM dataset, call Clay enrichment functions, and build Workflows, all using Clay's existing integrations and data infrastructure.

Note: Clay’s Agent Plugin is in open beta. Some capabilities — particularly Workflows — are in an earlier Alpha stage and are actively evolving.

Getting started

Install the Clay plugin

Click to install Clay's API and CLI in:

or tell any coding agent to

Set up the Clay plugin by following the steps in <https://github.com/clay-run/agent-plugins>

Learn more: For the full CLI quickstart, Public API setup, code examples, and guides for Searches, Routines, and Workflows, see developers.clay.com.

What you can do

Agent Plugin has two primary features:

  • CLI — Build GTM workflows in natural language from coding agents (including Claude Code, Codex, and Cursor).
  • Public API — Access data from Clay or 200+ vendors in the data marketplace. Trigger functions, Claygents, or workflows.

Both paths consume the same credits and actions as equivalent in-product work. There is no additional cost to use the Agent Plugin.

The platform has three core primitives:

  • Searches — Find companies and people using structured filters over Clay's GTM dataset. Learn more about Searches in this video walkthrough.
  • Routines — Run Clay-managed functions, custom functions, and Workflows for enrichment, research, scoring, routing, and other repeatable GTM logic. Learn more about functions in this video walkthrough.
  • Tables — Read structured data from known Clay tables. Available on Enterprise plans only.

Note: The CLI and API are currently supported on Mac and Linux. Windows is not supported in open beta.

Plan availability and limits

The developer platform is available across all Clay plans, including free and trial plans. Clay’s Agent Plugin open beta is available on all modern plans and, for a limited time, on legacy plans through the end of 2026.

Search result limits vary by plan:

Plan Search results per request Total search results
Free 50 100/mo
Trial 50 10k per 14 days
Paid self-serve plans 10,000 1M/yr
Enterprise 10,000 10M/yr

FAQs

Does using the API or CLI cost extra credits?

No. API and CLI calls consume the same credits and actions as the equivalent work done in-product. There is no additional cost because work is triggered via the developer platform instead of the UI.

What's the difference between the Clay Plugin and the Public API?

The Clay Plugin gives agent environments (Claude Code, Codex, Cursor) both Clay's MCP server and the Clay CLI — the fastest path for agent-first and interactive coding workflows. The Public API is better suited for backend services, queue workers, batch jobs, and custom app integrations where you want direct HTTP access without a CLI layer.

What's the difference between MCP and the CLI/API?

MCP is used by interactive AI assistants (such as Claude Desktop and ChatGPT) using OAuth for conversational access. The CLI and Public API are designed for programmatic, headless, or automated workflows — including scripts, backend services, and coding agents.

Can I build or write to Clay tables via CLI or API?

No. The CLI builds logic via Workflows, not tables. The Tables primitive in the Public API is read-only and is for querying data that already exists in known Clay tables (Enterprise only). There are no current plans to support table building via the developer platform.

Can I build Workflows with the API or CLI?

Yes, Workflows are available from the CLI and plugin in Alpha. For production use, Clay-managed functions and custom functions are the more stable option.

Are credit budgets available via the developer platform?

Credit budgets are not yet available in open beta. You can see run-level credit and action consumption from the Runs view in Workflows. Credit budget support is on the roadmap.

Explore other docs

Signals & triggers

AgentMail integration

Use AgentMail with Clay to capture inbound emails as table rows in real time and draft or send replies directly from your workflows.

View article
Find

Magellan Data integration

Discover corporate ownership and private equity relationships.

View article
Getting started

Audiences FAQs and best practices

Common questions and best practices for using Clay Audiences.

View article
Getting started

Clay Ads compliance best practices

Keep your ad campaigns compliant with Clay's automatic targeting controls for US/international audiences and Google Ads.

View article
Settings & admin

Credit budgets

Credit budgets help workspace admins track, manage, and understand credit spend across their workspace.

View article
Find

Scoreplex integration

Validate contact information, detect fraud risk, and discover social profiles

View article
Settings & admin

MCP settings

Connect your Clay workspace to AI tools.

View article

Other popular resources

Experts

Find a Clay Expert

Explore our network of Clay experts and agencies.

View experts
Community

Join our slack community

Find help in our slack community, and support channels.

Go to slack
Cohorts

Join a cohort, learn Clay fast!

The faster way to master Clay. Sign in if you're enrolled in a cohort (current or past) or apply!

Learn more about cohorts
Talents

Hire GTME Talent

Find and connect with GTM talent who've demonstrated expertise in building advanced workflows

Explore GTME talents