# List leads

> The leads of a lead search

`GET https://api.signalvan.com/v1/searches/{search_id}/leads`

**Step 8 of 9 in the lead generation flow: Retrieve the leads.**

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

The leads of a finished lead search, highest lead score first, 50 a page (up to 200 with
`limit`). Narrow them with `q` (free text), `tier` (hot, warm, cold, partner; comma separated) and `has_email`.

Rows are the list's light rows; `GET /searches/{search_id}/leads/{lead_key}` has everything known about one lead.
While the lead search is still queued or running the answer has no leads and carries the `search`, so you can see its
status.

A lead whose person is already in one of this website's outreach campaigns (email or LinkedIn) carries `outreach`
(`{in_campaign, campaign, channel}`), and the page says how many (`in_outreach`): tell the person before contacting
them any other way. A lead someone recorded as contacted outside SignalVan (`POST /searches/{search_id}/leads/contacted`)
carries `outreach.contacted` (`{channel, via, app, at, note}`; `in_campaign` is false when that is all), and the page
says how many (`contacted_elsewhere`). Both are warnings, never filters: every lead is returned.

**Credits:** none. Contact details appear when SignalVan has found them; ask for them in the plan with `contact`.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `search_id` | `string` | Yes | A lead search id (GET /searches) Example: `3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35`. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer \| null` | No | Rows a page, 1 to 200 (default 50) Example: `50`. |
| `cursor` | `string \| null` | No | next_cursor of the previous page (left out: the first page) Example: `eyJvIjogNTB9`. |
| `q` | `string` | No | Free text matched against the rows (names, roles, companies, signals...) Example: `implants`. |
| `tier` | `string \| null` | No | hot, warm, cold, partner (comma separated) Example: `hot`. |
| `has_email` | `boolean \| null` | No | true: only leads with an email already known Example: `true`. |
| `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)

