# List companies

> The companies of a lead search

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

**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-companies

The companies of a finished lead search, one row each, highest priority first: the people mapped
there, how many are leads, how many showed intent and the best lead score. People whose company is not confirmed
share one last row (`real: false`). 50 a page (up to 200 with `limit`).

**Credits:** none. A lead search that is not done answers 404.

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

- `companies` (Company[], required): The companies on this page
  - `key` (string, required): The company's key in this lead search. People without a confirmed company share the key __company_not_confirmed (real: false), listed last
  - `name` (string, required): The company's name (empty for the unconfirmed group)
  - `domain` (string, required): Its domain, when known (else empty)
  - `rank` (integer | null, required): Its priority in the lead search, 1 first (null when not ranked)
  - `best` (number, required): The best lead score among its people
  - `people` (integer, required): People mapped at the company
  - `leads` (integer, required): How many of them are leads in this lead search
  - `engaged` (integer, required): How many of them showed intent
  - `real` (boolean, required): false for the group of people whose company is not confirmed
- `total` (integer, required): The companies matching q
- `next_cursor` (string | null, required): Pass as cursor for the next page; null on the last page

## Responses

- `200`: A page of companies
- `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/companies?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/companies?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/companies?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/companies?limit=50&cursor=eyJvIjogNTB9&q=implants&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/companies?limit=50&cursor=eyJvIjogNTB9&q=implants&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/companies?limit=50&cursor=eyJvIjogNTB9&q=implants&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
{
  "companies": [
    {
      "key": "aire valley dental care",
      "name": "Aire Valley Dental Care",
      "domain": "airevalleydental.co.uk",
      "rank": null,
      "best": 84,
      "people": 3,
      "leads": 1,
      "engaged": 1,
      "real": true
    }
  ],
  "total": 27,
  "next_cursor": null
}
```
