Counting results
How to count the jobs or companies that match a search, exactly and without getting the records, through the API or the MCP, and what a count costs in credits.
Two endpoints tell you how many records match a search, counted over every match, without returning any record. Use them to size a market, compare filters or check that a search finds something before you pay for the records:
- Count Jobs (
POST /v1/jobs/search/count) returns how many jobs match and how many companies they belong to. - Count Companies (
POST /v1/companies/search/count) returns how many companies match.
Each one takes the same filters as Job Search or Company Search. Send the body you would send to the search, and you get the totals back.
How exact is a count?
A count reads every record that matches your filters. It isn't capped or extrapolated from a sample, so a search with 2 million matching jobs returns 2 million, not "10,000+".
- Job counts are exact.
total_jobsis the number of distinct jobs that match, andtotal_companiesthe number of distinct companies they belong to. - Company counts are approximate. Counting distinct companies uses an approximate distinct count, which keeps large counts fast. On large totals the result can differ slightly from the exact number.
What it costs
A count consumes 1 API credit when at least one record matches, whatever the total, and nothing when no record matches. Job and company counts cost the same. You can make up to 60 counts a minute.
The totals you see in the TheirStack app are free.
Counting from an AI agent
Through TheirStack's MCP server, the count_jobs and count_companies tools do the same, at the same price. Ask your agent for a count ("How many companies in Germany use Snowflake?") and it calls them instead of running a search.
Getting the totals with your results
When you also want the records, set include_total_results to true on the search, and the response carries total_results and total_companies next to the page of results. It reads every match, so it makes the search slower. Send it on the first page only.
A search with limit: 0 is refused, because limit must be at least 1. To get only the totals, call the count endpoint instead.
See credits for what each action costs across endpoints.
How is this guide?
Last updated on
Rate Limit
Discover how TheirStack API rate limits work across free and paid tiers, with fixed windows, IETF-compliant headers, and retry best practices.
Preview data mode (deprecated)
Preview data mode returns blurred job and company results without consuming credits. It is deprecated and only available to sales intelligence software that previews data before unlocking it.
