LeadWebiaDocs

LeadWebia API

code View .md

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.

  1. 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.

  2. Check the key

    GET /me answers with your plan and credits. It's free, so it's the call to test a key with.

    GET /me
    curl https://api.leadwebia.com/api/v1/me \
      -H "Authorization: Bearer $LEADWEBIA_API_KEY"
    Response · abridged
    {
      "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"
    }
  3. Find the area to search

    Searches run on areas. GET /locations turns a city into its area_id (free). If several places share the name, pass state.

    GET /locations
    curl "https://api.leadwebia.com/api/v1/locations?city=Austin&country=US&state=Texas" \
      -H "Authorization: Bearer $LEADWEBIA_API_KEY"
    Response
    {
      "data": [
        {
          "area_id": "US:TX:4671654",
          "name": "Austin",
          "state": "Texas",
          "country": "US",
          "population": 961855,
          "points": 64
        }
      ]
    }
  4. Start a search

    POST /searches reserves max_leads credits and charges 1 per business delivered; what isn't used comes back. Always send an Idempotency-Key: if a request times out and you retry with the same key, you get the same search instead of paying twice.

    POST /searches
    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
      }'
    Response · abridged
    {
      "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-…"
    }
  5. Get the leads

    PollGET /leads?since=: leads come oldest first with a next_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.created and we POST each lead to your server when its emails are found (Webhooks).

    GET /leads?since=
    # 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"
    POST /webhooks
    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"
      }'
    A lead · list fields
    {
      "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:

HTTP
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.

CallCredits
POST /searches, POST /searches/{search_id}/moreReserves max_leads, charges 1 per business delivered (with only_with_email: 1 per business with an email). Unused credits come back.
POST /reports20 when a new report runs. An existing report is returned free; a failed one is refunded.
Everything elseFree. 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).

Error envelope
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"
  }
}
StatusCodesWhen
401invalid_api_keyMissing, malformed, unknown or revoked key (same answer for all).
402insufficient_creditsNot enough credits for the search or report.
403paid_plan_requiredprofessional_plan_requiredThe feature needs the credit pack or a paid plan (exports, integrations, webhooks, white-label sharing).
404not_foundsearch_not_foundlead_not_foundreport_not_foundIt does not exist or belongs to another account.
409search_exhaustedlegacy_searchidempotency_conflictintegration_not_connectedrefresh_too_soonreport_not_readyThe 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.
422validation_errorA parameter is missing or wrong. details lists each field.
429rate_limitedqueue_fullmessage_limitlookup_limitemail_lookup_limitToo many requests, or a daily/hourly cap. Wait for Retry-After seconds.
500internal_errorOur fault. Retry later; send us the request_id if it keeps failing.
502upstream_errorwebsite_unreadableA 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.

Offset page
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=now from 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_id and q: emails, website checks and CRM status arrive after a lead is saved, so filter on your side or use the lead.created webhook (sent once the contacts are in).
  • Feeds list items older than one minute, so a write still in progress is never skipped.
Cursor page
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 /reports needs no key: an existing or running report is returned without a new charge.

Rate limits

Per key60 requests a minute
Per account (all keys)120 requests a minute
Credit-spending calls10 a minute per account (start a search, load more, create a report)
Existing caps300 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

GET/me

Get account

Plan, credits left, pipeline statuses and connected integrations. Use it to test a key.

Credits Free

GET/lead-statuses

List lead statuses

Your pipeline statuses, in order.

Credits Free

Locations

GET/locations

Find locations

Find the search areas (area_id) of a city: city, country (ISO code, e.g. US), optional state.

Credits Free

Searches

POST/searches

Start 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.

GET/searches

List searches

Your searches with their latest run. Filters: status, updated_since cursor.

Credits Free

GET/searches/{search_id}

Get a search

Status and progress of a search.

Credits Free

GET/searches/{search_id}/runs

List runs

