> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amplemarket.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Companies Search

> Learn how to find the right company.

Matching against a Company in our database allows the retrieval of data associated with said Company.

## Company Object

Here is the description of the Company object:

| Field                           | Type              | Description                                  |
| ------------------------------- | ----------------- | -------------------------------------------- |
| `id`                            | string            | Amplemarket ID of the Company                |
| `name`                          | string            | Name of the Company                          |
| `linkedin_url`                  | string            | LinkedIn URL of the Company                  |
| `website`                       | string            | Website of the Company                       |
| `overview`                      | string            | Description of the Company                   |
| `logo_url`                      | string            | Logo URL of the Company                      |
| `founded_year`                  | integer           | Year the Company was founded                 |
| `traffic_rank`                  | integer           | Traffic rank of the Company                  |
| `sic_codes`                     | array of integers | SIC codes of the Company                     |
| `type`                          | string            | Type of the Company (Public Company, etc.)   |
| `total_funding`                 | integer           | Total funding of the Company                 |
| `latest_funding_stage`          | string            | Latest funding stage of the Company          |
| `latest_funding_date`           | string            | Latest funding date of the Company           |
| `keywords`                      | array of strings  | Keywords of the Company                      |
| `estimated_number_of_employees` | integer           | Estimated number of employees at the Company |
| `followers`                     | integer           | Number of followers on LinkedIn              |
| `size`                          | string            | Self reported size of the Company            |
| `industry`                      | string            | Industry of the Company                      |
| `location`                      | string            | Location of the Company                      |
| `location_details`              | object            | Location details of the Company              |
| `locations`                     | array of objects  | Array of location objects for the Company    |
| `is_b2b`                        | boolean           | `true` if the Company has a B2B component    |
| `is_b2c`                        | boolean           | `true` if the Company has a B2C component    |
| `technologies`                  | array of strings  | Technologies detected for the Company        |
| `department_headcount`          | object            | Headcount by department                      |
| `job_function_headcount`        | object            | Headcount by job function                    |
| `estimated_revenue`             | string            | The estimated annual revenue of the company  |
| `revenue`                       | integer           | The annual revenue of the company            |

### Location Object

Each object in the `locations` array contains the following fields:

| Field         | Type    | Description                                                       |
| ------------- | ------- | ----------------------------------------------------------------- |
| `address`     | string  | Full address as a single string                                   |
| `is_primary`  | boolean | Indicates if this is the primary location                         |
| `country`     | string  | Country name (e.g., United States) - nullable                     |
| `state`       | string  | State or subdivision name (e.g., California, New York) - nullable |
| `city`        | string  | City name - nullable                                              |
| `postal_code` | string  | Postal code - nullable                                            |

## Companies Endpoints

### Finding a Company

**Request**

The following endpoint can be used to find a Company on Amplemarket:

```js theme={null}
GET /companies/find?linkedin_url=https://www.linkedin.com/company/company-1 HTTP/1.1
GET /companies/find?domain=example.com HTTP/1.1
```

**Response**

The response contains the Linkedin URL of the Company along with the other relevant data.

```js theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "eec03d70-58aa-46e8-9d08-815a7072b687",
  "object": "company",
  "name": "A Company",
  "website": "https://company.com",
  "linkedin_url": "https://www.linkedin.com/company/company-1",
  "keywords": [
    "sales",
    "ai sales",
    "sales engagement"
  ],
  "estimated_number_of_employees": 500,
  "size": "201-500 employees",
  "industry": "Software Development",
  "location": "San Francisco, California, US",
  "locations": [
    {
      "address": "123 Main Street, San Francisco, CA 94105, United States",
      "is_primary": true,
      "country": "United States",
      "state": "California",
      "city": "San Francisco",
      "postal_code": "94105"
    },
    {
      "address": "456 Broadway, New York, NY 10013, United States",
      "is_primary": false,
      "country": "United States",
      "state": "New York",
      "city": "New York",
      "postal_code": "10013"
    }
  ],
  "is_b2b": true,
  "is_b2c": false,
  "technologies": ["Salesforce"]
}
```

### Finding multiple companies

Enrichment requests allow you to retrieve comprehensive data about multiple companies simultaneously. This bulk operation is ideal for enriching large lists of companies with detailed information including their industry, size, location, and technologies.

The enrichment request flow will usually follow these steps:

1. `POST /companies/enrichment-requests` with a list of companies that will be enriched

2. In the response, follow the URL provided in `response._links.self.href`

3. Continue polling the endpoint while respecting the `Retry-After` HTTP Header

4. When enrichment completes, the results are in `response.results`

