# POST Requests: Clean Company API

{% columns %}
{% column width="16.666666666666664%" %}
Data type:

URLs:
{% endcolumn %}

{% column %}
Clean Company

<https://api.coresignal.com/cdapi/v2/data\\_requests/company\\_clean/es\\_dsl\\>
<https://api.coresignal.com/cdapi/v2/data\\_requests/company\\_clean/ids\\>
<https://api.coresignal.com/cdapi/v2/data\\_requests/company\\_clean/shorthand\\_names\\>
<https://api.coresignal.com/cdapi/v2/data\\_requests/company\\_clean/urls>
{% endcolumn %}
{% endcolumns %}

***

## Overview

Bulk Collect features three POST endpoints, making collecting company data records in bulk easier.

{% hint style="danger" %}
Before you proceed with your Bulk Collect requests, test them in the Clean Company API first to avoid any unexpected costs.
{% endhint %}

Find step-by-step guides for making Bulk Collect POST requests in the following topic:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Bulk Collect POST requests guides</td><td><a href="../../../../api-introduction/requests/bulk-collect">bulk-collect</a></td></tr></tbody></table>

## Elasticsearch DSL requests

Use the endpoint `/v2/data_requests/company_clean/es_dsl` to request company data in bulk using our Elasticsearch DSL schema:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Clean Company API Elasticsearch DSL schema</td><td><a href="../../elasticsearch-dsl#elasticsearch-schema">#elasticsearch-schema</a></td></tr></tbody></table>

### Endpoint usage example

{% code title="Example request" %}

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/data_requests/company_clean/es_dsl' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "limit": {optional_integer},
  "webhook_url": "{optional_webhook_url}",
  "es_dsl_query": '{
   "query":{
      "bool":{
         "must":[
            {
               "query_string":{
                  "query":"2023",
                  "default_field":"founded",
                  "default_operator":"and"
               }
            }
         ]
      }
   }
}'
```

{% endcode %}

* Retrieve the `request ID` from the response body:

{% code title="Request ID" %}

```json
{
  "request_id": "433869ec-0a98-4dcd-9b13-db4df58260f5"
}
```

{% endcode %}

* `Location` response header provides a URL where the results can be retrieved.

> Location: /v2/data\_requests/e000b0ec-0f00-0b00-0a0a-0b00fa0000d0/files

***

## IDs requests

Use the endpoint `/v2/data_requests/company_clean/ids` to submit a list of IDs to request company data in bulk.

### Endpoint usage example

{% code title="cURL request" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/company_clean/ids' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: multipart/form-data' \
  -d '{
  "limit": {optional_integer},
  "webhook_url": "{optional_webhook_url}",
  "ids": [
    1,
    222,
    3456
  ]
}'
```

{% endcode %}

* Retrieve the `request_id` from the response body:

{% code title="Request ID" %}

```json
{
  "request_id": "433869ec-0a98-4dcd-9b13-db4df58260f5"
}
```

{% endcode %}

* `Location` response header provides a URL where the results can be retrieved.

> Location: /v2/data\_requests/e000b0ec-0f00-0b00-0a0a-0b00fa0000d0/files

***

## Shorthand names and URLs requests

You can send up to 10,000 `shorthand_names` or `URLs` per request. Requirements for `shorthand_names` are listed below:

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Shorthand names requirements</td><td><a href="../../../../../api-introduction/requests/bulk-collect/post-requests#shorthand-names-and-urls-requests">#shorthand-names-and-urls-requests</a></td></tr></tbody></table>

### Endpoint usage example

{% tabs %}
{% tab title="shorthand\_names" %}
{% code title="Example request for shorthand\_names" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/company_clean/shorthand_names' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
   "webhook_url": "{optional_webhook_url}",
   "shorthand_names": ": [
      "example-company",
      "company1",
      "example-corp"
      ]
   }'
```

{% endcode %}
{% endtab %}

{% tab title="URLs" %}
{% code title="Example request for urls" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/company_clean/urls' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
   "webhook_url": "{optional_webhook_url}",
   "urls": [
      "https://www.linkedin.com/company/example-company",
      "https://www.linkedin.com/company/company1",
      "https://www.linkedin.com/company/example-corp"
      ]
   }'
```

{% endcode %}
{% endtab %}
{% endtabs %}

* Retrieve the request ID from the response body:

{% code title="Request ID" %}

```json
{
  "request_id": "433869ec-0a98-4dcd-9b13-db4df58260f5"
}
```

{% endcode %}

* `Location` response header provides a URL where the results can be retrieved.

> Location: /v2/data\_requests/e000b0ec-0f00-0b00-0a0a-0b00fa0000d0/files

## Following steps

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Make GET requests to download the data</td><td><a href="../../../../api-introduction/requests/bulk-collect/get-requests">get-requests</a></td></tr></tbody></table>
