Company API
Endpoints

Bulk Collect

14min

Discover the Bulk Collect (Bulk API) capabilities and explore potential uses for efficiently retrieving company data in batches.

Endpoints

Bulk Collect is an extension of Company API and includes three POST and two GET endpoints.

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

Function

Endpoint

POST

/v1/professional_network/company/bulk_collect/id_file

POST

/v1/professional_network/company/bulk_collect/filter

POST

/v1/professional_network/company/bulk_collect/es_dsl

GET

/v1/bulk_collect/{data_request_id}/files

GET

/v1/bulk_collect/{data_request_id}/files/{file_name}

Credits and tokens

Use the same token you have received for your Company API usage. Your credits for Company API will also apply to Bulk Collect data collection requests.

The credits are deducted after making the POST request.

The number of credits deducted from your account depends on the data records you download. For instance, collecting 100 profiles will consume 100 credits.

Test POST requests using Company API to see how many credits the request will consume.

The returned record count will show how many credits will be deducted for the Bulk Collect query.

If you don't have enough credits, the request in the /v1/bulk_collect/{data_request_id}/files endpoint will return the error 402and the following response:

Insufficient credits


We validate your search and Elasticsearch POST requests in Bulk Collect to prevent the submission of duplicate requests. If you happen to submit duplicate POST requests using search or Elasticsearch filters, you will see the following error message:

409


Limiting returned record count

Include the parameter "limit": int to control the number of records returned by your queries in /v1/professional_network/company/bulk_collect/filter and /v1/professional_network/company/bulk_collect/es_dsl endpoints. This parameter is entirely optional; however, use it to make sure you don't use too many credits with your Bulk Collect queries.

Input the exact number of records you want returned, or delete the parameter if you don't need a set limit for your request.

General request template with the included parameter:

Filters
ES DSL


The following request will return exactly five records:

Filters
ES DSL


Every search and collect response contains an X-Credits-Remaining header that shows the number of credits left in your account.

You can find the credit balance by clicking Headers in the Postman application.

Document image


Example of remaining credits header:

JSON


Authorization

To start using our API, you need a (JWT) token. Your account manager or sales will generate the token for you upon your request for the API plan.



All Bulk Collect requests must contain an Authorization header consisting of a Bearer authentication string and the JSON Web Token (JWT).

Python
Ruby
Node.js
PHP


All Company API requests must be made over HTTPS. Requests made over HTTP will fail.

Use any API-compatible tool to authorize and start using the API. If you're unsure where to begin, check out the cURL authorization tutorial:

Rate limits

Bulk Collect endpoints have limited requests allowed per client's API token per second.

Function

Endpoint

Rate limit

POST

/v1/professional_network/company/bulk_collect/id_file

27 requests per second

POST

/v1/professional_network/company/bulk_collect/filter

27 requests per second

POST

/v1/professional_network/company/bulk_collect/es_dsl

27 requests per second

GET

/v1/bulk_collect/{data_request_id}/files

27 requests per second

GET

/v1/bulk_collect/{data_request_id}/files/{file_name}

27 requests per second

Webhooks

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

Filter template
ES DSL template
ID file cURL template


Keep in mind that the webhook_url parameter is optional.

Bulk Collect Requests

Check the endpoint usage tutorials in the following articles:



Updated 16 Sep 2024
Did this page help you?