Skip to main content
The API supports two patterns for working with many companies at once.

Batch endpoints

Several endpoints take an array of company identifiers in a single request:
EndpointBody shapeWhen to use
POST /v2/companies/batchArray of CRNsUp to a few thousand companies β€” fetch details in one call.
POST /v2/companies/checkArray of CRNsCheck which exist; lightweight existence check.
POST /v2/companies/by-website/batchArray of URLsResolve many websites at once.
These are the preferred path for β€œI have a list of N items, give me data for all of them” workflows.

Company-number sets β€” for very large lists

Above roughly 10,000 CRNs (and certainly above 50,000), packing them inline into every POST /v2/companies request becomes wasteful: each call re-sends the same big JSON array. Instead, upload the list once as a set, get a setId, and reference it from filter requests.

Upload a set

# Plaintext body, one CRN per line, UTF-8.
curl -X POST 'https://product-api.thedatacity.com/api/v2/company-number-sets' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: text/plain' \
  --data-binary $'12345678\n87654321\n11223344\n'
Response:
{
  "setId": "set_abc123",
  "count": 3,
  "expiresAt": "2026-05-19T10:23:00Z"
}
Sets expire after roughly 24 hours. Call DELETE /v2/company-number-sets/{setId} to remove one early.

Use a set in filter requests

curl -X POST 'https://product-api.thedatacity.com/api/v2/companies' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
        "returnCount": 1000,
        "CompanyNumberSetId": "set_abc123",
        "AllowLargeAnalysis": true
      }'
When CompanyNumberSetId is set, omit CompanyNumbers β€” the API ignores it and the JSON stays small.

Gzip the upload

For very large bodies, gzip the request body:
gzip -c crns.txt | curl -X POST 'https://product-api.thedatacity.com/api/v2/company-number-sets' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: text/plain' \
  -H 'Content-Encoding: gzip' \
  --data-binary @-

Error shapes

HTTPMeaning
400Malformed body (empty, non-UTF-8, bad CRNs).
429TooManyConcurrentSets or TooManyCompanyNumbers.
See Errors for the wider envelope and Rate limits for the throttle behaviour.

Picking the right path

WorkloadBest path
< 1000 companies, one-offInline CompanyNumbers array
1000–10k companies, repeated callsInline CompanyNumbers array
10k–50k companiesEither inline or set (set is cheaper if you re-use it)
> 50k companiesUpload a set, reference by setId
Last modified on May 19, 2026