Skip to main content
CornectAPI Docsv1
Sign inGet an API tokenGet started free

Count Companies

POST/api/v1/companies/counts

Exact match count for a set of filters, without fetching results. Takes the same filter body as Search Companies. Use it when you need the real size of a result set — Search's own total stops at 10,000.

Authentication#

Requires a token with the read scope, sent as Authorization: Bearer cornect_….

Request#

This endpoint takes no parameters.

Identical to the body of POST /api/v1/companies/search, minus the paging fields (cursor, limit). Every filter behaves the same way here as it does there.

Response#

FieldMeaning
totalCompanies matching the filters. Exact — this is the number Search cannot give you above 10,000.
savedHow many of those your workspace has saved to a list or already exported.
total_relationAlways eq today. Present so a future approximate count can say so rather than lie.
saved_relationAlways eq, same reasoning.

Responses may also carry the same soft-signal fields as Search — keyword_phrases_collapsed, news_too_broad and the rest. They mean the same thing here, and a count returned alongside one of them needs reading in that light.

json
{
  "total": 124197,
  "total_relation": "eq",
  "saved": 318,
  "saved_relation": "eq"
}

Why this exists#

Search's total stops at 10,000

POST /companies/search reports total through a bounded count that saturates at 10,000, so a search matching 800,000 companies and one matching 10,000 look identical. This endpoint counts exactly and does not fetch rows, so it stays cheap at any size.

Counting is free and uses the read scope. It charges no credits — credits are only spent on exports.

Code samples#

curl -X POST https://api.cornect.io/api/v1/companies/counts \
  -H "Authorization: Bearer cornect_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"query":"fintech","countries":["United States"]}'

Errors#

See Errors for the full table. Codes you're most likely to see here:

CodeStatusWhen
MISSING_AUTH_HEADER401No Authorization header sent.
INVALID_TOKEN401Token not found or revoked.
422A filter failed validation — the body names the field.

Interactive reference#

Loading interactive reference