# Search companies by keyword

Use `GET /v1/companies/search` to find companies by name or other keywords.
Add filters to narrow the results.

## Search for companies

Replace `YOUR_API_KEY` with your [API key](https://docs.envoapi.com/guides/authentication.md), then run:

```bash
curl --get 'https://api.envoapi.com/v1/companies/search' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'keywords=Microsoft' \
  --data-urlencode 'offset=0'
```

Only `keywords` is required. Use 1–120 characters.

## Add filters

| Parameter     | Example          | Meaning                             |
| ------------- | ---------------- | ----------------------------------- |
| `location`    | `geo_6yITcz`     | Has a location in the United States |
| `industry`    | `industry_C1dRf` | Software Development                |
| `companySize` | `D,E`            | 51–500 employees                    |
| `hasJobs`     | `true`           | Has job listings on LinkedIn        |

For example, find software companies with a US location, 51–500 employees,
and job listings:

```bash
curl --get 'https://api.envoapi.com/v1/companies/search' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-urlencode 'keywords=software' \
  --data-urlencode 'location=geo_6yITcz' \
  --data-urlencode 'industry=industry_C1dRf' \
  --data-urlencode 'companySize=D,E' \
  --data-urlencode 'hasJobs=true'
```

Values within one filter match **any** listed value. Different filters must
**all** match. For example, `companySize=D,E` accepts size D or E, while
`industry` also requires the selected industry.

Location can match a branch or office, not just the headquarters. `hasJobs`
accepts only `true`; leave it out to include companies with or without jobs.

### Find location and industry IDs

| Filter     | Where to get the ID                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------- |
| `location` | [Location search](https://docs.envoapi.com/api/operations/searchlocationsbykeyword.md): `data.locations[].id`   |
| `industry` | [Industry search](https://docs.envoapi.com/api/operations/searchindustriesbykeyword.md): `data.industries[].id` |

Copy IDs unchanged. Names such as `United States` or `Software Development`
cannot be used as filter IDs. Each filter accepts up to 10 unique IDs,
separated by commas. Send each parameter once and leave out unused filters.

### Company size codes

Use uppercase codes. Separate multiple sizes with commas, such as `D,E`.

| Code | Employees    |
| ---- | ------------ |
| `B`  | 1–10         |
| `C`  | 11–50        |
| `D`  | 51–200       |
| `E`  | 201–500      |
| `F`  | 501–1,000    |
| `G`  | 1,001–5,000  |
| `H`  | 5,001–10,000 |
| `I`  | 10,001+      |

These ranges come from LinkedIn; they are not verified employee counts.

## Read the response

`data.companies` contains the matching companies. Here is one company from the
captured response, with `logoUrl` omitted:

```json
{
  "name": "Microsoft",
  "slug": "microsoft",
  "linkedinUrl": "https://www.linkedin.com/company/microsoft",
  "description": "Software Development • Redmond, Washington",
  "summary": "29M followers"
}
```

* `summary` and `logoUrl` may be `null`.
* No matches returns `data.companies: []`.
* `meta.creditCost` is the number of credits charged for the request.

Use a returned slug with [company lookup](https://docs.envoapi.com/guides/company-lookup.md) to get more
company details. Some search slugs contain characters that company lookup
does not yet accept, including non-English letters, periods, ampersands, or
a leading underscore.

See the [full response example](https://docs.envoapi.com/api/operations/searchcompaniesbykeyword.md)
for all fields.

## Get the next page

Start with `offset=0`, or leave it out. This captured `meta.paging` example
shows that the next page starts at `10`:

```json
{
  "offset": 0,
  "limit": 10,
  "returned": 10,
  "hasMore": true,
  "nextOffset": 10
}
```

Set `offset` to `meta.paging.nextOffset` and keep the same keywords and filters.
Stop when `hasMore` is `false`. Accepted offsets are `0`–`10000`; do not request
an offset above `10000`.

The API sets the page size; do not send `limit` or `count`. Each successful
page uses credits, including empty pages. See [Pagination](https://docs.envoapi.com/guides/pagination.md)
and [Errors](https://docs.envoapi.com/guides/errors.md) for more help.

If you already have a website domain, use
[company domain search](https://docs.envoapi.com/api/operations/searchcompaniesbydomain.md) with
`domain=microsoft.com`. That endpoint accepts `domain` and `offset`, without
keyword-search filters.

[Documentation index](https://docs.envoapi.com/llms.txt) · [All endpoints](https://docs.envoapi.com/api/index.md)
