# Bulk Collect: Base Employee API

## Overview

Discover the Bulk Collect (Bulk API) capabilities and explore potential uses for efficiently retrieving employee data in batches. Find all Bulk Collect related information 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>General information about Bulk Collect</td><td><a href="../../../api-introduction/requests/bulk-collect">bulk-collect</a></td></tr></tbody></table>

## Endpoints

Bulk Collect (Bulk API) is an extension of Base Employee API and includes **five POST** and **two GET** endpoints.

Collect employee data in bulk using an employee ID list, search filters, or Elasticsearch DSL schema that is already used in the Base Employee API.

| Request type | Endpoint                                                    |
| ------------ | ----------------------------------------------------------- |
| POST         | */v2/data\_requests/employee\_base/ids*                     |
| POST         | */v2/data\_requests/employee\_base/es\_dsl*                 |
| POST         | */v2/data\_requests/employee\_base/filter*                  |
| POST         | */v2/data\_requests/employee\_base/shorthand\_names*        |
| POST         | */v2/data\_requests/employee\_base/urls*                    |
| GET          | */v2/data\_requests/{data\_request\_id}/files*              |
| GET          | */v2/data\_requests/{data\_request\_id}/files/{file\_name}* |

### Limiting returned record count

Include the parameter `"limit": int` to control the number of records returned by your queries in `/v2/data_requests/employee_base/filter` and `/v2/data_requests/employee_base/es_dsl` endpoints.

**Request example to retrieve five records**

{% tabs %}
{% tab title="Search filters example" %}

<pre class="language-json" data-title="Search filters"><code class="lang-json">curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/employee_base/filter' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "webhook_url": "{optional_webhook_url}",
  "limit": 5,
<strong>  "filters": {
</strong>      "title": "CSO",
      "location": "United States",
      "industry": "Information Technology"
      }
}'
</code></pre>

{% endtab %}

{% tab title="Elasticsearch DSL example" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/employee_base/es_dsl' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "webhook_url": "{optional_webhook_url}",
  "limit": 5,
  "es_dsl_query": {
   "query":{
      "bool":{
         "must":[
            {
               "match":{
                  "title":{
                     "query":"Developer",
                     "operator":"and"
                  }
               }
            },
            {
               "match":{
                  "location":{
                     "query":"United States",
                     "operator":"and"
                  }
               }
            },
            {
               "nested":{
                  "path":"member_experience_collection",
                  "query":{
                     "bool":{
                        "must":[
                           {
                              "query_string":{
                                 "query":"IT Company",
                                 "default_field":"member_experience_collection.company_name",
                                 "default_operator":"and"
                              }
                           }
                        ]
                     }
                  }
               }
            }
         ]
      }
   }
}
}'
```

{% endtab %}
{% endtabs %}

## Credits

Your credits for Base Employee API will also apply to Bulk Collect data collection requests.

Learn about the credits in Bulk Collect usage in the [general Bulk Collect](https://docs.coresignal.com/api-introduction/requests/bulk-collect#credits) topic.

## Rate limits

Bulk Collect endpoints have limited requests allowed per second. Learn about rate limits in Bulk Collect usage in the main [Base Employee API](https://docs.coresignal.com/employee-api/base-employee-api/..#rate-limits) topic.

## Webhooks

POST endpoints allow you to add webhooks and get notified when your data request is ready.

{% hint style="info" %}
Keep in mind that `webhook_url` is **optional.**
{% endhint %}

{% tabs %}
{% tab title="Search filter template" %}
{% code title="Search filter template" %}

```json
{
  "webhook_url": "{optional_webhook_url}",
  "filters": {}
}
```

{% endcode %}
{% endtab %}

{% tab title="Elasticsearch DSL template" %}
{% code title="Elasticsearch DSL template" %}

```json
{
  "webhook_url": "{optional_webhook_url}",
  "es_dsl_query": {}
}
```

{% endcode %}
{% endtab %}

{% tab title="IDs template" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/employee_base/ids' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: multipart/form-data' \
  -F 'webhook_url={optional_webhook_url}' \
  -F 'ids={list of ids}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coresignal.com/employee-api/base-employee-api/endpoints/bulk-collect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
