LeadWebia API
Run Google Maps lead searches, read every lead with its phones, emails and website checks, and get a webhook when new leads arrive. JSON over HTTPS with an API key.
- Base URL
https://api.leadwebia.com/api/v1- Auth
Authorization: Bearer lw_live_…- Format
- JSON · snake_case · ISO 8601 UTC
Overview
The API does with a key what you do in the app: find local businesses on Google Maps, keep the ones you want and send them to your tools. It uses the same account, credits and plans as the app, so a search started from the API shows up in the app too.
What you can build
- Run Google Maps searches from your own app or script: niches, cities, "no website" or "with email" only.
- Pull every new lead into your CRM, database or sheet as it arrives, without missing or repeating one.
- Get a webhook the moment a lead has its emails, or when a search or prospect report is done.
- Check any website (CMS, SSL, speed, ads pixels) and find the emails it publishes.
- Create white-label prospect reports and AI outreach messages for the leads you want to pitch.
- Tag leads with your pipeline statuses, export them to CSV or push them to Google Sheets, Instantly or your webhook.
Versioning and access
- The version is in the path (
/api/v1). Within v1 we only add fields and endpoints, never rename or remove them. - Every account can create keys. Searches and reports use your credits; exports, integrations and webhooks need the credit pack or a paid plan, as in the app.
Quickstart
From zero to leads in your own code in five steps. The samples read the key from the LEADWEBIA_API_KEY environment variable; pick a language once and every sample follows.
Create an API key
Sign in, open the API page and click Create key. The full key (
lw_live_…) is shown only once: keep it in your secrets store. Up to 5 active keys; revoke any of them at any time.Check the key
GET /meanswers with your plan and credits. It's free, so it's the call to test a key with.curl https://api.leadwebia.com/api/v1/me \ -H "Authorization: Bearer $LEADWEBIA_API_KEY"import os import requests API = "https://api.leadwebia.com/api/v1" HEADERS = {"Authorization": f"Bearer {os.environ['LEADWEBIA_API_KEY']}"} res = requests.get(f"{API}/me", headers=HEADERS, timeout=30) res.raise_for_status() print(res.json()["credits"])const API = 'https://api.leadwebia.com/api/v1'; const headers = { Authorization: `Bearer ${process.env.LEADWEBIA_API_KEY}` }; const res = await fetch(`${API}/me`, { headers }); if (!res.ok) throw new Error((await res.json()).error.message); const me = await res.json(); console.log(me.credits);{ "email": "you@youragency.com", "plan": "pro", "credits": 4870, "report_cost": 20, "lead_statuses": [ { "id": "6f1c…", "title": "New" }, { "id": "a9d2…", "title": "Contacted" } ], "integrations": ["google_sheets"], "app_url": "https://leadwebia.com/home" }Find the area to search
Searches run on areas.
GET /locationsturns a city into itsarea_id(free). If several places share the name, passstate.curl "https://api.leadwebia.com/api/v1/locations?city=Austin&country=US&state=Texas" \ -H "Authorization: Bearer $LEADWEBIA_API_KEY"res = requests.get( f"{API}/locations", params={"city": "Austin", "country": "US", "state": "Texas"}, headers=HEADERS, timeout=30, ) res.raise_for_status() area_id = res.json()["data"][0]["area_id"]const params = new URLSearchParams({ city: 'Austin', country: 'US', state: 'Texas' }); const res = await fetch(`${API}/locations?${params}`, { headers }); const { data: areas } = await res.json(); const areaId = areas[0].area_id;{ "data": [ { "area_id": "US:TX:4671654", "name": "Austin", "state": "Texas", "country": "US", "population": 961855, "points": 64 } ] }Start a search
POST /searchesreservesmax_leadscredits and charges 1 per business delivered; what isn't used comes back. Always send anIdempotency-Key: if a request times out and you retry with the same key, you get the same search instead of paying twice.curl https://api.leadwebia.com/api/v1/searches \ -H "Authorization: Bearer $LEADWEBIA_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: austin-plumbers-2026-12-01" \ -d '{ "niches": ["plumber", "roofing contractor"], "area_ids": ["US:TX:4671654"], "max_leads": 200, "only_without_website": true }'import uuid res = requests.post( f"{API}/searches", headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())}, json={ "niches": ["plumber", "roofing contractor"], "area_ids": [area_id], "max_leads": 200, "only_without_website": True, }, timeout=30, ) res.raise_for_status() search = res.json() print(search["search_id"], search["status"], search["credits_reserved"])const res = await fetch(`${API}/searches`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json', 'Idempotency-Key': crypto.randomUUID(), }, body: JSON.stringify({ niches: ['plumber', 'roofing contractor'], area_ids: [areaId], max_leads: 200, only_without_website: true, }), }); const search = await res.json(); console.log(search.search_id, search.status, search.credits_reserved);{ "search_id": "3b0e6c1e-…", "status": "queued", "niches": ["plumber", "roofing contractor"], "location": "Austin, Texas, US", "requested": 200, "delivered": 0, "credits_reserved": 200, "credits_charged": 0, "progress_pct": 0, "created_at": "2026-12-01T15:04:05Z", "app_url": "https://leadwebia.com/tasks/3b0e6c1e-…" }Get the leads
Poll
GET /leads?since=: leads come oldest first with anext_cursor; store it and pass it next time to get only what's new, with no gaps and no repeats.Or subscribe a webhook to
lead.createdand we POST each lead to your server when its emails are found (Webhooks).# First call: start from the beginning (since=0) or from now (since=now) curl "https://api.leadwebia.com/api/v1/leads?since=0&search_id=3b0e6c1e-…" \ -H "Authorization: Bearer $LEADWEBIA_API_KEY" # Next calls: pass the next_cursor of the previous answer curl "https://api.leadwebia.com/api/v1/leads?since=eyJ0IjoiMjAyNi0xMi0wMVQxNTow…" \ -H "Authorization: Bearer $LEADWEBIA_API_KEY"import time cursor = "0" # store it between runs (file, DB…) while True: res = requests.get( f"{API}/leads", params={"since": cursor, "search_id": search["search_id"]}, headers=HEADERS, timeout=30, ) res.raise_for_status() page = res.json() for lead in page["data"]: print(lead["name"], lead["phone"], lead["emails"]) cursor = page["next_cursor"] if not page["has_more"]: time.sleep(60) # caught up: ask again in a minutelet cursor = '0'; // store it between runs (file, DB…) for (;;) { const params = new URLSearchParams({ since: cursor, search_id: search.search_id }); const res = await fetch(`${API}/leads?${params}`, { headers }); const page = await res.json(); for (const lead of page.data) console.log(lead.name, lead.phone, lead.emails); cursor = page.next_cursor; if (!page.has_more) await new Promise(r => setTimeout(r, 60_000)); }curl https://api.leadwebia.com/api/v1/webhooks \ -H "Authorization: Bearer $LEADWEBIA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/hooks/leadwebia", "events": ["lead.created", "search.completed"], "description": "CRM sync" }'res = requests.post( f"{API}/webhooks", headers=HEADERS, json={ "url": "https://example.com/hooks/leadwebia", "events": ["lead.created", "search.completed"], "description": "CRM sync", }, timeout=30, ) res.raise_for_status() hook = res.json() # Shown only once: keep it with your other secrets signing_secret = hook["signing_secret"]const res = await fetch(`${API}/webhooks`, { method: 'POST', headers: { ...headers, 'Content-Type': 'application/json' }, body: JSON.stringify({ url: 'https://example.com/hooks/leadwebia', events: ['lead.created', 'search.completed'], description: 'CRM sync', }), }); const hook = await res.json(); // Shown only once: keep it with your other secrets const signingSecret = hook.signing_secret;{ "place_id": "ChIJ…", "name": "Lone Star Plumbing Co.", "category": "Plumber", "city": "Austin", "state": "Texas", "rating": 4.7, "user_ratings_total": 132, "website": null, "has_website": false, "phone": "+1 512-555-0142", "emails": ["office@lonestarplumbingco.com"], "status": "New", "cms": null, "cms_outdated": null, "niche": "plumber", "google_maps_url": "https://maps.google.com/?cid=…", "search_id": "3b0e6c1e-…", "saved_at": "2026-12-01T15:09:41Z" }
Authentication
Send your key on every request, in either header:
Authorization: Bearer lw_live_Ab3x…
# or
X-API-Key: lw_live_Ab3x…- Keys are created and revoked only in the app (the API page), never through the API, so a leaked key can't mint new ones.
- A revoked key stops working on the very next request, and the webhooks created with it are disabled.
- A missing, malformed, unknown or revoked key gets
401 invalid_api_key. - A key acts as your account and sees only your data. Keep it on your server, never in a browser or mobile app.
Credits
Credits are the same balance as in the app: 1 credit = 1 business found. Only three calls spend them; everything else is free. Each endpoint below says what it costs.
| Call | Credits |
|---|---|
POST /searches, POST /searches/{search_id}/more | Reserves max_leads, charges 1 per business delivered (with only_with_email: 1 per business with an email). Unused credits come back. |
POST /reports | 20 when a new report runs. An existing report is returned free; a failed one is refunded. |
| Everything else | Free. Exports, integrations, white-label sharing and webhooks need the credit pack or a paid plan. |
Errors
Every answer that isn't 2xx has the same body: a stable code to branch on, a human message, the HTTP status and a request_id (also in the X-Request-Id header of every response).
HTTP/1.1 402 Payment Required
X-Request-Id: req_8f3a…
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits: 12 left, 50 needed.",
"status": 402,
"request_id": "req_8f3a…",
"docs_url": "https://leadwebia.com/docs/api#errors"
}
}| Status | Codes | When |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, unknown or revoked key (same answer for all). |
| 402 | insufficient_credits | Not enough credits for the search or report. |
| 403 | paid_plan_requiredprofessional_plan_required | The feature needs the credit pack or a paid plan (exports, integrations, webhooks, white-label sharing). |
| 404 | not_foundsearch_not_foundlead_not_foundreport_not_found | It does not exist or belongs to another account. |
| 409 | search_exhaustedlegacy_searchidempotency_conflictintegration_not_connectedrefresh_too_soonreport_not_ready | The request is valid but can't be done now: the area is used up, the search is too old to continue, the Idempotency-Key was used with another body, the integration isn't connected, the report was refreshed recently or isn't ready yet. |
| 422 | validation_error | A parameter is missing or wrong. details lists each field. |
| 429 | rate_limitedqueue_fullmessage_limitlookup_limitemail_lookup_limit | Too many requests, or a daily/hourly cap. Wait for Retry-After seconds. |
| 500 | internal_error | Our fault. Retry later; send us the request_id if it keeps failing. |
| 502 | upstream_errorwebsite_unreadable | A provider or the website you asked about didn't answer. |
Retry 429, 500 and 502 with backoff (honour Retry-After). Don't retry other 4xx answers unchanged.
Pagination and cursors
Offset lists
GET /leads and GET /searches take limit (1–100, default 25) and offset. Use them for screens and one-off reads.
GET /leads?website=without_website&limit=25&offset=50
{
"data": [ … ],
"total": 412,
"offset": 50,
"next_offset": 75,
"has_more": true
}Cursor feeds
GET /leads?since= and GET /searches?updated_since= are feeds for syncing: items come oldest first and each answer carries an opaque next_cursor. Store it and send it back next time; you never miss or repeat an item, even when many share the same timestamp.
since=0(or empty) starts from your first lead;since=nowfrom the current end.has_more: true: call again right away.false: you are caught up; wait a minute or two.- The lead feed combines only with
search_idandq: emails, website checks and CRM status arrive after a lead is saved, so filter on your side or use thelead.createdwebhook (sent once the contacts are in). - Feeds list items older than one minute, so a write still in progress is never skipped.
GET /leads?since=eyJ0IjoiMjAyNi0xMi0wMVQxNTow…
{
"data": [ … ],
"next_cursor": "eyJ0IjoiMjAyNi0xMi0wMVQxNToxM…",
"has_more": false
}Single objects (GET /me, a lead, a search…) are returned bare, without a data wrapper.
Idempotency
POST /searches and POST /searches/{search_id}/more accept an Idempotency-Key header (1–255 characters, for example a UUID).
- Same key, same body: the same search comes back and credits are reserved once. Safe to retry after a timeout.
- Same key, different body:
409 idempotency_conflict. - No header: every POST starts a new search.
POST /reportsneeds no key: an existing or running report is returned without a new charge.
Rate limits
| Per key | 60 requests a minute |
|---|---|
| Per account (all keys) | 120 requests a minute |
| Credit-spending calls | 10 a minute per account (start a search, load more, create a report) |
| Existing caps | 300 AI outreach messages a day, 20 email lookups an hour, 10 business lookups a day, and the searches that can run at once on your plan |
Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Over a limit you get 429 rate_limited (or the cap's own code) with Retry-After in seconds.
Endpoints
Paths are relative to https://api.leadwebia.com/api/v1. Parameters and every response field are in the interactive reference.
Account
/meGet account
Plan, credits left, pipeline statuses and connected integrations. Use it to test a key.
Credits Free
/lead-statusesList lead statuses
Your pipeline statuses, in order.
Credits Free
Locations
/locationsFind locations
Find the search areas (area_id) of a city: city, country (ISO code, e.g. US), optional state.
Credits Free
Searches
/searchesStart a search
Start a search: 1–5 niches, 1–20 areas, max_leads 1–1,000, only_without_website, only_with_email, include_pagespeed, language (en or es).
Credits Reserves max_leads, charges 1 per business delivered (with only_with_email: 1 per business with an email). Unused credits come back.
/searchesList searches
Your searches with their latest run. Filters: status, updated_since cursor.
Credits Free
/searches/{search_id}Get a search
Status and progress of a search.
Credits Free
/searches/{search_id}/runsList runs
Every run of a search (the first one and each "more").
Credits Free
/searches/{search_id}/moreLoad more
Load more businesses for the same search and area.
Credits Same as starting a search. 409 search_exhausted when the area is used up.
/searches/{search_id}/remainingRemaining estimate
Estimate of how many businesses are left in the area.
Credits Free
Leads
/leadsList leads
Your leads with filters (search_id, website, status, q, cms, cms_outdated, uses_ads, has_email), sort and offset pagination.
Credits Free
/leads?since={cursor}Lead feed
Feed of new leads, oldest first (saved over a minute ago). Store next_cursor and pass it next time. Only with search_id / q.
Credits Free
/leads/{place_id}Get a lead
Everything about one lead: contacts, socials, website checks, PageSpeed and Core Web Vitals.
Credits Free
/leads/{place_id}Update status
Set the pipeline status of a lead.
Credits Free
/leads/statusBulk status
Set the status of up to 500 leads, or of every lead of a search.
Credits Free
/leads/{place_id}Delete leads
Delete a lead (POST /leads/delete for up to 500).
Credits Free (credits are not returned)
/leads/{place_id}/outreach-messageOutreach message
AI-written first message for that business.
Credits Free · 300 a day (shared with the MCP)
Exports and integrations
/exportsExport CSV
CSV of up to 5,000 leads (by place_ids or search_id). Returns a download URL.
Credits Free · credit pack or paid plan
/integrationsList integrations
Integrations you connected in the app.
Credits Free
/integrations/{kind}/targetsList targets
Instantly campaigns or Google Sheets you can send to.
Credits Free · credit pack or paid plan
/integrations/{kind}/sendSend leads
Send leads to Instantly, Google Sheets or your webhook integration.
Credits Free · credit pack or paid plan
/integrations/sends/{task_id}Send status
Progress of a send.
Credits Free
Prospect reports
/reports/lookupFind a business
Find a business by name and city to report on.
Credits Free · 10 a day
/reportsCreate a report
Create a prospect report for a place_id.
Credits 20 when a new report runs; an existing one is returned free; refunded if it fails
/reports/{place_id}Get a report
Grade and summary (?full=true for the whole report).
Credits Free
Website tools
/tools/website-checkCheck a website
CMS, technology, SSL, ads pixels and grade of any URL (include_pagespeed for speed).
Credits Free
/tools/emailsFind emails
Emails published on a website.
Credits Free · 20 websites an hour
Webhooks
/webhooksCreate a webhook
Subscribe a URL to events. Returns signing_secret once.
Credits Free · credit pack or paid plan
/webhooksList webhooks
Your subscriptions (GET /webhooks/{id} for one).
Credits Free
/webhooks/{id}Update a webhook
Change url, events, description or enabled.
Credits Free
/webhooks/{id}Delete a webhook
Unsubscribe.
Credits Free
/webhooks/{id}/testSend a test ping
Send a signed ping now and see what your server answered.
Credits Free
/webhooks/{id}/deliveriesList deliveries
Last 100 deliveries: event, status, attempts, time, error.
Credits Free
Webhooks
Subscribe a URL with POST /webhooks and we POST events to it across all your searches. The answer includes a signing_secret shown only once. Up to 10 webhooks per account, HTTPS only; they need the credit pack or a paid plan.
Separate from the app's webhook integration (one URL that receives the leads of the searches where you turn on auto-send), which keeps working as it is.
Events
| Event | When | data |
|---|---|---|
lead.created | Once per lead, when its email search is done (so emails and socials are in). | The lead, same shape as GET /leads/{place_id} |
search.completed | A search run finished, including "area used up". | The search, same shape as GET /searches/{search_id} |
search.failed | A search run failed. Unused credits are already back. | The search |
report.ready | A prospect report is ready. | place_id, grade, score, app_url (full report: GET /reports/{place_id}) |
report.failed | A prospect report failed. Its credits are refunded. | place_id, error |
ping | Only when you call POST /webhooks/{id}/test. | Empty object |
Payload
One event per request. The body is always the same envelope; the headers repeat the event type and id.
POST /hooks/leadwebia HTTP/1.1
Content-Type: application/json
X-LeadWebia-Event: lead.created
X-LeadWebia-Delivery: evt_5c1f…
X-LeadWebia-Timestamp: 1764601781
X-LeadWebia-Signature: sha256=9b1d0c…
{
"id": "evt_5c1f…",
"type": "lead.created",
"created_at": "2026-12-01T15:09:41Z",
"api_version": "v1",
"data": { "place_id": "ChIJ…", "name": "Lone Star Plumbing Co.", … }
}Verify signatures
X-LeadWebia-Signature is sha256= plus the hex HMAC-SHA256 of the raw request body, keyed with the webhook's signing secret. Compute it over the exact bytes you received, before parsing the JSON, and compare in constant time. Then use the event id to skip an event you already handled.
# Flask: request.get_data() is the raw body the signature covers.
import hashlib
import hmac
import os
from flask import Flask, abort, request
app = Flask(__name__)
SECRET = os.environ["LEADWEBIA_SIGNING_SECRET"].encode()
seen = set() # use your database in production
@app.post("/hooks/leadwebia")
def leadwebia():
raw = request.get_data()
expected = "sha256=" + hmac.new(SECRET, raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, request.headers.get("X-LeadWebia-Signature", "")):
abort(401)
event = request.get_json()
if event["id"] in seen: # a retry of an event you already handled
return "", 200
seen.add(event["id"])
if event["type"] == "lead.created":
lead = event["data"]
# lead["place_id"], lead["name"], lead["phone"], lead["emails"]…
return "", 200// Express: keep the raw body, the signature is computed over its exact bytes.
const crypto = require('crypto');
const express = require('express');
const app = express();
const seen = new Set(); // use your database in production
app.post('/hooks/leadwebia', express.raw({ type: 'application/json' }), (req, res) => {
const header = req.get('X-LeadWebia-Signature') || '';
const expected = 'sha256=' + crypto
.createHmac('sha256', process.env.LEADWEBIA_SIGNING_SECRET)
.update(req.body) // Buffer with the raw body
.digest('hex');
const valid = header.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(header), Buffer.from(expected));
if (!valid) return res.sendStatus(401);
const event = JSON.parse(req.body.toString('utf8'));
if (seen.has(event.id)) return res.sendStatus(200); // a retry you already handled
seen.add(event.id);
if (event.type === 'lead.created') {
const lead = event.data;
// lead.place_id, lead.name, lead.phone, lead.emails…
}
res.sendStatus(200);
});Retries and 410
- Answer any 2xx quickly and do slow work afterwards. Anything else, or no answer, is a failure.
- A failed delivery is retried 3 times right away, then after 1 minute, 10 minutes and 1 hour. A retry carries the same event id.
- A lead is never sent twice to the same webhook as a new event.
- Answer
410 Goneand we delete the subscription (the REST hooks convention). - After 50 failed events in a row the webhook is disabled;
GET /webhooksshows why. Re-enable it withPATCH /webhooks/{id}andenabled: true. POST /webhooks/{id}/testsends a signedping;GET /webhooks/{id}/deliverieslists the last 100 deliveries.
Zapier, Make and n8n
- Instant triggers (REST hooks): on subscribe, POST the tool's webhook URL to
/webhooks; on unsubscribe,DELETE /webhooks/{id}. A410from the tool removes it too. - Polling triggers: call
GET /leads?since=on a schedule and keepnext_cursorin the tool's storage. - Actions: an HTTP request step with the
Authorizationheader. - No code: the app's webhook integration sends a search's leads to a Zapier, Make or n8n URL without an API key.
Interactive reference
Every endpoint with its parameters, response fields and examples, generated from the API itself. You can try calls with your key there.
Using an AI assistant instead? The LeadWebia MCP server gives ChatGPT, Claude and Cursor the same tools without code.
Changelog
- v12026-12
First public version: account, locations, searches, leads (with the since feed), exports, integrations, prospect reports, website tools and webhooks.