# Start a lead search

> Start a planned lead search (spends credits)

`POST https://api.signalvan.com/v1/searches`

**Step 6 of 9 in the lead generation flow: Start the lead search.**

Needs `leads:write` · Uses credits after confirm · Idempotency-Key supported · 60 a minute · Web page: https://www.signalvan.com/developers/reference/start-search

Starts a planned lead search. `confirm` must be true, and only after the user saw the plan's
credits and agreed.

* **202** started: follow it with `GET /searches/{search_id}/wait`, then read `GET /searches/{search_id}/leads`. The
  `Location` header is the lead search.
* **200** nothing new started: the same lead search ran in the last 7 days and is reused (send `refresh: true` to lead search
  again), or this plan already started its lead search.

A plan starts at most one lead search and expires after 15 minutes (409 `plan_expired`: plan again). At most 2 lead searches
run at once per website (409 `busy`).

**Credits:** used as the lead search runs, up to the plan's `max_credits` (signals) or `credit_limit` (directory); the
answer carries the live balance. Outreach continues in the SignalVan app through `app_url`. Send an
`Idempotency-Key` to retry safely.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `website_id` | `string` | No | The website to act on (GET /websites). Left out: the key's default website, else its only one; a key that opens several websites and has no default must send it Example: `6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14`. |

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | `string` | Yes | Bearer and your API key. Keys are made in SignalVan: Account, API keys. Example: `Bearer sv_live_...`. |
| `Content-Type` | `string` | Yes | The body is JSON. Example: `application/json`. |
| `X-Website-Id` | `string` | No | The same as website_id, as a header (the query parameter wins when both are sent) Example: `6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14`. |
| `Idempotency-Key` | `string` | No | Send the same key to retry safely: the first answer comes back (24 hours) Example: `plan-2026-11-20-leeds-01`. |

## Body (application/json)

- `plan_id` (string, required): plan_id from POST /v1/searches/plan (15 minutes, this key and website only)
- `confirm` (boolean, required): The JSON value true (not "true" or 1): the user saw the plan's credits and agreed
- `refresh` (boolean): lead search again even if the same lead search ran in the last 7 days

## Response · 200 (application/json)

- `search` (Search, required): The lead search: follow it with GET /searches/{search_id}/wait
  - `id` (string, required): The lead search id
  - `status` (string, required): Where the lead search is One of: `queued`, `running`, `done`, `error`.
  - `progress` (string | null): The latest progress line in plain words (null before it starts)
  - `title` (string | null): The list's name, in the words of the request (or the name the user gave it)
  - `created_at` (string | null): When it was started
  - `updated_at` (string | null): When it last changed
  - `leads_total` (integer | null): The likely customers it found (null until done). The leads list also holds partners and leads to check, so its total can be higher
  - `counts` (object | null): Breakdowns when done (by_country, by_segment, kinds and more), null until then
  - `outcome` (string | null): done or done_with_problems when the lead search is done, else null
  - `error` (string | null): Why it stopped, in plain words, when status is error
  - `app_url` (string, required): Open the lead search in SignalVan
- `started` (boolean, required): true when a new lead search started now
- `reused` (boolean, required): true when nothing new started: the same lead search from the last 7 days, or the one this plan already started
- `credits` (StartCredits, required): The live balance
  - `balance` (Credits, required): The live balance
- `next` (string, required): What to do next, in plain words

## Response · 202 (application/json)

- `search` (Search, required): The lead search: follow it with GET /searches/{search_id}/wait
  - `id` (string, required): The lead search id
  - `status` (string, required): Where the lead search is One of: `queued`, `running`, `done`, `error`.
  - `progress` (string | null): The latest progress line in plain words (null before it starts)
  - `title` (string | null): The list's name, in the words of the request (or the name the user gave it)
  - `created_at` (string | null): When it was started
  - `updated_at` (string | null): When it last changed
  - `leads_total` (integer | null): The likely customers it found (null until done). The leads list also holds partners and leads to check, so its total can be higher
  - `counts` (object | null): Breakdowns when done (by_country, by_segment, kinds and more), null until then
  - `outcome` (string | null): done or done_with_problems when the lead search is done, else null
  - `error` (string | null): Why it stopped, in plain words, when status is error
  - `app_url` (string, required): Open the lead search in SignalVan
- `started` (boolean, required): true when a new lead search started now
- `reused` (boolean, required): true when nothing new started: the same lead search from the last 7 days, or the one this plan already started
- `credits` (StartCredits, required): The live balance
  - `balance` (Credits, required): The live balance
- `next` (string, required): What to do next, in plain words

## Responses

- `200`: Nothing new started: the same lead search was reused
- `202`: Started: follow the lead search until it finishes
- `400` `invalid`: A field is not valid (the detail names it)
- `401` `unauthorized`: No API key, or the key is not valid
- `402` `not_entitled`: Not enough credits, or above the limit (spending routes)
- `403` `scope_missing`: The key lacks the permission (scope_missing)
- `404` `not_found`: Not found, or not yours
- `409` `plan_expired`: plan_expired, busy or idempotency_conflict (spending routes)
- `422` `needs_input`: needs_input: the plan still needs settings (spending routes)
- `429` `rate_limited`: Too many requests: wait Retry-After seconds
- `503` `unavailable`: Temporarily unavailable: retry with backoff

## Request

Every request below is complete and runs as copied (set SIGNALVAN_API_KEY first). website_id is needed when your key opens several websites; it takes the website's id or its domain.

### Start the plan the user agreed to

cURL:

```bash
curl -X POST "https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
    "confirm": true
  }'
```

Python:

```python
import os, uuid, requests

r = requests.post(
    "https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNALVAN_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
        "confirm": True
    },
    timeout=70,
)
r.raise_for_status()
print(r.json())
```

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
    "confirm": true
  }),
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

### Every field: run again even if the same lead search ran this week

cURL:

```bash
curl -X POST "https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
    "confirm": true,
    "refresh": true
  }'
```

Python:

```python
import os, uuid, requests

r = requests.post(
    "https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNALVAN_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
        "confirm": True,
        "refresh": True
    },
    timeout=70,
)
r.raise_for_status()
print(r.json())
```

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/searches?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
    "confirm": true,
    "refresh": true
  }),
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

## Response example · 200

```json
{
  "search": {
    "id": "3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35",
    "status": "done",
    "progress": "Read each company's website for context",
    "title": "Digital dentistry",
    "created_at": "2026-11-20T09:41:07Z",
    "updated_at": "2026-11-20T09:58:31Z",
    "leads_total": 31,
    "counts": {
      "by_country": {
        "GB": 44
      },
      "by_segment": {
        "Practice owners": 22,
        "Practice managers": 13,
        "Dental technicians": 9
      },
      "kinds": {
        "customer": 31,
        "partner": 2,
        "check": 7,
        "nofit": 4,
        "competitor": 0
      }
    },
    "outcome": "done",
    "error": null,
    "app_url": "https://www.signalvan.com/studio?p=leads&view=job&job=3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35"
  },
  "started": false,
  "reused": true,
  "credits": {
    "balance": {
      "available": 2350,
      "balance": 2500,
      "held": 150,
      "low": false
    }
  },
  "next": "GET /v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/wait?seconds=50 until finished, then GET /v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads"
}
```
