> For the complete documentation index, see [llms.txt](https://docs.coresignal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coresignal.com/company-data/api/bulk-collect.md).

# Bulk Collect: Company API

Retrieve multiple company data records in batches using the Bulk Collect API.

## Overview

Discover the Bulk Collect (Bulk API) capabilities and explore potential uses for efficiently retrieving company 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.md">Bulk Collect</a></td></tr><tr><td>Credits</td><td><a href="/api-introduction/credits.md#credits-in-bulk-collect-requests">Credits</a></td></tr></tbody></table>

## Endpoints

| Endpoint                                                                                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------- |
| POST [*/v2/data\_requests/company\_multi\_source/ids*](/company-data/api/bulk-collect/post-requests.md#ids-requests)                   |
| POST [*/v2/data\_requests/company\_multi\_source/es\_dsl*](/company-data/api/bulk-collect/post-requests.md#elasticsearch-dsl-requests) |
| 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/company_multi_source/es_dsl` endpoint.

**Request example to retrieve five records**

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

```json
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/data_requests/company_multi_source/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": [
                {
                    "query_string": {
                        "query": "(3D printing) OR (3D printing service) OR (Lead generation)",
                        "default_field": "description",
                        "default_operator": "and"
                    }
                }
            ]
        }
    }
}'
```

{% endcode %}

## Rate limits

Bulk Collect endpoints have a limited number of requests allowed per second. Learn about [rate limits](/api-introduction/rate-limits.md) for Bulk Collect requests.

## 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="Elasticsearch DSL template" %}
{% code title="Elasticsearch DSL template" %}

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

{% endcode %}
{% endtab %}

{% tab title="IDs cURL template" %}

```json
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/data_requests/company_multi_source/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coresignal.com/company-data/api/bulk-collect.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
