# Get a plan

> A plan made earlier, with its credits (spends nothing)

`GET https://api.signalvan.com/v1/searches/plan/{plan_id}`

**Step 5 of 9 in the lead generation flow: Confirm with the user.**

Needs `leads:read` · Uses no credits · 300 a minute · Web page: https://www.signalvan.com/developers/reference/get-plan

The plan `POST /searches/plan` made, read back exactly as it answered then (summary, settings,
what is missing, `ready` and the credits with their range), with the live balance and `expires_at`, and `started` with
the lead search's `search_id` once the plan was started (a plan starts one lead search only). Use it to show the
user the plan and its credits again before they confirm. A plan is kept 15 minutes, for the key and website that made
it: an older plan, another key's or another website's answers 404.

**Credits:** none.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_id` | `string` | Yes | A plan_id from POST /searches/plan Example: `8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058`. |

## 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_...`. |
| `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`. |

## Response · 200 (application/json)

- `plan_id` (string, required): Start it with POST /searches {plan_id, confirm: true} within 15 minutes
- `expires_at` (string | null, required): When the plan expires
- `kind` (string, required): The kind of lead search planned One of: `signals`, `directory`.
- `summary` (string | null, required): What will run, in one or two plain sentences: show it to the user
- `use_case` (string | null, required): Who to reach and why, as the lead search will read it
- `intent_signals` (PlanSignal[], required): The intent signals that will run (empty for the directory)
  - `key` (string, required): Its key (GET /intent-signals)
  - `label` (string, required): Its name in the app
- `settings` (object | null, required): Every setting the lead search will run with (signals: keywords, job_titles, competitors, country...; directory: segments, regions, buyer_roles, exclude...)
- `missing` (object, required): Settings still needed, per intent signal ({} when none). Plan again with them before starting
- `ready` (boolean, required): true when nothing is missing and the credits have no problem
- `credits` (SignalsCredits | DirectoryCredits, required): The credits, before anything is used
  - `range` (CreditRange, required): Needs at least, usually uses, stops at: show its sentence
  - `max_credits` (integer | null, required): The most credits the lead search may use: your max_credits, else the suggested amount
  - `suggested` (integer | null, required): The credits we suggest for these intent signals and settings
  - `minimum` (integer | null, required): The fewest credits that let every intent signal try once
  - `contact_reserve` (integer | null, required): Credits set aside for the contact details asked for (contact), 0 when none
  - `split` (SplitShare[], required): How max_credits is shared between the intent signals
  - `notes` (string[], required): Plain sentences about the split (up to 10)
  - `problem` (string | null, required): Why these credits will not work (for example not enough available), null when they will. The plan is not ready while set
  - `balance` (Credits, required): The live balance
- `next` (string, required): What to do next, in plain words
- `started` (boolean | null): On GET /searches/plan/{plan_id}: true once the plan started its lead search (a plan starts one only)
- `search_id` (string | null): With started: the lead search it started
- `app_url` (string, required): The lead searches in SignalVan

## Responses

- `200`: The plan, its credits and what is still missing
- `400` `invalid`: A field is not valid (the detail names it)
- `401` `unauthorized`: No API key, or the key is not valid
- `403` `scope_missing`: The key lacks the permission (scope_missing)
- `404` `not_found`: Not found, or not yours
- `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.

### Request

cURL:

```bash
curl "https://api.signalvan.com/v1/searches/plan/8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY"
```

Python:

```python
import os, requests

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

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/searches/plan/8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14", {
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
  },
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

## Response example · 200

```json
{
  "plan_id": "8c1e4b7a-52d9-4f0e-b6a3-91d7e2f4c058",
  "expires_at": "2026-11-20T09:55:00Z",
  "kind": "signals",
  "summary": "We'll read recent posts on 'digital dentistry', 'dental lab' and 'crown and bridge', and read recent LinkedIn posts where people ask for a partner or vendor like you, then keep the likely customers and show who to contact at each company (emails only when you ask).",
  "use_case": "Dental practices in Yorkshire that outsource crowns and bridges and want a faster lab",
  "intent_signals": [
    {
      "key": "topic_engagers",
      "label": "Industry topic posts"
    },
    {
      "key": "help_requests",
      "label": "People asking for help"
    }
  ],
  "settings": {
    "offer": "Crowns, bridges, implants and dentures made to order in Leeds",
    "use_case": "Dental practices in Yorkshire that outsource crowns and bridges and want a faster lab",
    "keywords": [
      "digital dentistry",
      "dental lab",
      "crown and bridge"
    ],
    "job_titles": [
      "Practice owner",
      "Principal dentist"
    ],
    "locations": [],
    "country": "gb",
    "competitors": [],
    "contact_pref": "email"
  },
  "missing": {},
  "ready": true,
  "credits": {
    "range": {
      "needs_at_least": 150,
      "expected": 600,
      "at_most": 600,
      "sentence": "Needs at least 150 credits to run, usually uses about 600, stops at 600. You are charged for what it really uses, up to that limit."
    },
    "max_credits": 600,
    "suggested": 600,
    "minimum": 150,
    "contact_reserve": 0,
    "split": [
      {
        "signal": "topic_engagers",
        "label": "Industry topic posts",
        "credits": 350
      },
      {
        "signal": "help_requests",
        "label": "People asking for help",
        "credits": 250
      }
    ],
    "notes": [
      "First lead search with people asking for help: we try it with 250 credits and move the rest if it finds nothing."
    ],
    "problem": null,
    "balance": {
      "available": 2350,
      "balance": 2500,
      "held": 150,
      "low": false
    }
  },
  "next": "Show the user the summary and the credits. When they agree, POST /v1/searches with this plan_id and confirm: true.",
  "app_url": "https://www.signalvan.com/studio?p=leads"
}
```
