Integration guide
LeadMerlin + HubSpot
Connect HubSpot once with a private app token. Every enriched lead with an email becomes a HubSpot contact: owner first and last name, email, phone, company, website and address. Contacts are upserted by email, so pushing a search again updates them instead of creating duplicates.
Before you start
- A HubSpot account where you can create private apps (super admin).
- A LeadMerlin account (100 free leads, no card).
Setup
- 1
Create a private app in HubSpot
Give it the scopes crm.objects.contacts.read and crm.objects.contacts.write, then copy the access token.
- 2
Connect it in LeadMerlin
Paste the token on the Integrations page of the dashboard, or call the API. The token is tested with one HubSpot call before it is saved, and stored encrypted.
PUT https://api.leadmerlin.com/api/v2/integrations/hubspot Header: x-api-key: lm_your_key {"token":"pat-na1-…","auto_push":true} - 3
Push a search
Click the HubSpot button above the search results, or call push for any finished job. With auto_push on, every completed search is sent on its own.
POST https://api.leadmerlin.com/api/v2/jobs/{job_id}/push {"provider":"hubspot"} - 4
Check the result
GET /v2/integrations shows the last push: how many contacts were sent, skipped and failed, and the last error HubSpot returned.
Location codes in these examples are placeholders — always look yours up with GET /v2/locations first.
Tips
- HubSpot matches contacts by email, so leads without an email are skipped. Filter for verified emails in your search to keep the CRM clean.
- Lead status and lifecycle stage are never overwritten, so pushing a lead your team already works does not reset it.
- Pushed leads count as exported: turn on "Skip exported" in later searches to avoid paying for them twice.
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.