Call it
curl https://api.peume.com/v1/call/count-companies \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"ai_prompt": "Software companies in Canada",
"filter_expression": "headquarters_country_name=Canada"
}
}'const res = await fetch("https://api.peume.com/v1/call/count-companies", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"ai_prompt": "Software companies in Canada",
"filter_expression": "headquarters_country_name=Canada"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/count-companies",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"ai_prompt": "Software companies in Canada",
"filter_expression": "headquarters_country_name=Canada"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: count-companies.
Parameters
ai_promptstringExample: Software companies in Canada
filter_expressionstringExample: headquarters_country_name=Canada
filtersarrayOther ways to do it
Same job, other sources, cheapest first.
Count a company searchCount the companies matching name, domain, headcount, industry, location and technology filters.Count companies a search would returnCount the companies that match a company search's filters, free, before paying for pages.Count companies matching a filter (free)Returns the total count of companies matching the given search criteria without retrieving the actual resultsCount companies matching a search (free)How many companies match a query, before you pay to read any of themCount lookalike companies for a seed (free)Returns the total count of similar companies matching the given search criteria without retrieving the actual resultsCount matching companiesCount companies matching search filters without returning records.
