Integration guide
LeadMerlin + Claude Code
Claude Code can load skills from markdown files in your project. Add the LeadMerlin skill once and Claude can search Google Maps, enrich every business and write a CSV whenever you ask for leads.
Before you start
- Claude Code installed and working in a project folder.
- A LeadMerlin API key (starts with lm_) from the dashboard — the first 100 leads are free.
Setup
- 1
Store your API key in the environment
Add the key to your shell profile so it never ends up in your repo.
echo 'export LEADMERLIN_API_KEY="lm_your_key"' >> ~/.zshrc source ~/.zshrc - 2
Create the skill file
Create .claude/skills/leadmerlin/SKILL.md. Start it with this frontmatter so Claude knows when to use it, then paste the skill text from the docs page (Docs → Agent Skill → Copy skill) below it.
--- name: leadmerlin description: Search local businesses by niche and city with the LeadMerlin API, enrich them (owner names, verified emails, phone line types, tech stack) and export CSV. Use for lead generation and prospect lists. --- <paste the LeadMerlin skill from leadmerlin.com/docs here> ## Auth Read the API key from the LEADMERLIN_API_KEY environment variable and send it as the x-api-key header. Never write the key into files or code. - 3
Test on demo data first
Ask Claude to run the workflow against the demo endpoints. They need no key and cost nothing.
> Use the leadmerlin skill against the demo endpoints and show me the first 3 results. - 4
Run a real search
Ask for what you want in plain English. Claude resolves the city, starts the job, polls it and pages through results.
> Find roofing contractors in Tampa, keep only leads with a verified email, > and export them to roofers-tampa-leads.csv
Location codes in these examples are placeholders — always look yours up with GET /v2/locations first.
Tips
- If your niche is a single generic word, ask Claude to call /v2/suggest first to pick a sharper keyword.
- Ask Claude to report off_niche_count and category_facets so you can see what was filtered.
- Claude Code will ask permission before running network commands unless you allow them.
API at a glance
| Call | What it does |
|---|---|
| GET /v2/locations?q= | City name → location_code (free) |
| GET /v2/suggest?niche= | Vague niche → Google categories + sharper keywords (free) |
| POST /v2/searches | Start a search job: keyword, 1–5 location_codes, optional strictness |
| POST /v2/enrichments | Enrich up to 100 domains you already have |
| GET /v2/jobs/:id | Poll until status is completed |
| GET /v2/jobs/:id/results | Paginated enriched businesses (cursor, limit ≤ 200) |
| /v2/demo/* | Same shapes on fixture data — no key, no credits |
All calls use the x-api-key header except the demo endpoints. Base URL: https://api.leadmerlin.com/api
Related
Other integrations
Get your API key.
Sign up free to get an lm_ key and 100 enriched leads. No credit card.