- `leads` (Lead[], required): The leads on this page, highest lead score first
  - `lead_key` (string, required): The lead's id in this lead search: GET /searches/{search_id}/leads/{lead_key}
  - `name` (string, required): The business (the person's company on signal lead searches)
  - `person` (string | null): The person to contact
  - `role` (string | null): Their role
  - `company` (string | null): Their company (signal lead searches)
  - `headline` (string | null): Their profile headline (signal lead searches)
  - `segment` (string | null): The kind of customer
  - `category` (string | null): The business category or industry
  - `city` (string | null): Where they are
  - `country` (string | null): Country code (ISO 3166-1 alpha-2, upper case), empty when unknown
  - `country_name` (string | null): The country's name
  - `website` (string | null): The business website
  - `domain` (string | null): The business domain
  - `phone` (string | null): The business phone, when listed (directory lead searches)
  - `linkedin_url` (string | null): Their LinkedIn profile
  - `tier` (string | null): hot, warm, cold, partner or not_for_you. Older rows may leave it out; the tier filter still works on them
  - `tier_why` (string | null): Why this tier, in one sentence
  - `intent_label` (string | null): The strongest signal that found them, in plain words
  - `group` (string | null): The group the lead was sorted into
  - `group_kind` (string | null): buyer, partner, competitor, not_fit or check
  - `use` (string | null): How to use this lead, in one sentence
  - `approaches` (string[] | null): Ways to approach them (up to 3)
  - `signals` (LeadSignal[] | null): The signs of intent, with proof
  - `signal_labels` (string[] | null): The signals in plain words
  - `fit_score` (number | null): How well they fit your ideal customer (part of gem_score)
  - `need_score` (number | null): How strong their need looks (part of gem_score)
  - `gem_score` (number | null): The lead score, 0 to 100: lists are sorted by it, highest first
  - `hidden_gem` (boolean | null): true for a strong lead others are likely to miss
  - `why` (string[] | null): Why this lead, in plain sentences
  - `email` (string | null): Their work email when SignalVan already had it (null otherwise: contact details are looked up only when asked)
  - `email_confidence` (string | null): verified, likely, unverified, general or none
  - `contact_status` (string | null): found, found_unverified or not_requested
  - `emails` (string[] | null): Every email known for the lead
  - `socials` (string[] | null): Social profiles
  - `found_by` (string[] | null): The intent signals that found them (their keys)
  - `delivery` (string | null): new, or previous when an earlier lead search already delivered them
  - `outreach` (LeadOutreach | null): Only when the person is already in one of this website's outreach campaigns (email or LinkedIn) or was recorded as contacted outside SignalVan. A warning, never a filter: tell the person before contacting them again
- `total` (integer, required): The leads matching q and the filters (0 while the lead search runs)
- `next_cursor` (string | null, required): Pass as cursor for the next page; null on the last page
- `in_outreach` (integer | null): Only when some leads on this page are already in one of the website's outreach campaigns: how many (see each lead's outreach)
- `outreach_note` (string | null): With in_outreach: one line to tell the person
- `contacted_elsewhere` (integer | null): Only when some leads on this page were recorded as contacted outside SignalVan: how many (see each lead's outreach.contacted)
- `contacted_note` (string | null): With contacted_elsewhere: one line to tell the person
- `search` (Search): Only while the lead search is not done: the lead search, so you can see its status (leads is then empty)
  - `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

## Responses

- `200`: A page of leads
- `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.

### Minimal

cURL:

```bash
curl "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?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/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?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/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?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())
```

### All options

cURL:

```bash
curl "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?limit=50&cursor=eyJvIjogNTB9&q=implants&tier=hot&has_email=true&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/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?limit=50&cursor=eyJvIjogNTB9&q=implants&tier=hot&has_email=true&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/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads?limit=50&cursor=eyJvIjogNTB9&q=implants&tier=hot&has_email=true&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
{
  "leads": [
    {
      "lead_key": "l:sarah-whitfield-4a2b91",
      "name": "Aire Valley Dental Care",
      "person": "Sarah Whitfield",
      "role": "Principal Dentist and Practice Owner",
      "company": "Aire Valley Dental Care",
      "headline": "Principal Dentist at Aire Valley Dental Care. Implants and restorative dentistry",
      "segment": "Practice owners",
      "category": "Medical Practices",
      "city": "Leeds, England, United Kingdom",
      "country": "GB",
      "country_name": "United Kingdom",
      "website": "https://www.airevalleydental.co.uk",
      "domain": "airevalleydental.co.uk",
      "linkedin_url": "https://www.linkedin.com/in/sarah-whitfield-4a2b91",
      "tier": "hot",
      "tier_why": "Likely customer: runs a practice that sends crown work to an outside lab; asked in their own words for a faster turnaround.",
      "intent_key": "commented",
      "intent_label": "Commented on a post",
      "group": "Practice owners who outsource lab work",
      "group_kind": "buyer",
      "use": "Offer a 5 day crown turnaround with free collection in Leeds.",
      "approaches": [
        "Reply to her comment with your turnaround time",
        "Offer a free first case"
      ],
      "signals": [
        {
          "key": "commented",
          "label": "Commented on a post about the searched topic",
          "proof": "Still waiting 10 days for zirconia crowns from our current lab. Anyone in Yorkshire doing a 5 day turnaround?",
          "source_url": "https://www.linkedin.com/feed/update/urn:li:activity:7263318842210590720",
          "strength": 0.8
        }
      ],
      "signal_labels": [
        "Commented on a post about the searched topic"
      ],
      "fit_score": 22,
      "need_score": 24,
      "gem_score": 84,
      "hidden_gem": false,
      "why": [
        "Commented on a post about the searched topic: Still waiting 10 days for zirconia crowns from our current lab.",
        "Fit: practice owner in Leeds who orders crowns from an outside lab"
      ],
      "email": null,
      "email_confidence": "none",
      "contact_status": "not_requested",
      "emails": [],
      "socials": [],
      "found_by": [
        "topic_engagers"
      ],
      "delivery": "new"
    }
  ],
  "total": 44,
  "next_cursor": "eyJvIjogNTB9"
}
```