Every run of a search (the first one and each "more").

Credits Free

POST/searches/{search_id}/more

Load 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.

GET/searches/{search_id}/remaining

Remaining estimate

Estimate of how many businesses are left in the area.

Credits Free

Leads

GET/leads

List leads

Your leads with filters (search_id, website, status, q, cms, cms_outdated, uses_ads, has_email), sort and offset pagination.

Credits Free

GET/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

GET/leads/{place_id}

Get a lead

Everything about one lead: contacts, socials, website checks, PageSpeed and Core Web Vitals.

Credits Free

PATCH/leads/{place_id}

Update status

Set the pipeline status of a lead.

Credits Free

POST/leads/status

Bulk status

Set the status of up to 500 leads, or of every lead of a search.

Credits Free

DELETE/leads/{place_id}

Delete leads

Delete a lead (POST /leads/delete for up to 500).

Credits Free (credits are not returned)

POST/leads/{place_id}/outreach-message

Outreach message

AI-written first message for that business.

Credits Free · 300 a day (shared with the MCP)

Exports and integrations

POST/exports

Export 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

GET/integrations

List integrations

Integrations you connected in the app.

Credits Free

GET/integrations/{kind}/targets

List targets

Instantly campaigns or Google Sheets you can send to.

Credits Free · credit pack or paid plan

POST/integrations/{kind}/send

Send leads

Send leads to Instantly, Google Sheets or your webhook integration.

Credits Free · credit pack or paid plan

GET/integrations/sends/{task_id}

Send status

Progress of a send.

Credits Free

Prospect reports

POST/reports/lookup

Find a business

Find a business by name and city to report on.

Credits Free · 10 a day

POST/reports

Create 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

GET/reports/{place_id}

Get a report

Grade and summary (?full=true for the whole report).

Credits Free

POST/reports/{place_id}/share

Share a report

White-label link or PDF (GET /reports/{place_id}/pdf).

Credits Free · credit pack or paid plan

Website tools

POST/tools/website-check

Check a website

CMS, technology, SSL, ads pixels and grade of any URL (include_pagespeed for speed).

Credits Free

POST/tools/emails

Find emails

Emails published on a website.

Credits Free · 20 websites an hour

Webhooks

POST/webhooks

Create a webhook

Subscribe a URL to events. Returns signing_secret once.

Credits Free · credit pack or paid plan

GET/webhooks

List webhooks

Your subscriptions (GET /webhooks/{id} for one).

Credits Free

PATCH/webhooks/{id}

Update a webhook

Change url, events, description or enabled.

Credits Free

DELETE/webhooks/{id}

Delete a webhook

Unsubscribe.

Credits Free

POST/webhooks/{id}/test

Send a test ping

Send a signed ping now and see what your server answered.

Credits Free

GET/webhooks/{id}/deliveries

List 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

EventWhendata
lead.createdOnce per lead, when its email search is done (so emails and socials are in).The lead, same shape as GET /leads/{place_id}
search.completedA search run finished, including "area used up".The search, same shape as GET /searches/{search_id}
search.failedA search run failed. Unused credits are already back.The search
report.readyA prospect report is ready.place_id, grade, score, app_url (full report: GET /reports/{place_id})
report.failedA prospect report failed. Its credits are refunded.place_id, error
pingOnly 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.

HTTP · a delivery
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.

Receiver
# 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

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 Gone and we delete the subscription (the REST hooks convention).
  • After 50 failed events in a row the webhook is disabled; GET /webhooks shows why. Re-enable it with PATCH /webhooks/{id} and enabled: true.
  • POST /webhooks/{id}/test sends a signed ping; GET /webhooks/{id}/deliveries lists 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}. A 410 from the tool removes it too.
  • Polling triggers: call GET /leads?since= on a schedule and keep next_cursor in the tool's storage.
  • Actions: an HTTP request step with the Authorization header.
  • 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.