Clay logo

LeadMagic has made more than one billion API calls with Clay and won The Unstoppable Wheel award.

Recap
LeadMagicDocs

Sandbox and testing

Build and test against synthetic LeadMagic data with no API key and no credits.

The Sandbox has the same paths and error format as the API and returns synthetic data. It needs no key and costs nothing.

.env.local

Or per client:

meta.sandbox is true on every Sandbox response.

Force an outcome

Test your error handling with sandboxOutcome:

sandboxOutcomeResult
foundA result (default)
emptyNo result
400invalid_input
401auth
402billing
404invalid_input
429rate_limit
500unavailable

The Sandbox allows 120 requests per minute per IP address.

Unit tests

Pass your own fetch to test without the network:

API key for REST · OAuth for LeadMagic CLI and MCP

Get your LeadMagic API key and test endpoints live.

Use your API key in the interactive REST playground. For the LeadMagic CLI, install the lm command and run lm login; hosted MCP clients also sign in with OAuth.