Integration guide
LeadMerlin + Cursor
Cursor’s agent follows project rules stored as files in your repo. Saving the LeadMerlin skill as a rule gives the agent the endpoints and workflow it needs to fetch leads on request.
Before you start
- Cursor with agent mode enabled.
- A LeadMerlin API key from the dashboard.
Setup
- 1
Set the API key
Export LEADMERLIN_API_KEY in the shell Cursor’s terminal uses, or add it to a local .env file that is git-ignored.
export LEADMERLIN_API_KEY="lm_your_key" - 2
Add the skill as a rule
Create a rule file (for example .cursor/rules/leadmerlin.mdc) and paste the skill text from the LeadMerlin docs, plus the auth note below.
<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
Ask the agent
In agent mode, reference the rule or just describe the task.
Using the LeadMerlin rule, find med spas in Scottsdale and Phoenix, then save name, owner, best email and phone type to medspa-leads.csv
Location codes in these examples are placeholders — always look yours up with GET /v2/locations first.
Tips
- Try the demo endpoints first to confirm the agent can make HTTP requests from your environment.
- Rule file formats can change between Cursor versions — check Cursor’s docs if the rule is not picked up.
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.