5. If the results are larger than the [default limit](/api-reference/introduction#usage-limits), then follow the URL provided in `response._links.next.href`

#### Enrichment Request Object

| Field     | Type                                 | Description                                                                                         |
| --------- | ------------------------------------ | --------------------------------------------------------------------------------------------------- |
| `id`      | integer                              | The ID of the enrichment request                                                                    |
| `status`  | string                               | The status of the enrichment request:                                                               |
|           |                                      | `queued`: The enrichment request hasn't started yet                                                 |
|           |                                      | `processing`: The enrichment request is in-progress                                                 |
|           |                                      | `completed`: The enrichment request terminated successfully                                         |
|           |                                      | `canceled`: The enrichment request terminated due to being canceled                                 |
|           |                                      | `error`: The enrichment request terminated with an error; see `_errors` for more details            |
| `results` | array of enrichment\_request\_result | The enrichment results for the companies provided; default number of results range from 1 up to 100 |
| `_links`  | array of links                       | Contains useful links related to this resource                                                      |
| `_errors` | array of errors                      | Contains the errors if the operation fails                                                          |

#### Enrichment Request Result Object

| Field          | Type           | Description                                                                   |
| -------------- | -------------- | ----------------------------------------------------------------------------- |
| `id`           | integer        | The ID of the enrichment result                                               |
| `status`       | string         | The result of the enrichment:                                                 |
|                |                | `enriched`: Successfully found and enriched the company                       |
|                |                | `not_found`: Unable to find a matching company in the database                |
| `result`       | Company object | The enriched Company object (see [Company Object](#company-object))           |
| `linkedin_url` | string         | The LinkedIn URL used to search for this company (if provided in the request) |
| `domain`       | string         | The domain used to search for this company (if provided in the request)       |

#### Start Enrichment Request

**Request**

A batch of companies can be sent to the enrichment request service, up to 10,000 companies according to [usage limits](/api-reference/introduction#usage-limits).

```js theme={null}
POST /companies/enrichment-requests HTTP/1.1
Content-Type: application/json

{
  "companies": [
    {
      "linkedin_url": "https://www.linkedin.com/company/company-1"
    },
    {
      "domain": "example.com"
    },
    {
      "name": "Acme Corporation"
    }
  ]
}
```

```bash theme={null}
curl -X POST https://api.amplemarket.com/companies/enrichment-requests \
	-H "Authorization: Bearer {{API Key}}" \
	-H "Content-Type: application/json" \
	-d '{
  "companies": [
    {"linkedin_url": "https://www.linkedin.com/company/company-1"},
    {"domain": "example.com"}
  ]
}'
```

**Request Parameters**

| Parameter   | Type  | Required | Description                        |
| ----------- | ----- | -------- | ---------------------------------- |
| `companies` | array | Yes      | Array of company objects to enrich |

**Company Object Properties**

Each company object can contain one or more of the following identifiers:

| Property       | Type   | Description                 |
| -------------- | ------ | --------------------------- |
| `linkedin_url` | string | LinkedIn URL of the company |
| `domain`       | string | Domain of the company       |
| `name`         | string | Name of the company         |

**Response**

This will return a `202 Accepted` indicating that the enrichment request will soon be started:

```js theme={null}
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /companies/enrichment-requests/1

{
  "id": 1,
  "object": "company_enrichment",
  "status": "queued",
  "results": [],
  "_links": {
    "self": {
      "href": "/companies/enrichment-requests/1"
    }
  }
}
```

**HTTP Headers**

* `Location`: `GET` points back to the enrichment request object that was created

**Links**

* `self` - `GET` points back to the enrichment request object that was created

#### Enrichment Request Polling

**Request**

The Enrichment Request object can be polled in order to receive results:

```js theme={null}
GET /companies/enrichment-requests/{{id}} HTTP/1.1
Content-Type: application/json
```

```bash theme={null}
curl https://api.amplemarket.com/companies/enrichment-requests/{{id}} \
	-H "Authorization: Bearer {{API Key}}"
```

**Response**

Will return a `200` OK while the operation hasn't yet terminated.

```js theme={null}
HTTP/1.1 200 OK
Content-Type: application/json
Retry-After: 60

{
  "id": 1,
  "object": "company_enrichment",
  "status": "processing",
  "results": [],
  "_links": {
    "self": {
      "href": "/companies/enrichment-requests/1"
    }
  }
}
```

**HTTP Headers**

* `Retry-After` - indicates how long to wait until performing another `GET` request

**Links**

* `self` - `GET` points back to the same object

* `next` - `GET` points to the next page of entries, when available

* `prev` - `GET` points to the previous page of entries, when available

#### Retrieving Enrichment Request Results

**Request**

When the enrichment request has terminated, the results can be retrieved using the same URL:

```js theme={null}
GET /companies/enrichment-requests/1 HTTP/1.1
Content-Type: application/json
```

```bash theme={null}
curl https://api.amplemarket.com/companies/enrichment-requests/{{id}} \
	-H "Authorization: Bearer {{API Key}}"
```

**Response**

The response will display up to 100 results:

```js theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "object": "company_enrichment",
  "status": "completed",
  "results": [
    {
      "id": 1,
      "linkedin_url": "https://www.linkedin.com/company/company-1",
      "status": "enriched",
      "result": {
        "id": "eec03d70-58aa-46e8-9d08-815a7072b687",
        "object": "company",
        "name": "A Company",
        "website": "https://company.com",
        "linkedin_url": "https://www.linkedin.com/company/company-1",
        "overview": "A Company is a leading provider of innovative solutions.",
        "logo_url": "https://example.com/logo.png",
        "founded_year": 2015,
        "keywords": [
          "sales",
          "ai sales",
          "sales engagement"
        ],
        "estimated_number_of_employees": 500,
        "size": "201-500 employees",
        "industry": "Software Development",
        "location": "San Francisco, California, US",
        "location_details": {
          "city": "San Francisco",
          "state": "California",
          "country": "United States"
        },
        "locations": [
          {
            "address": "123 Main Street, San Francisco, CA 94105, United States",
            "is_primary": true,
            "country": "United States",
            "state": "California",
            "city": "San Francisco",
            "postal_code": "94105"
          }
        ],
        "is_b2b": true,
        "is_b2c": false,
        "technologies": ["Salesforce", "HubSpot"]
      }
    },
    {
      "id": 2,
      "domain": "example.com",
      "status": "enriched",
      "result": {
        "id": "ffd04e81-69bb-57f9-a019-816a8183c798",
        "object": "company",
        "name": "Example Inc",
        "website": "https://example.com",
        "linkedin_url": "https://www.linkedin.com/company/example",
        "overview": "Example Inc provides enterprise solutions.",
        "logo_url": "https://example.com/logo.png",
        "founded_year": 2010,
        "keywords": [
          "technology",
          "saas"
        ],
        "estimated_number_of_employees": 250,
        "size": "201-500 employees",
        "industry": "Technology",
        "location": "New York, NY, US",
        "location_details": {
          "city": "New York",
          "state": "New York",
          "country": "United States"
        },
        "locations": [
          {
            "address": "456 Broadway, New York, NY 10013, United States",
            "is_primary": true,
            "country": "United States",
            "state": "New York",
            "city": "New York",
            "postal_code": "10013"
          }
        ],
        "is_b2b": true,
        "is_b2c": false,
        "technologies": ["AWS", "React"]
      }
    }
  ],
  "_links": {
    "self": {
      "href": "/companies/enrichment-requests/1"
    },
    "next": {
      "href": "/companies/enrichment-requests/1?page[size]=100&page[after]=2"
    },
    "prev": {
      "href": "/companies/enrichment-requests/1?page[size]=100&page[before]=1"
    }
  }
}
```

If the results contain more than 100 entries, then pagination is required to traverse them all and can be done using the links such as: `response._links.next.href`  (e.g. `GET /companies/enrichment-requests/1?page[size]=100&page[after]=2`).

**Links**

* `self` - `GET` points back to the same object

* `next` - `GET` points to the next page of entries, when available

* `prev` - `GET` points to the previous page of entries, when available

#### Cancelling a running Enrichment Request

**Request**

You can cancel an enrichment request that's still running by sending a `PATCH` request:

```js theme={null}
PATCH /companies/enrichment-requests/1 HTTP/1.1
Content-Type: application/json

{
  "status": "canceled"
}
```

```bash theme={null}
curl -X PATCH https://api.amplemarket.com/companies/enrichment-requests/{{id}} \
	-H "Authorization: Bearer {{API Key}}" \
	-H "Content-Type: application/json" \
	-d '{"status": "canceled"}'
```

Only `"status"` is supported in this request, any other field will be ignored.

**Response**

The response will display any available results up until the point the enrichment request was canceled.

```js theme={null}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "object": "company_enrichment",
  "status": "canceled",
  "results": [
    {
      "id": 1,
      "linkedin_url": "https://www.linkedin.com/company/company-1",
      "status": "enriched",
      "result": {
        "id": "eec03d70-58aa-46e8-9d08-815a7072b687",
        "object": "company",
        "name": "A Company",
        "website": "https://company.com",
        "linkedin_url": "https://www.linkedin.com/company/company-1",
        "estimated_number_of_employees": 500,
        "size": "201-500 employees",
        "industry": "Software Development",
        "location": "San Francisco, California, US",
        "is_b2b": true,
        "is_b2c": false
      }
    }
  ],
  "_links": {
    "self": {
      "href": "/companies/enrichment-requests/1"
    },
    "next": {
      "href": "/companies/enrichment-requests/1?page[size]=100&page[after]=1"
    }
  }
}
```

If the results contain more than 100 entries, then pagination is required to traverse them all and can be done using the links such as: `response._links.next.href`  (e.g. `GET /companies/enrichment-requests/1?page[size]=100&page[after]=1`).

**Links**

* `self` - `GET` points back to the same object

* `next` - `GET` points to the next page of entries, when available

* `prev` - `GET` points to the previous page of entries, when available
