Count Companies
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#
| Field | Meaning |
|---|---|
total | Companies matching the filters. Exact — this is the number Search cannot give you above 10,000. |
saved | How many of those your workspace has saved to a list or already exported. |
total_relation | Always eq today. Present so a future approximate count can say so rather than lie. |
saved_relation | Always 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.
{
"total": 124197,
"total_relation": "eq",
"saved": 318,
"saved_relation": "eq"
}Why this exists#
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:
| Code | Status | When |
|---|---|---|
MISSING_AUTH_HEADER | 401 | No Authorization header sent. |
INVALID_TOKEN | 401 | Token not found or revoked. |
| — | 422 | A filter failed validation — the body names the field. |