Count Polish Companies
count_companiesCount KRS companies matching given filters. Returns a single number — no company list. Does not count JDG in this tool (full CEIDG is in Compabase; listing is RODO-gated). Sparse or zero counts in JDG-dominated PKDs include a hint.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "count_companies"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| krs | No | KRS registry number. | |
| nip | No | NIP tax number. | |
| pkd | No | Primary PKD code prefix, e.g. '46.90.Z' or '46'. | |
| city | No | City name — KRS uses uppercase. | |
| name | No | Company name fragment (case-insensitive). Matches display name and full KRS name; legal-form suffixes like 'sp. z o.o.' are ignored. | |
| year | No | Filter to companies whose latest financial_period_to falls within this calendar year. Use only for sector/ranking browse — omit when looking up a company by name, KRS, or NIP. | |
| naics | No | Detailed industry: NAICS 6-digit codes, comma-separated (any of them), e.g. '541511,541512'. AI classification of what the company actually does. | |
| niche | No | Detailed industry in words (Polish, English or German), matched against the company's niche, e.g. 'opakowania', 'software house', 'catering', 'Verpackungen'. | |
| county | No | County / powiat (lowercase). | |
| region | No | Voivodeship (lowercase). | |
| all_pkd | No | Match any PKD code in the company's activity list (not just primary). | |
| service | No | Service the company offers (Compabase services dictionary, from company websites): service name in Polish/English/German, e.g. 'księgowość', 'heat pumps', or slugs from compabase.com/services, comma-separated (any of them). | |
| has_email | No | true = only companies with email on record. Omit otherwise. | |
| is_active | No | true = active only, false = closed only. Omit for all. | |
| ebitda_max | No | Maximum EBITDA in PLN. | |
| ebitda_min | No | Minimum EBITDA in PLN. | |
| legal_form | No | Legal form fragment. | |
| profit_max | No | Maximum net profit in PLN. | |
| profit_min | No | Minimum net profit in PLN. | |
| capital_max | No | Maximum share capital in PLN. | |
| capital_min | No | Minimum share capital in PLN. | |
| has_website | No | true = only companies with website on record. Omit otherwise. | |
| revenue_max | No | Maximum total revenue in PLN. | |
| revenue_min | No | Minimum total revenue in PLN. | |
| family_business | No | true = family business (people with the same surname hold ≥50%). | |
| total_assets_max | No | Maximum total assets in PLN. | |
| total_assets_min | No | Minimum total assets in PLN. | |
| estimated_value_max | No | Maximum Ohlson estimated equity value in PLN. | |
| estimated_value_min | No | Minimum Ohlson estimated equity value in PLN. | |
| ownership_structure | No | Ownership: pl_independent = Polish company controlled by individuals; pl_group = part of a Polish group (a Polish company holds ≥50%); foreign_group = foreign shareholders ≥50% or foreign parent (GLEIF / CRBR). | |
| profit_operating_max | No | Maximum operating profit in PLN. | |
| profit_operating_min | No | Minimum operating profit in PLN. | |
| registration_date_max | No | Latest KRS registration date, YYYY-MM-DD (inclusive). | |
| registration_date_min | No | Earliest KRS registration date, YYYY-MM-DD (inclusive). For newly registered companies use today's date for both registration_date_min and registration_date_max. |