API Reference

Authentication

Send your API key in the x-api-key header on every request.

Endpoints

POST /api/v1/enrich

Enrich an email or domain with company data.

curl -X POST https://leadpure-ahntk64r7-elliotwinard-1696s-projects.vercel.app/api/v1/enrich \
  -H 'x-api-key: lp_live_xxx' \
  -H 'Content-Type: application/json' \
  -d '{"email":"john@acme.com"}'
ParameterTypeRequiredDescription
emailstringno*Email address to enrich
domainstringno*Domain to enrich

* Either email or domain is required.

Response — 200 (enriched)

{
  "email": "john@acme.com",
  "domain": "acme.com",
  "name": "John Smith",
  "company": "Acme Inc",
  "industry": "Software",
  "location": "San Francisco, CA",
  "social": {
    "github": "github.com/jsmith",
    "linkedin": "linkedin.com/in/jsmith"
  },
  "confidence": 0.8,
  "cached": false,
  "cached_at": null
}

Response — 401 (unauthorized)

{"error":"invalid_api_key","message":"API key is missing or invalid"}

Response — 400 (validation error)

{"error":"validation_error","message":"Either email or domain is required"}

GET /api/v1/jobs/:id

Poll for an enrichment result that returned 202.

curl https://leadpure-ahntk64r7-elliotwinard-1696s-projects.vercel.app/api/v1/jobs/job_1234567890_1 \
  -H 'x-api-key: lp_live_xxx'

POST /api/v1/keys

Generate a new API key.

curl -X POST https://leadpure-ahntk64r7-elliotwinard-1696s-projects.vercel.app/api/v1/keys \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com"}'

Rate Limits

Free tier: 100 requests per minute. 429 on exceed.

Errors

CodeHTTP StatusDescription
invalid_api_key401Missing or invalid x-api-key header
validation_error400Invalid request body
rate_limited429Too many requests
enrichment_failed500Scraping error