# Compabase — Full Documentation for LLMs > Intelligent Polish company data — search, profiles, export, REST API, MCP, and AI assistant. > This file contains complete API and MCP reference. For a concise overview see https://compabase.com/llms.txt Compabase is a B2B analytics platform aggregating, normalizing, and serving structured business information from public Polish registries (KRS, CEIDG, e-Financial Statements, VAT whitelist, GPW, SUDOP, BZP, TED, URE, BDO, KREPTD/GITD, CRBR, KRZ, MSiG, FE, FTS). - Website: https://compabase.com - API docs (Redoc): https://compabase.com/docs/ - MCP docs (Redoc): https://compabase.com/docs/mcp/ - OpenAPI spec: https://compabase.com/openapi/v1.yaml - MCP OpenAPI spec: https://compabase.com/openapi/mcp.yaml - Pricing: https://compabase.com/pricing --- ## 1. Platform Overview Compabase lets users verify contractors, assess risk, and find reliable business partners based on current registry and financial data of Polish entities. It is informational/analytical only (not legal or financial advice). Key differentiator: ultra-detailed, structured data from financial statements (full balance sheet and income statement positions parsed from e-SF/ESEF XML files), with computed ratios, narrative insights, and Sankey flow charts. ### Key Features | Feature | Description | |---------|-------------| | Search & Browse | Full-text search and filters: keywords, PKD (primary or any), location (city, county, voivodeship, postal code), legal form, status (active/closed), email/website presence, financial filters (revenue, profit, assets, EBITDA, capital, estimated value) in PLN/USD/EUR. | | Company Profile | Registry data, address, legal forms, PKD activities, people (board, shareholders, proxies), ownership structure, connections, financial documents, full financial metrics per period. Accessible by KRS, entity_id, or NIP (CEIDG). | | Financial Data | Ultra-detailed balance sheet and income statement positions parsed from XML e-SF (all entity types), ratios (ROA, ROE, margins, liquidity, EBIT/EBITDA), currency conversions (PLN/USD/EUR). | | Sankey Chart + Insights | Financial flow visualization (revenue → costs → result) and auto-generated factual analytical insights per year. | | CSV/XLS Export | Filter and export structured company data. Billed per plan (Stripe payments). | | REST API v1 | Public, versioned API (key authentication). Company search/count, full profiles by KRS, financial statements, GPW quotes, people/connections, watchlist. | | MCP Server | Model Context Protocol (Streamable HTTP, JSON-RPC 2.0) for AI agents: full server with an MCP key, plus no-key OAuth connectors for Claude, ChatGPT, Gemini, Perplexity and others, and topic servers (financials, KYB, tenders). See section 5. | | AI Assistant ("Ask AI") | Chat answering questions about company data; model automatically uses MCP tools. Embeds Sankey charts and connection graphs. Does not train on user data. | | Watchlist | Track companies and monitor changes (limit depends on plan). | | Self-service Profile Edit | Authorized person can update company data (UGC layer, does not modify registry). | ### Access Modes 1. **Web browsing** — search and browse company profiles at compabase.com 2. **REST API v1** — versioned JSON API with API key authentication 3. **MCP server** — Model Context Protocol for AI agents (key or OAuth connectors) 4. **AI assistant** — chat interface with tool-calling 5. **Data export** — CSV/XLS structured datasets 6. **Webhooks** — watchlist change notifications ### Product Pages - https://compabase.com/companies — search and browse companies (filters, column picker, export) - https://compabase.com/industries — industries / PKD statistics and rankings - https://compabase.com/chat — Ask AI — this assistant - https://compabase.com/watchlist — watchlist: track companies, change notifications - https://compabase.com/market-monitoring — company monitoring (clients, competitors) - https://compabase.com/prospecting — B2B prospecting lists (new companies, fastest growing, tender contractors, public tenders) - https://compabase.com/due-diligence — contractor verification, links, debtors/insolvency, financial statements - https://compabase.com/public-tenders — public tenders (BZP / TED) - https://compabase.com/gpw-market-map — Warsaw Stock Exchange market map - https://compabase.com/data-automation — REST API, MCP and webhooks for CRM/automation - https://compabase.com/integrations — REST API keys (tab api), MCP keys (?tab=mcp), BYOK AI keys (?tab=ai) - https://compabase.com/pricing — plans, prices and limits; upgrade - https://compabase.com/settings — account settings: language, currency, theme - https://compabase.com/settings/notifications — watchlist e-mail notifications, notification address, webhook URL and signing secret - https://compabase.com/settings/billing — the user's plan, monthly limits and usage - https://compabase.com/settings/invoices — the user's invoices and corrections as PDF - https://compabase.com/docs/ — REST API reference (Redoc) - https://compabase.com/docs/mcp/ — MCP reference (Redoc) - https://compabase.com/status — data sources and platform status - https://compabase.com/roadmap — roadmap - https://compabase.com/contact — contact form (contact@compabase.com) --- ## 2. Data Sources | Source | Coverage | Last updated | Status | |--------|----------|--------------|--------| | Registry data (KRS) | Register of Entrepreneurs of the National Court Register (KRS) maintained by commercial divisions of district courts. | 2026-11-27 | operational | | Registry data (CEIDG) | Central Register and Information on Economic Activity (CEIDG) for sole traders maintained by the Ministry of Economic Development and Technology. | 2026-11-28 | operational | | Financial statements (RDF) | Financial Documents Repository (RDF) of the Ministry of Justice and structured XML e-Financial Statements (Ministry of Finance). | 2026-11-27 | operational | | VAT taxpayer whitelist | Register of VAT-registered entities (White List) maintained by the Head of the National Revenue Administration (Ministry of Finance). | 2026-11-27 | operational | | National Debtor Register (KRZ) | National Register of Debtors (KRZ) maintained by the Ministry of Justice for insolvency, bankruptcy, and restructuring proceedings. | 2026-11-27 | operational | | Public aid (SUDOP) | Public Aid Information System (SUDOP) maintained by the Office of Competition and Consumer Protection (UOKiK). | 2026-11-27 | operational | | Public procurement (BZP) | Public Procurement Bulletin (BZP) maintained by the Public Procurement Office – domestic Polish public tenders and contracts. | 2026-11-27 | operational | | Public procurement (TED) | Tenders Electronic Daily (TED) – supplement to the Official Journal of the EU for public contracts above EU threshold values. | 2026-11-27 | operational | | Central Register of Beneficial Owners (CRBR) | Central Register of Beneficial Owners (CRBR) maintained by the Ministry of Finance under anti-money laundering (AML) regulations. | 2026-11-27 | operational | | Court and Commercial Gazette (MSiG) | Court and Commercial Gazette (MSiG) – official nationwide gazette published by the Ministry of Justice. | 2026-11-27 | operational | | Registry Files Repository (RAR) | Registry Files Repository (RAR) – digitized court registry file dockets maintained by commercial courts. | 2026-11-27 | operational | | Energy concessions (URE) | Concessions and energy enterprises registers maintained by the Energy Regulatory Office (URE). | 2026-11-27 | operational | | Financial supervision (KNF) | Financial market registries and public warnings list maintained by the Polish Financial Supervision Authority (KNF). | 2026-11-27 | operational | | Waste and packaging (BDO) | Database on Products, Packaging and Waste Management (BDO) maintained by voivodeship marshal offices. | 2026-11-27 | operational | | Road transport licences (GITD) | National Electronic Register of Road Transport Undertakings (KREPTD) kept by the General Inspectorate of Road Transport, retrieved through the register's public API. | 2026-11-28 | operational | | Warsaw Stock Exchange (GPW) | Market trading data and quotes of the Warsaw Stock Exchange (WSE Main Market, NewConnect alternative trading system). | 2026-11-27 | operational | | Sanctions lists (EU, UN, US, UK, MSWiA) | The set of sanctions lists of the European Union, the UN Security Council, the United States (incl. the Treasury SDN list), the United Kingdom (FCDO) and the Polish Ministry of the Interior (MSWiA), refreshed daily (about 40,000 entries) | 2026-11-27 | operational | | Politically exposed persons (PEP) | The set of politically exposed persons (PEP) lists – members of the Polish Sejm from all terms, holders of public office from Wikidata and board and supervisory board members of State Treasury companies from the KRS register | 2026-11-27 | operational | | Corporate groups (GLEIF, LEI register) | The global Legal Entity Identifier (LEI) register run by the GLEIF foundation – over 3 million companies worldwide with parent–subsidiary relationships, supplemented with foreign shareholders from the KRS register matched to the LEI register | 2026-11-27 | operational | | CIT return data (Ministry of Finance) | Individual CIT return data published yearly by the Minister of Finance (art. 27b of the CIT Act) – taxpayers with revenue above EUR 50 million, tax capital groups and real estate companies, since 2020. For each year we use the latest Ministry publication (earlier years are sometimes corrected). EUR and USD amounts at the annual average rate. | 2026-11-27 | operational | | Public benefit organisations and 1.5% of tax (NIW, MF) | The list of public benefit organisations eligible for 1.5% of personal income tax kept by the National Freedom Institute (updated continuously), and the 1% / 1.5% amounts transferred to organisations by tax offices since 2019 (Ministry of Finance, annexes to the yearly report). The Ministry reports taxpayer counts in thousands. | 2026-11-27 | operational | | Pharmacies (Pharmacy Register) | The Pharmacy Register – the national register of permits for community pharmacies, pharmacy points and hospital pharmacies (e-Health Centre), full export downloaded daily. Pharmacies are linked to a company by the owner's NIP / KRS. Names of pharmacy managers are not stored. | 2026-11-26 | operational | | Educational institutions (RSPO) | The Register of Schools and Educational Institutions (RSPO, Ministry of Education), full export downloaded daily. Institutions are linked to a company by the REGON / NIP of the running body. Institutions run by local governments and ministries are not shown on profiles. Names of school heads are not stored. | 2026-11-26 | operational | | Central Register of Contracts (CRU) | The Central Register of Contracts of Public Finance Sector Units (CRU JSFP) run by the Polish Minister of Finance – contracts signed by ministries, municipalities, schools, hospitals and other public bodies since 1 July 2026. | 2026-11-28 | operational | | National Health Fund contracts (NFZ) | The National Health Fund (NFZ) contracts register – NFZ contracts with healthcare providers (hospitals, clinics, practices, pharmacies, rehabilitation) since 2008. | 2026-11-27 | operational | | Company websites | Data read directly from company websites: opening hours, branches and outlets, offer (CPV divisions and short product and service names), certifications mentioned on the site (e.g. ISO 9001, HACCP, FSC), website technology (CMS, shop platform, payments, analytics) and the clients and partners the site links to. Websites are re-read about every 90 days. | 2026-11-28 | operational | | NFZ waiting lists | NFZ waiting lists from the "Terminy leczenia" API – queues for specialist clinics, diagnostics (e.g. MRI, CT), procedures and hospital wards at every facility with an NFZ contract, with a forecast waiting time. Refreshed daily. | 2026-11-28 | operational | | Real estate and land registers | Company real estate from e-financial statement balance sheets (land, buildings, investment property) and mortgaged properties with land register (KW) numbers taken from the notes. | 2026-11-28 | operational | | Trademarks (Polish Patent Office) | The trademark register of the Polish Patent Office – applications and registrations published in the Office's Bulletin (BUP) and News (WUP), since the 1990s. | 2026-11-27 | operational | | National Appeal Chamber rulings (KIO) | Rulings of the National Appeal Chamber (KIO) in public procurement disputes – judgments and orders from the Public Procurement Office search, since 2007. | 2026-11-27 | operational | | Job offers (CBOP) | The Central Job Offers Database (CBOP) of the Polish Ministry of Family, Labour and Social Policy, refreshed daily, with offers registered with labour offices, including jobs abroad (EURES) | 2026-11-27 | operational | | European Funds (FE) | EU cohesion-fund projects of Polish beneficiaries (Ministry of Funds and Regional Policy project lists). | — | — | | EU Financial Transparency System (FTS) | European Commission grants and contracts (Horizon, LIFE, Erasmus+ and others). | — | — | | Train punctuality (PKP PLK) | Live departure/arrival delays of passenger rail carriers, aggregated on carrier profiles. | — | — | Live status and freshness of every dataset: https://compabase.com/status ### Financial Data Detail Parser recognizes statement variant by actual XML structure and maps positions to standardized columns: **Balance sheet:** fixed assets, current assets (with breakdown), cash and equivalents, receivables, inventories, equity, liabilities and provisions, total assets. **Income statement:** revenue from sales (products, goods/materials, change in product inventory), operating costs (by nature), external services, wages, amortization/depreciation, profit from sales, EBIT, gross profit, net profit, income tax. **Ratios:** ROA, ROE, net/operating/gross margins, current ratio, EBITDA (when amortization known); all in PLN/USD/EUR. **Arithmetic validation:** asset sum = liabilities+equity, cost breakdown sum, gross profit − tax ≈ net profit — checked before storage. **Narrative insights:** up to 3 factual analytical points per year (liquidity, profitability, balance sheet structure, YoY changes). --- ## 3. Plans and Limits Plans are billed via Stripe. Monthly limits reset every 30 days from billing start date. Prices depend on currency (selected by user or inferred from language: PL → PLN, DE → EUR, EN → USD). | Plan | PLN/month | USD/month | EUR/month | Export companies | API requests | AI analyses (Ask AI) | MCP queries | Watchlist | BYOK | |---|---|---|---|---|---|---|---|---|---| | Free | 0 PLN | $0 | €0 | 50 | 100 | 3 | 10 | 10 | no | | Pro | 99 PLN | $29 | €25 | 1,000 | 5,000 | 20 | 50 | 50 | yes | | Scale | 999 PLN | $279 | €239 | 20,000 | 100,000 | 300 | 1,000 | 1,000 | yes | | Enterprise | custom | custom | custom | custom | custom | custom | custom | custom | yes | Limits are monthly. Upgrade at https://compabase.com/pricing (Stripe). Enterprise: https://compabase.com/contact. --- ## 4. REST API v1 — Complete Reference ### General Information - **Base URL:** `https://compabase.com/api/v1/` - **Authentication:** header `X-API-Key: ` or `Authorization: Bearer ` - **API keys:** self-service at https://compabase.com/integrations (create a free account first) - **Authenticated requests** return contact email on company profiles when available ### Error Model ``` { "statusCode": 400, "statusMessage": "...", "message": "...", "data": { "error": { "code": "...", "message": "...", "details": { ... } } } } ``` The outer envelope (statusCode, statusMessage, message) is set by the Nitro server framework. The domain error object lives under `data.error` with a machine-readable `code`, a human-readable `message`, and optional `details`. **Error codes:** - `INVALID_KRS` — KRS must contain exactly 10 digits after normalization - `INVALID_NIP` — NIP must contain exactly 10 digits - `INVALID_CURSOR` — Cursor must be a valid UUID - `INVALID_RANGE` — numeric min > max - `INVALID_PARAMETER` — generic parameter validation error - `CONFLICTING_PARAMETERS` — mutually exclusive parameters supplied together (e.g. cursor + offset) - `INVALID_BOOLEAN` — invalid boolean value - `INVALID_KEYWORDS` — keyword token too short (<2 chars) - `INVALID_API_KEY` — missing, invalid, or revoked API key - `UNAUTHORIZED` — authentication failed - `NOT_FOUND` — resource not found - `QUOTA_EXCEEDED` — monthly quota exhausted ### Quota Accounting Each key is tied to the account plan and has a monthly `api_requests` limit that resets with the UTC calendar month. - Quota is consumed by authenticated `/api/v1` requests, except `GET /usage` - Requests failing before authentication (`401`) do not consume quota - Requests rejected because quota is exhausted (`429`) do not consume additional quota - Other authenticated responses including `200`, `400`, and `404` consume quota ### Bulk Pulls Use `GET /companies/export` (or `GET /companies` with `limit` up to 500) plus cursor pagination (`cursor` = last `entity_id`) to enrich large lists. Each page consumes one `api_requests` unit. For a full profile, call `GET /companies/krs/{krs}` once per company. --- ### All Endpoints (58, generated from the deployed routes) | Method & Path | Description | |---------------|-------------| | `GET /ceidg/nip/{nip}` | CEIDG profile by NIP | | `GET /ceidg/nip/{nip}/facilities` | Pharmacies and educational institutions (sole proprietorship) | | `GET /ceidg/nip/{nip}/market-environment` | Market environment of a sole proprietor's industry by NIP | | `GET /ceidg/nip/{nip}/nfz-queues` | NFZ waiting lists by NIP | | `GET /ceidg/nip/{nip}/procurement-counterparties` | Public procurement counterparties by NIP | | `GET /ceidg/nip/{nip}/transport-licenses` | Road transport licences (KREPTD) by NIP | | `GET /ceidg/nip/{nip}/website-facts` | Facts from the website by NIP | | `GET /companies` | Search and list companies | | `GET /companies/count` | Count companies for current filters | | `GET /companies/export` | Bulk company search export page | | `GET /companies/krs/{krs}` | Full company profile | | `GET /companies/krs/{krs}/articles` | Articles of association / statute | | `GET /companies/krs/{krs}/beneficiaries` | Beneficial owners (CRBR) | | `GET /companies/krs/{krs}/connections` | Company connections | | `GET /companies/krs/{krs}/corporate-tax` | Corporate income tax (CIT) data | | `GET /companies/krs/{krs}/court-gazette` | Court and Commercial Gazette notices (MSiG) | | `GET /companies/krs/{krs}/energy-licenses` | Energy concessions (URE) | | `GET /companies/krs/{krs}/eu-funds` | European Funds projects (FE) | | `GET /companies/krs/{krs}/eu-grants` | European Commission grants (FTS) | | `GET /companies/krs/{krs}/facilities` | Pharmacies and educational institutions | | `GET /companies/krs/{krs}/filing-timeliness` | Financial statement filing timeliness | | `GET /companies/krs/{krs}/financial-documents` | Financial document inventory | | `GET /companies/krs/{krs}/financial-licenses` | Financial supervision entries (KNF) | | `GET /companies/krs/{krs}/financial-statements` | Financial statements | | `GET /companies/krs/{krs}/gpw` | Warsaw Stock Exchange (GPW) | | `GET /companies/krs/{krs}/group` | Corporate group (GLEIF LEI register) | | `GET /companies/krs/{krs}/insolvency` | Insolvency and restructuring proceedings (KRZ) | | `GET /companies/krs/{krs}/market-environment` | Market environment of the company's industry | | `GET /companies/krs/{krs}/news` | Company news & UGC | | `GET /companies/krs/{krs}/nfz-contracts` | NFZ contracts | | `GET /companies/krs/{krs}/nfz-queues` | NFZ waiting lists | | `GET /companies/krs/{krs}/procurement-counterparties` | Public procurement counterparties | | `GET /companies/krs/{krs}/procurement-disputes` | Procurement disputes (KIO) | | `GET /companies/krs/{krs}/public-aid` | Public aid received (SUDOP) | | `GET /companies/krs/{krs}/public-benefit` | Public benefit organisation (OPP) and 1.5% of PIT | | `GET /companies/krs/{krs}/public-contracts` | Public contracts (CRU) | | `GET /companies/krs/{krs}/rail-punctuality` | Train punctuality (rail carriers) | | `GET /companies/krs/{krs}/real-estate` | Real estate (financial statements) | | `GET /companies/krs/{krs}/sanctions` | Sanctions and PEP screening | | `GET /companies/krs/{krs}/secured-liabilities` | Secured liabilities (mortgages and pledges) | | `GET /companies/krs/{krs}/statistics` | Peer statistics & rankings | | `GET /companies/krs/{krs}/status` | Legal status | | `GET /companies/krs/{krs}/structure-people` | Structure & People | | `GET /companies/krs/{krs}/tenders` | Public procurement of a company (BZP + TED) | | `GET /companies/krs/{krs}/trademarks` | Trademarks | | `GET /companies/krs/{krs}/transport-licenses` | Road transport licences (KREPTD) | | `GET /companies/krs/{krs}/waste-registry` | Waste and packaging register (BDO) | | `GET /companies/krs/{krs}/website-facts` | Facts from the company website | | `GET /health` | API v1 health | | `GET /news` | Latest company news feed | | `GET /persons/search` | Search persons by name | | `GET /persons/{personId}/connections` | Company connections for a person | | `GET /tenders` | Public tenders in Poland (BZP + TED) | | `GET /tenders/awards` | Largest recent contract awards | | `GET /usage` | Monthly quota usage for this API key | | `GET /watchlist` | List watchlist | | `POST /watchlist/krs/{krs}` | Add company to watchlist | | `DELETE /watchlist/krs/{krs}` | Remove company from watchlist | Detailed reference for the core endpoints follows; register endpoints (`/companies/krs/{krs}/`) take only the KRS path parameter and return the register's rows for that company. ### GET /health API status (no API key required). **Response:** `{ "status": "ok", "api": "v1", "timestamp": "2026-03-25T12:00:00Z" }` --- ### GET /companies Search and list companies. Uses the same search dataset as the public site. Filters combine with AND. **Response:** `data` is one page of rows; `pagination` has `limit`, `offset`, `total`, `hasMore`, and optionally `cursor`. **Pagination modes:** - `offset` and `cursor` are mutually exclusive. Both supplied → `400 CONFLICTING_PARAMETERS` - Use `offset` for shallow interactive browsing, `cursor` for deep paging/export - Cursor pagination ordered by `entity_id` ascending - With cursor mode, `pagination.total` may be `-1`; rely on `hasMore` **Default ordering (offset mode):** - Without `q`: has_email desc → has_website desc → revenue_total desc → extracted_at desc → entity_id asc - With `q`: same ordering (not TF-IDF relevance) **Parameters:** | Parameter | Type | Description | |-----------|------|-------------| | `q` | string | Free-text search (company name/identifiers). Digits treated as KRS/NIP/REGON lookup. | | `keywords` | string | Comma-separated keyword filter with OR semantics (each ≥2 chars). | | `limit` | integer | Page size. Default 20, max 100 (500 for export). | | `offset` | integer | Zero-based offset. Mutually exclusive with cursor. | | `cursor` | string (UUID) | Last entity_id from previous page. Mutually exclusive with offset. | | `pkd` | string | PKD code filter (case-insensitive). | | `primary_only` | boolean | true = match primary PKD only (default). false = match any PKD in activity list. | | `currency` | string | PLN/USD/EUR — currency for financial filters. Default PLN. | | `voivodeship` | string | Region filter (e.g. mazowieckie, śląskie). | | `postal_code` | string | Exact postal code match. | | `city` | string | City substring filter (case-insensitive ILIKE). | | `revenue_min` / `revenue_max` | number | Total revenue range in full currency units. | | `revenue_operating_min` / `revenue_operating_max` | number | Operating revenue range. | | `profit_operating_min` / `profit_operating_max` | number | Operating profit range. | | `profit_net_min` / `profit_net_max` | number | Net profit range. | | `income_tax_min` / `income_tax_max` | number | Income tax range. | | `cost_wages_min` / `cost_wages_max` | number | Wages cost range. | | `cost_amortization_min` / `cost_amortization_max` | number | Amortization cost range. | | `total_assets_min` / `total_assets_max` | number | Total assets range. | | `ebitda_min` / `ebitda_max` | number | EBITDA range. | | `capital_min` / `capital_max` | number | Share capital range. | | `estimated_value_min` / `estimated_value_max` | number | Estimated company value range. | | `registration_year_min` / `registration_year_max` | integer | Registration year range. | | `registration_date_min` / `registration_date_max` | string (YYYY-MM-DD) | Exact registration date range (inclusive); overrides the year range. Today's date in both = companies registered today. | | `sort` | string | Sort column: revenue, profit_net, estimated_value, total_assets, operating_costs_total, fixed_assets, current_assets, equity, liabilities_and_provisions, capital, registration_date, revenue_growth, name, nip, regon, city, region, postal_code. Rows without a value are excluded. revenue_growth + dir=desc = fastest-growing companies (y/y revenue growth %). List endpoint only; ignored for `q`/`keywords` searches. | | `dir` | string | `asc` or `desc` (default `desc`). | | `last_report_year_min` / `last_report_year_max` | integer | Financial report period year range. | | `status_active` | boolean | true = active companies only. | | `legal_form` | string | Legal form substring filter (ILIKE). | | `has_email` | boolean | true = companies with email only. | | `has_website` | boolean | true = companies with website only. | **Response fields per company row:** entity_id, company_name, company_name_display, nip, regon, registry_number, legal_form, is_active, latest_snapshot_id, extracted_at, state_date, postal_code, city, region, full_address, primary_pkd, all_pkd_codes, revenue_total, revenue_total_usd, profit_net, profit_net_usd, operating_costs_total, total_assets, fixed_assets, current_assets, equity, liabilities_and_provisions, has_email, has_website, email, website, logo_url, currency, period_to. --- ### GET /companies/count Count companies matching the same filter set as GET /companies (without pagination parameters). **Parameters:** Same filter parameters as GET /companies (no limit/offset/cursor). **Response:** `{ "count": 1045904 }` --- ### GET /companies/export Same filters as GET /companies, with page size up to 500. Contact emails included when available. **Parameters:** Same as GET /companies but `limit` max 500. Each page costs 1 monthly quota request. --- ### GET /companies/krs/{krs} Full company profile by KRS (Polish court registry number). Digits only; leading zeros optional (normalized to 10 digits). **Path parameter:** `krs` (string) — KRS number, normalized to 10 digits. **Response includes:** - `company` — identifiers, address, PKD activities, logo, capital - `details.contacts` — email, phone, website, deliverability flags (email/phone revealed for API keys) - `details.vat` — VAT whitelist status + bank accounts - `details.filings` / attributes / operational status - `roles` — board members, management, proxies with display names - `ownership` — shareholders with holding percentages, values in PLN/USD/EUR - `financials.byYear` — metrics + esf_statement_lines when present - `krz` — restructuring/insolvency proceedings summary - `sudop` — public aid / de minimis - `bzp` — public procurement summary - `ted` — EU procurement summary - `ure` — URE energy concessions - `bdo` — BDO waste/packaging register - `transport` — KREPTD (GITD) road transport licences and permits: status, vehicle counts, current certified copies, fleet estimate - `gpw` — Warsaw Stock Exchange listing snapshot - `crbr` — beneficial owners (when RODO-eligible) - `msig` — Court and Commercial Gazette notices - `changeHistory` — registry change events - `similarCompanies` — related companies by PKD/region - `subsidiaryCompanies` — subsidiary entities - `pkdRankings` — industry rankings - `insightsByYear` — narrative analytical insights - `hasStatistics` — boolean; full peer benchmarks via /statistics - `companySummary` — AI-generated description (pl/en/de) - `faq` — frequently asked questions --- ### GET /companies/krs/{krs}/status Quick legal-status check. **Response:** `{ "krs": "0000028860", "status": "active", "label": "Active", "is_open": true }` --- ### GET /companies/krs/{krs}/financial-statements Financial metrics grouped by statement year. Values include PLN/USD/EUR columns and structured esf_statement_lines when extracted. **Response fields per period:** sf_period_from, sf_period_to, currency, ebit, ebitda, roa, roe, net_margin, asset_turnover, revenue_operating, revenue_total, operating_costs_total, financial_income, financial_costs, profit_gross, profit_net, income_tax, total_assets, fixed_assets, current_assets, equity, liabilities_and_provisions (all with _usd and _eur variants), has_esf_xml, esf_statement_lines (rzis, bilans, statement_profile). --- ### GET /companies/krs/{krs}/financial-documents Metadata list of financial documents (periods, types, names). Metadata only — no XML files. **Parameters:** `limit` (1-100, default 25), `offset` (default 0). --- ### GET /companies/krs/{krs}/statistics Industry/region/country peer benchmarks and company's rank positions. **Response:** - `company` — latest indexed figures (PLN/EUR/USD) - `scopes` — rank in each peer group: pkd_full, pkd_division, pkd_section, region, country (with rank_position, total_in_scope, top_percent) - `benchmarks` — per scope key: median, p25, p75, p90, winsor_mean, mean, n_companies **Parameters:** `locale` (string, default "en"). --- ### GET /companies/krs/{krs}/structure-people Ownership and management structure: `roles` (board, proxies with display names and role labels) and `ownership` (shareholders with holding values, percentages, share counts in PLN/USD/EUR). --- ### GET /companies/krs/{krs}/connections Graph of related companies and people linked through shared roles/ownership. --- ### GET /companies/krs/{krs}/news Published news articles and optional claimed description/logo from company UGC. Coverage is uneven. **Parameters:** `locale` (string, default "en"). --- ### GET /companies/krs/{krs}/gpw Warsaw Stock Exchange listing snapshot: ticker, ISIN, market (main/NewConnect/GlobalConnect), last close and change, market cap, shares outstanding, EPS, P/E, dividend per share and yield. Quotes delayed ~15 min, in PLN. `gpw` is null if not listed. **Parameters:** - `include` (string) — comma-separated extras: `series` (daily OHLCV, default 250 bars, max 2000), `intraday` (1-minute bars, last 10 days) - `series_limit` (integer, 0-2000, default 250) — daily bar count when include contains series --- ### GET /ceidg/nip/{nip} Sole-proprietor (CEIDG) profile by NIP. Subject to public CEIDG catalog visibility. **Path parameter:** `nip` (string) — NIP normalized to exactly 10 digits. **Parameters:** `locale` (string, pl/en/de, default "en") — language for PKD labels and companySummary. **Response includes:** company (identifiers, address, PKD, contacts, logo, roles/owner), primaryPkdDescription, companySummary, details.vat, similarCompanies, changeHistory, sudop, bzp, ure, transport, bdo, gpw. --- ### GET /persons/search Search persons by name (first name, last name, or both). Returns deduplicated list with person_id and company_count. **Parameters:** - `q` (string, required, min 2 chars) — name substring (case-insensitive ILIKE) - `limit` (integer, 1-50, default 20) **Response per person:** person_id (UUID), display_name, birth_year (integer or null, never full date/PESEL), company_count. Note: internally scans up to 2,000 matching rows; `note` field indicates truncation for very common names. --- ### GET /persons/{personId}/connections All companies linked to a given person with relationship type and role label. **Path parameter:** `personId` (UUID) — from GET /persons/search. **Response:** person_id, companies[] with entity_id, registry_number, company_name, relationships[] (kind: management/ownership, role label). --- ### GET /watchlist List watchlist companies for the user account linked to the API key. **Parameters:** `limit` (1-100, default 20), `offset` (default 0). --- ### POST /watchlist/krs/{krs} Add a company to the watchlist. Idempotent (already_following: true if duplicate). **Response:** krs, entity_id, already_following, created_at. --- ### DELETE /watchlist/krs/{krs} Remove a company from the watchlist. Idempotent (removed: false when not on list). --- ### GET /usage Monthly quota usage for this API key. Does not consume quota. **Response:** used, limit, remaining, monthUtc (ISO 8601 date), resetsAtUtc (ISO 8601 datetime). --- ## 5. MCP Server — Complete Reference ### General Information - **Main endpoint:** `POST https://compabase.com/api/mcp` (other endpoints below) - **Protocol:** MCP Streamable HTTP, JSON-RPC 2.0 - **Server name:** compabase - **Protocol version:** 2024-11-05 - **Supported methods:** `initialize`, `tools/list`, `tools/call`, `ping`, `notifications/initialized` - **Authentication:** `Authorization: Bearer mcpk_…` (preferred) or `X-API-Key: mcpk_…`; connector endpoints also accept OAuth 2.1 - **Keys:** self-service at https://compabase.com/integrations?tab=mcp - MCP keys (`mcpk_…`) are separate from REST API keys (`cb_…`). Stored as SHA-256 hashes. ### Keyless Onboarding You can connect without a key to create an account from the agent: 1. Call `request_signup` with the user's email (sends a magic link) 2. Poll `check_signup` with `setup_id` until user clicks the link 3. Receive `mcp_key` (`mcpk_…`) and save it in client config ### Quota Accounting - **Data tools** (search, financials, enrichments, SQL): each successful `tools/call` consumes one `mcp_queries` unit - **Account tools** (usage, plan, watchlist, keys, webhooks, BYOK, notifications): skip `mcp_queries` - `export_companies` consumes `export_companies` meter, not `mcp_queries` - `initialize`, `tools/list`, `ping` also skip the meter - When limit reached, data tool calls return a JSON-RPC error with used/limit counts ### Endpoints | Endpoint | For | Auth | Tools | |---|---|---|---| | `https://compabase.com/api/mcp` | Cursor, VS Code, Windsurf, Claude Code, Claude Desktop (via mcp-remote), own agents (LangChain, LlamaIndex, n8n, curl) | MCP key: `Authorization: Bearer mcpk_…` (or `X-API-Key: mcpk_…`). Keyless onboarding via request_signup. | Full server: all data tools, read-only SQL, account tools (usage, plan, watchlist, API/MCP keys, export, webhooks, BYOK, notifications). | | `https://compabase.com/api/mcp/claude` | Claude — claude.ai, Claude Desktop and mobile, added as a custom connector | OAuth 2.1 (sign in to Compabase in the browser, no key to copy). An MCP key also works. | Read-only data tools (company search, profiles, financials, people, registers) + usage/plan. | | `https://compabase.com/api/mcp/apps` | ChatGPT (apps / connectors, developer mode) | OAuth 2.1 or MCP key. | Read-only data tools + usage/plan. | | `https://compabase.com/api/mcp/connect` | Any OAuth-capable MCP client: Gemini, Grok, Le Chat (Mistral), Perplexity, Cursor, … | OAuth 2.1 (dynamic client registration) or MCP key. | Read-only data tools + usage/plan. | | `https://compabase.com/api/mcp/financials` | Any MCP client — topic server | OAuth 2.1 or MCP key. | Financial statements, rankings and sector benchmarks only. | | `https://compabase.com/api/mcp/kyb` | Any MCP client — topic server | OAuth 2.1 or MCP key. | Know-your-business / due diligence: registry, people, beneficial owners, insolvency, gazette, sanctions, KNF, secured liabilities, articles. | | `https://compabase.com/api/mcp/tenders` | Any MCP client — topic server | OAuth 2.1 or MCP key. | Public procurement (BZP, TED) incl. search_tenders, public aid and EU funds. | MCP keys (`mcpk_…`, separate from REST API keys `cb_…`): https://compabase.com/integrations?tab=mcp. The Free plan includes MCP with a small monthly query limit. OAuth metadata: https://compabase.com/.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource/. All endpoints share the account's quotas (`mcp_queries`). ### Client Configuration **Claude (claude.ai, Claude Desktop, mobile) — no key:** Settings → Connectors → *Add custom connector* → URL `https://compabase.com/api/mcp/claude` → sign in to Compabase when asked (OAuth). Then enable the connector in the chat. **ChatGPT — no key:** add a connector/app (developer mode) with URL `https://compabase.com/api/mcp/apps` and sign in to Compabase (OAuth). **Gemini, Grok, Le Chat, Perplexity and other OAuth clients — no key:** URL `https://compabase.com/api/mcp/connect`, OAuth sign-in. **Cursor** (`~/.cursor/mcp.json` or `.cursor/mcp.json` in the project): ```json { "mcpServers": { "compabase": { "url": "https://compabase.com/api/mcp", "headers": { "Authorization": "Bearer mcpk_YOUR_KEY" } } } } ``` **VS Code** (`.vscode/mcp.json`): ```json { "servers": { "compabase": { "type": "http", "url": "https://compabase.com/api/mcp", "headers": { "Authorization": "Bearer mcpk_YOUR_KEY" } } } } ``` **Windsurf** (`~/.codeium/windsurf/mcp_config.json`): ```json { "mcpServers": { "compabase": { "serverUrl": "https://compabase.com/api/mcp", "headers": { "Authorization": "Bearer mcpk_YOUR_KEY" } } } } ``` **Claude Code:** ``` claude mcp add --transport http compabase https://compabase.com/api/mcp --header "Authorization: Bearer mcpk_YOUR_KEY" ``` **Claude Desktop via config file** (alternative to the connector; needs Node.js) — `claude_desktop_config.json` (macOS `~/Library/Application Support/Claude/`, Windows `%APPDATA%\Claude\`): ```json { "mcpServers": { "compabase": { "command": "npx", "args": [ "-y", "mcp-remote", "https://compabase.com/api/mcp", "--header", "Authorization:${AUTH}" ], "env": { "AUTH": "Bearer mcpk_YOUR_KEY" } } } } ``` **Own agent / curl** (Streamable HTTP, JSON-RPC 2.0; flow: initialize → notifications/initialized → tools/list → tools/call): ``` curl -s https://compabase.com/api/mcp -H "Authorization: Bearer mcpk_YOUR_KEY" -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' ``` **No account yet?** An agent connected to `https://compabase.com/api/mcp` without a key can call `request_signup` (email → magic link), then poll `check_signup`, which returns the `mcpk_` key and a ready config. --- ### Webhooks Configure with `set_webhook_url` (MCP) — events: `watchlist.company_changed`, `board_changed`, `ownership_changed`, `status_changed`, `company_removed_from_registry`, `financials_updated`, `filing_overdue`, `insolvency`, `court_gazette`, `secured_liabilities`, `sanctions`, `public_tenders`, `public_aid`, `licenses`, `nfz`, `trademarks`, `job_offers` (all `watchlist.*`; default: all). **Webhook signing:** every delivery includes header `X-Compabase-Signature: t=,v1=`. Verify by computing HMAC-SHA256(raw_body, webhook_secret) and comparing with v1. ### BYOK (Bring Your Own Key) Paid plans can add their own OpenAI, Claude or Gemini key for Ask AI (`set_byok_key` or https://compabase.com/integrations?tab=ai). Keys are encrypted at rest (AES-256-GCM). Formats: openai `sk-…`, claude `sk-ant-…`, gemini `AIza…` or `AQ.…`. ### Tool Reference (live, generated from tools/list on 2026-11-28) ### Onboarding Tools (no MCP key required, no quota) #### request_signup *Request Compabase Signup* Start Compabase account setup for an email. Sends a magic link. After the user clicks it, check_signup with the returned setup_id reports status ready and returns the MCP key automatically. No key has to be generated in the portal. No auth required. **Parameters:** - `email` (string, required) — User email to create or sign in to a Compabase account. - `locale` (enum: en | pl | de) — Email language (default en). - `client` (enum: cursor | claude | vscode | other) — AI client, used to label the generated MCP key. #### check_signup *Check Compabase Signup Status* Poll a request_signup session. When the user has confirmed email, returns mcp_key once and cursor_mcp_json to write to MCP config. Call every 3 seconds until status is ready, expired, or already_delivered. No auth required. **Parameters:** - `setup_id` (string, required) — setup_id from request_signup. - `client` (enum: cursor | claude | vscode | other) — Optional client hint for the key name. #### list_plans *List Compabase Subscription Plans* List Compabase billing plans and limits. No auth required. After sign-up, use upgrade_plan to get a Stripe Checkout URL. **Parameters:** none ### Data Tools (consume mcp_queries quota) Most data tools identify a company by `name`, `krs` or `nip` (at least one). #### search_companies *Search Polish Companies* Search and filter Polish KRS companies (spółki). Compabase also holds the full CEIDG/JDG register; this tool does not browse JDG — those without a public contact email are hidden because of RODO. Default `fields=summary` returns a compact row (name, NIP, KRS, location, PKD, latest financials, email/phone/website) — small enough for MCP clients. `fields=contacts_only` is name/NIP/KRS/city/email/phone/website only. `fields=full` returns every company_search column plus contacts and may exceed client size limits. Use for rankings, sector filters, city/county/region browsing, name search, or NIP/KRS lookup. When a PKD is mostly JDG, a sparse result includes a `hint` (full CEIDG is in the database; listing is RODO-gated). For a handful of emails or phones, fields=contacts_only here is enough; export_companies is meant for bulk files. **Parameters:** - `name` (string) — Company name fragment (case-insensitive). Matches display name and full KRS name; legal-form suffixes like 'sp. z o.o.' are ignored. - `krs` (string) — KRS registry number (10 digits, zero-padded, e.g. '0000028860'). - `nip` (string) — NIP tax number (10 digits, no dashes). - `city` (string) — City name — KRS records use uppercase, e.g. 'WARSZAWA', 'POZNAŃ'. - `county` (string) — County / powiat (lowercase). - `region` (string) — Voivodeship (lowercase), e.g. 'mazowieckie', 'wielkopolskie'. - `postal_code` (string) — Postal code prefix, e.g. '00-9' or '61-'. - `pkd` (string) — Primary PKD code prefix, e.g. '46.90.Z' or '46'. - `all_pkd` (string) — Match any PKD code in the company's activity list (not just primary). - `legal_form` (string) — Legal form fragment, e.g. 'spółka z o.o.' or 'akcyjna'. - `currency` (enum: pln | usd | eur) — Currency for monetary filters. Default: pln. - `revenue_min` (number) — Minimum total revenue. - `revenue_max` (number) — Maximum total revenue. - `profit_min` (number) — Minimum net profit. - `profit_max` (number) — Maximum net profit. - `profit_operating_min` (number) — Minimum operating profit (PLN). Negative allowed. Omit if unused. - `profit_operating_max` (number) — Maximum operating profit (PLN). Omit if unused. - `total_assets_min` (number) — Minimum total assets. - `total_assets_max` (number) — Maximum total assets. - `ebitda_min` (number) — Minimum EBITDA. - `ebitda_max` (number) — Maximum EBITDA. - `ownership_structure` (enum: pl_independent | pl_group | foreign_group) — 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). - `family_business` (boolean) — true = family business (people with the same surname hold ≥50%). - `naics` (string) — Detailed industry: NAICS 6-digit codes, comma-separated (any of them), e.g. '541511,541512'. AI classification of what the company actually does. - `service` (string) — 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). - `niche` (string) — Detailed industry in words (Polish, English or German), matched against the company's niche, e.g. 'opakowania', 'software house', 'catering', 'Verpackungen'. - `capital_min` (number) — Minimum share capital. - `capital_max` (number) — Maximum share capital. - `estimated_value_min` (number) — Minimum Ohlson estimated equity value in PLN. - `estimated_value_max` (number) — Maximum Ohlson estimated equity value in PLN. - `registration_date_min` (string) — 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. - `registration_date_max` (string) — Latest KRS registration date, YYYY-MM-DD (inclusive). - `is_active` (boolean) — true = active only, false = closed only. Omit for all. - `has_email` (boolean) — true = only companies with email on record. Matching rows include contacts.email. Omit otherwise. - `has_website` (boolean) — true = only companies with website on record. Matching rows include contacts.website. Omit otherwise. - `sort_by` (enum: revenue_total | profit_net | total_assets | profit_operating | ebitda | capital_total | estimated_value | registration_date | revenue_growth_pct) — Sort field (default: revenue_total). registration_date + sort_dir=desc lists the newest registrations first. revenue_growth_pct + sort_dir=desc lists the fastest-growing companies (y/y revenue growth from KRS financial statements; combine with revenue_min to skip small companies). - `sort_dir` (enum: asc | desc) — Sort direction (default: desc). - `year` (integer) — Filter to companies whose latest financial_period_to falls within this calendar year (e.g. 2024). Use only for sector/ranking browse — omit when looking up a company by name, KRS, or NIP. - `limit` (integer) — Max results (default: 10, max: 50). - `fields` (enum: contacts_only | summary | full) — Response size. Default summary (name, NIP, KRS, location, PKD, latest financials, email/phone/website). contacts_only: name, NIP, KRS, city, email, phone, website. full: every company_search column plus contacts — often too large for MCP clients. #### get_company *Get Company Profile* Get company registry profile and headline financials for one latest filed period (`financials.period_to` / `financial_period_to`): revenue, profit, costs, assets, estimated_value (Ohlson/RIM equity estimate), PKD, address, plus contacts when on record, full address, share capital, representation, recent KRS changes and `company_summary` (company description from the profile, language via `lang`), `logo_url`, `niche_pl` / `niche_en` / `niche_de` (detailed industry in words: what the company actually does, in Polish, English and German) with `naics_codes`, `job_offers` (current job offers from the company career page and public job boards), `similar_companies`, `vat` (MF white list: VAT status, VAT registration date, bank accounts, removal/restoration, date Compabase checked it). All money fields in this response are that same period — there is no nested summary from a different year. NIP lookup also returns a CEIDG/JDG firm when it has a public contact email (RODO). Does NOT include balance-sheet line items (cash, receivables, inventories). For those or earlier years, use get_financials. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown (legal-form suffix optional). - `krs` (string) — KRS registry number (10 digits, zero-padded). - `nip` (string) — NIP tax number (10 digits, dashes optional). - `lang` (enum: pl | en | de) — Language of `company_summary` (default pl). Falls back to en, pl, de when missing. #### get_financials *Get Full Financial Statements* Get full financial statement metrics per fiscal period — all entity_financial_metrics columns. Includes cash_and_equivalents, inventories, receivables, liabilities, equity, cost breakdown, revenue lines. The standalone row of the latest analysed statement also has `notes` (additional information from the statement): average employment (employees_avg, employees_avg_prev), income tax, profit distribution and dividend, parent and ultimate parent, related-party transactions, shareholdings, guarantees and contingent liabilities, loans, auditor fee, revenue split. Every row has `insights`: the financial signals shown on the Compabase profile for that year and scope (plain-text sentences, e.g. negative equity, cash share of current assets), and `metric_summaries`: the sentences next to each statement line on the profile ({ revenue_total: [...], ebitda: [...], equity: [...], … }, with y/y change and structure). Both in `lang` with amounts in `currency`; [] / {} when none. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown (legal-form suffix optional). - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `year_from` (integer) — Earliest fiscal year to include (e.g. 2019). - `year_to` (integer) — Latest fiscal year to include (e.g. 2023). - `lang` (enum: pl | en | de) — Language of `insights` and `metric_summaries` (default pl). - `currency` (enum: pln | usd | eur) — Currency of amounts inside `insights` and `metric_summaries` (default pln). Statement figures stay in PLN. #### get_company_people *Get Company People & Management* Get people associated with a company — management board, supervisory board, shareholders, proxies. Returns display names, role labels, and relationship types (management, supervisory, ownership, procuration). `connected_companies`: other companies where these people hold roles or shares (company connections from the profile). Identify by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown (legal-form suffix optional). - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `relationship_type` (string) — Filter: management, supervisory (rada nadzorcza), ownership, procuration. Omit for all. #### count_companies *Count Polish Companies* Count 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`. **Parameters:** - `name` (string) — Company name fragment (case-insensitive). Matches display name and full KRS name; legal-form suffixes like 'sp. z o.o.' are ignored. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `city` (string) — City name — KRS uses uppercase. - `county` (string) — County / powiat (lowercase). - `region` (string) — Voivodeship (lowercase). - `pkd` (string) — Primary PKD code prefix, e.g. '46.90.Z' or '46'. - `all_pkd` (string) — Match any PKD code in the company's activity list (not just primary). - `legal_form` (string) — Legal form fragment. - `revenue_min` (number) — Minimum total revenue in PLN. - `revenue_max` (number) — Maximum total revenue in PLN. - `profit_min` (number) — Minimum net profit in PLN. - `profit_max` (number) — Maximum net profit in PLN. - `profit_operating_min` (number) — Minimum operating profit in PLN. - `profit_operating_max` (number) — Maximum operating profit in PLN. - `total_assets_min` (number) — Minimum total assets in PLN. - `total_assets_max` (number) — Maximum total assets in PLN. - `ebitda_min` (number) — Minimum EBITDA in PLN. - `ebitda_max` (number) — Maximum EBITDA in PLN. - `ownership_structure` (enum: pl_independent | pl_group | foreign_group) — 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). - `family_business` (boolean) — true = family business (people with the same surname hold ≥50%). - `naics` (string) — Detailed industry: NAICS 6-digit codes, comma-separated (any of them), e.g. '541511,541512'. AI classification of what the company actually does. - `service` (string) — 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). - `niche` (string) — Detailed industry in words (Polish, English or German), matched against the company's niche, e.g. 'opakowania', 'software house', 'catering', 'Verpackungen'. - `capital_min` (number) — Minimum share capital in PLN. - `capital_max` (number) — Maximum share capital in PLN. - `estimated_value_min` (number) — Minimum Ohlson estimated equity value in PLN. - `estimated_value_max` (number) — Maximum Ohlson estimated equity value in PLN. - `registration_date_min` (string) — 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. - `registration_date_max` (string) — Latest KRS registration date, YYYY-MM-DD (inclusive). - `is_active` (boolean) — true = active only, false = closed only. Omit for all. - `has_email` (boolean) — true = only companies with email on record. Omit otherwise. - `has_website` (boolean) — true = only companies with website on record. Omit otherwise. - `year` (integer) — 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. #### execute_sql *Execute Read-Only SQL* Execute a read-only SQL SELECT query against the Compabase database. Use when dedicated tools are not enough (aggregations, joins, custom analysis). Returns at most row_limit rows per call depending on the plan (Free 100, Pro 500, Scale 1000); if truncated is true, the full result is larger and fits better as an aggregate inside SQL (GROUP BY, COUNT, AVG, percentile_cont). **Parameters:** - `query` (string, required) — A read-only SQL SELECT or WITH…SELECT statement. #### get_company_rankings *Get Company Sector Rankings* Get a company's revenue rank positions within its industry (PKD), region (voivodeship), and all of Poland. Returns rows from company_financial_rankings — one row per scope (pkd_full, pkd_division, pkd_section, region, country). PKD scope keys of historical classifications are prefixed with the version: 'v2007:62.01.Z', 'v2004:50', 'v1997:74.84.B' (no prefix = PKD 2025). `benchmark`: the company compared with peers (median, quartiles, mean of revenue, profit, costs, assets) in its industry, region and city, as on the profile. Use for questions like: where does company X rank in Poland / its industry / its region, how does it compare with its industry? **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number (10 digits, zero-padded). - `nip` (string) — NIP tax number (10 digits, dashes optional). - `scope_type` (enum: pkd_full | pkd_division | pkd_section | region | country) — Optional. Filter to a single scope. Omit to get all scopes. - `currency` (enum: PLN | EUR | USD) — Currency of `benchmark` (default PLN). - `lang` (enum: pl | en | de) — Language of benchmark labels (default pl). #### get_financial_stats *Get Sector Financial Statistics* Get precomputed aggregate financial statistics for a sector, region, PKD branch, or country. Returns median, p25/p75/p90, winsorized mean, mean, total, n_companies, min/max. Use for questions like: what is the median revenue / average profit / assets in industry X or region Y? median and winsor_mean are robust to outliers; mean is not. cost_wages is PLN-only. **Parameters:** - `dimension_type` (enum: country | pkd_section | pkd_division | pkd_class | pkd_full | region | county | city) — Granularity: 'country'=Poland; 'pkd_section'=A–U; 'pkd_division'=2-digit; 'pkd_full'=full code; 'region'=voivodeship; etc. - `dimension_key` (string) — Key for the dimension, e.g. 'PL', 'G', '46', '46.90.Z', 'mazowieckie'. Prefix match applied. - `metric` (enum: revenue_total | profit_net | total_assets | cost_wages) — Financial metric. Omit to return all metrics. - `currency` (enum: PLN | EUR | USD) — Currency (default: PLN). cost_wages is PLN-only. #### get_company_public_aid *Get Public Aid (SUDOP)* Get SUDOP public aid / grants for a company — full case list with amounts, grantor, measure, purpose. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for SUDOP). #### get_company_eu_funds *Get EU Funds Projects* Get European Funds (Fundusze Europejskie) projects for a company — official MFiPR lists, EU co-financing, programme and dates. Keyed by NIP. Identify company by name, KRS, or NIP. Cohesion/shared-management funds; not TED procurement, not FTS Commission grants, and not SUDOP state aid. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for FE). #### get_company_procurement *Get EU Grants (FTS)* Get European Commission FTS awards for a company — Horizon, LIFE, Erasmus and other direct/indirect-management grants. Keyed by NIP (VAT). Identify by name, KRS, or NIP. Not cohesion funds (get_company_fe) and not TED procurement. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for FTS). #### get_company_public_tenders *Get Public Procurement Bulletin (BZP)* Get BZP public procurement data — full awards as contractor and notices as buyer, with award values. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for BZP). #### get_company_energy_licenses *Get Energy Regulatory Office Licenses (URE)* Get URE energy concessions for a company — full list of electricity, gas, heat, and liquid fuels, with validity dates and pending applications. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for URE). #### get_company_public_contracts *Get Public Sector Contracts (CRU)* Get contracts from Poland's Central Register of Contracts (CRU JSFP, Ministry of Finance) where the company is the contractor of a public-sector unit (ministries, municipalities, schools, hospitals) — count, total value, top public buyers and the 50 most recent contracts (date, subject, value in PLN, buyer, link). Register live since July 2026; covers contracts below tender thresholds too. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for CRU). #### get_company_nfz_contracts *Get National Health Fund Contracts (NFZ)* Get contracts between the company (as a healthcare provider) and Poland's National Health Fund (NFZ) — value of NFZ contracts in the latest year and every year since 2008, types of care (hospital, outpatient, dental, rehabilitation, pharmacy etc.) with NFZ regional branch, and the largest contracts. Amounts are annual contract values in PLN. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for NFZ). #### get_company_group *Get Corporate Group (GLEIF LEI register)* Get the corporate group of a Polish company from the global LEI register (GLEIF), supplemented with foreign corporate shareholders from KRS matched to it: direct parent and ultimate parent (name, country, LEI), subsidiaries and other group companies — Polish ones with KRS number, foreign ones with country — and group size. Answers 'who owns this company', 'which concern does it belong to', 'other companies of the group in Poland and abroad'. Keyed by KRS. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `limit` (integer) — Max group companies per list (default 50, max 200). #### get_company_nfz_queues *Get NFZ Waiting Lists (Terminy leczenia)* Get NFZ (National Health Fund) waiting lists of a healthcare provider — every NFZ-funded service (specialist clinics, diagnostics such as MRI/CT, procedures, rehabilitation, hospital wards) it runs a waiting list for, per location: NFZ forecast waiting time for stable and urgent cases, people waiting, average wait, address, phone, whether children are seen and accessibility. Sorted by shortest wait. Optional filters: service (e.g. 'okulist', 'rezonans') and town. Data from the NFZ 'Terminy leczenia' API; the forecast is not a booking. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for NFZ). - `service` (string) — Optional filter: fragment of the service name, e.g. 'okulist', 'ortoped', 'rezonans'. - `town` (string) — Optional filter: town or district, e.g. 'Poznań'. - `limit` (integer) — Max rows (default 50, max 400). #### get_company_trademarks *Get Trademarks (UPRP)* Get Polish Patent Office (UPRP) trademarks owned or applied for by the company — mark name, application number, Nice classes, status (protected / pending / expired / refused), filing, registration and expiry dates, plus counts. Owners are matched by company name and city (UPRP does not publish NIP). Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred). #### get_company_corporate_tax *Get Corporate Income Tax (CIT)* Get corporate income tax (CIT) return data published by the Polish Ministry of Finance for the largest taxpayers (revenue above EUR 50 million), tax capital groups and real estate companies — revenue, tax-deductible costs, income, loss, tax base, tax due and effective rate for each year since 2020, plus national rank by tax due. These are tax-return categories (art. 12/15 CIT Act), not accounting figures: revenue and income differ from the financial statement (use get_financials for accounting revenue and income tax). Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred). #### get_company_public_benefit *Get Public Benefit Status (OPP, 1.5% of tax)* Get public benefit organisation (OPP) status of a foundation or association — whether it is on the NIW list eligible for 1.5% of personal income tax, and the amounts it received from taxpayers' 1%/1.5% allocations each year since 2019 with approximate donor counts and national / regional rank. Identify by name or KRS. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. #### get_company_news *Get Company News* Get news the company published on its own website (and on Compabase): title, link, publication date and short description, newest first. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `lang` (enum: pl | en | de) — Language of titles (default pl). - `limit` (integer) — Max news items (default 20, max 50). #### get_company_financial_documents *Get Filed Financial Documents* Get the list of documents the company filed to the KRS Financial Documents Repository (RDF): document kind, period and format (XML or PDF), newest first. Figures extracted from these documents are in get_financials. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `limit` (integer) — Max documents (default 25, max 100). - `offset` (integer) — Pagination offset. #### get_company_market_environment *Get Market Environment of Company's Industry* Get the market environment of the company's industry (NAICS classification, else PKD 2007 class): a one-sentence summary (favourable / unfavourable / mixed / stable) and up to 4 strongest, non-overlapping indicators, each with a headline, a concrete observation with figures, effect on the company (positive/negative/neutral), source and the time series. Indicators: revenue growth and net margin of comparable companies computed from KRS financial statements, demand (sales/services volume, output), prices and bankruptcies from Monitly (Eurostat, GUS), latest-month GUS retail prices of what the company or its industry sells. Identify company by name, KRS, or NIP; sole proprietors (CEIDG) by NIP, matched by their main PKD class. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. - `lang` (enum: pl | en | de) — Language of summary and observations (default pl). #### get_company_rail_punctuality *Get Train Punctuality of Rail Carrier* Get train punctuality of a Polish passenger rail carrier from PKP PLK open rail data: number of runs, share on time (arrival at the final station under 6 minutes late), average delay, cancellations, comparison with all carriers in Poland and rank, day-by-day series, punctuality by category/line, worst trains and runs. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. #### get_company_facilities *Get Pharmacies and Schools Run by Company* Get pharmacies (Polish Pharmacy Register) and schools, kindergartens and other educational institutions (RSPO) run by the company — name, type, town, address, operating status, opening date, number of students. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred). - `active_only` (boolean) — Only currently operating facilities. - `limit` (integer) — Max facilities (default 100, max 300). #### get_company_procurement_disputes *Get Procurement Disputes (KIO)* Get National Appeal Chamber (Krajowa Izba Odwoławcza, KIO) rulings in public procurement disputes involving the company — as appellant (with upheld / dismissed / discontinued / rejected counts), as participant or as contracting authority — with case numbers, dates, other party and outcome. Parties are matched by name and city. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred). #### get_company_waste_registry *Get Waste Management Registry (BDO)* Get BDO waste and packaging register data — registration number, EUP site count, activity flags, and headquarters decisions with issue and validity dates. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for BDO). #### get_company_transport_licenses *Get Road Transport Licences (KREPTD)* Get road transport licences from the KREPTD register (GITD) — EU community licences (goods over / up to 3.5 t, passengers) and national road carrier permits with number, status (valid / suspended / withdrawn / expired), issue and expiry dates, issuing authority, vehicle counts, current certified copies (wypisy) and a fleet estimate. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for KREPTD). #### get_company_stock_market *Get Warsaw Stock Exchange Data (GPW)* Get Warsaw Stock Exchange listing for a company — ticker, ISIN, market (GPW main / NewConnect / GlobalConnect), last close and change, market cap, shares outstanding, TTM EPS, TTM P/E (falls back to last annual filing), last quarterly results, next earnings date, dividend per share and yield. Quotes delayed ~15 minutes, in PLN. Snapshot plus a few recent daily bars — not full OHLCV history. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for GPW). #### get_company_eu_tenders *Get EU Tenders Daily (TED)* Get TED EU-threshold public procurement — full awards as contractor and notices as buyer. Keyed by NIP. Identify company by name, KRS, or NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number (preferred for TED). #### get_company_court_gazette *Get Court and Commercial Gazette (MSiG)* Get Court and Commercial Gazette (MSiG) notices for one company. Matched by KRS or NIP (creditor calls, dissolution, mergers, liquidation). **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP (CEIDG / when KRS unknown). #### get_company_sanctions *Get sanctions and PEP screening* Sanctions and PEP screening for one company. entries[] with kind=entity: the company itself on a sanctions list (MSWiA, EU, US, UK, World Bank), matched by KRS, NIP or REGON, with measures and legal grounds. kind=person: board members, proxies, owners and beneficial owners matched to sanctions lists (EU, UN, US, UK, MSWiA) or PEP sources (Sejm, Wikidata, boards of state-owned companies), with list_kind, confidence (confirmed = PESEL or birth date, likely = birth year; name-only matches are not published), role in the company, public positions and soe_role. Null when nothing matched. The same payload is included on get_company as sanctions. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP tax number. #### get_company_debt_registry *Get National Debt Register (KRZ)* Get KRZ insolvency / restructuring proceedings. KRS companies via company_krz; sole proprietors via CEIDG KRZ by NIP. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP (CEIDG / when KRS unknown). #### get_company_financial_supervision *Get KNF Financial Supervision Register* KNF register (Polish Financial Supervision Authority): licences and entries of a financial company — banks, payment / e-money institutions, investment firms, insurers, lending institutions, agents. Returns entries with kind, KNF number, status, registration / decision / strike-off dates and services. Keyed by NIP; null when the company has no KNF entry. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_website_facts *Get Company Website Facts* Facts read from the company's own website: opening hours (per weekday), branches/locations with addresses, offer (CPV divisions plus short product/service names in PL/EN/DE), certifications found on the site (ISO 9001, HACCP, FSC…), website technology (CMS, e-commerce platform, payments, analytics) and clients/partners linked from the site that match KRS companies. Keyed by KRS or NIP (sole proprietors with a public profile); null when the website has not been read or shows none of these. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_procurement_counterparties *Get Public Procurement Counterparties* Public procurement counterparties of a company from BZP, TED and CRU: the buyers it most often wins contracts from, the contractors it most often awards contracts to, and its consortium partners — each with KRS (when known), number of contracts, total value (PLN/EUR/USD) and years. Top 20 per role plus totals. Keyed by NIP/KRS; null when the company has no public procurement. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_filing_timeliness *Get Financial Statement Filing Timeliness* Financial statement filing timeliness from KRS register entries (date each annual statement was filed) and the Financial Document Repository: for each recent financial year the period end, filing date, statutory deadline (year end + 6 months + 15 days), days late or not filed, and whether a statutory auditor's report was filed. Also overdue_year when the latest statement is past its deadline and missing, and late_last_5y. Keyed by KRS; null when the company has never filed. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_secured_liabilities *Get Secured Liabilities (Mortgages, Pledges)* Secured liabilities from the latest financial-statement notes (period ending 2025+): mortgages (hipoteki), registered / financial pledges (zastawy), transfers of ownership, assignments — with creditor, amount, secured debt, asset and land-register (KW) numbers. Keyed by KRS; null when nothing is disclosed. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_real_estate *Get Company Real Estate* Company real estate from the latest financial statement (period ending 2025+): land incl. perpetual usufruct, buildings and premises, investment property (book values in PLN/EUR/USD) plus property locations named as mortgage collateral (address, land-register KW numbers, creditor). Keyed by KRS; null when the balance sheet shows no real estate (micro and small entities have no such breakdown). **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP. #### get_company_beneficiaries *Get Ultimate Beneficial Owners (CRBR)* Get CRBR beneficial owners for a KRS company. All names are returned (same as zarząd / wspólnicy). PESEL is never included (birth_year only). JDG are not in CRBR. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number (required path for CRBR). - `nip` (string) — NIP — used to resolve KRS when needed. #### get_company_articles *Get Articles of Association* Get full text of the company's articles of association or statute (umowa spółki / statut) from RAR (Repozytorium Akt Rejestrowych). Use when the user asks about: share transfer consent, preemption rights, non-compete clauses, company duration, voting rights, special share classes, representation rules from the deed, or any clause in the founding document. Returns doc metadata + full extracted text. KRS companies only. **Parameters:** - `name` (string) — Company name when KRS/NIP is unknown. - `krs` (string) — KRS registry number. - `nip` (string) — NIP — used to resolve KRS when needed. - `doc_id` (string) — Optional: specific rar_doc_id. Omit for the latest articles / statute. ### Account Tools (no mcp_queries quota cost) #### get_usage *Get Account Usage & Quota* Get current billing period usage and remaining quota — mcp_queries, api_requests, export_companies, ask_ai_credits, watchlist_companies. Includes limits and reset date. **Parameters:** none #### get_plan *Get Current Subscription Plan* Get the user's active billing plan details — plan name, price, status, limits, prepaid credit balance, and billing period reset date. **Parameters:** none #### list_watchlist *List Watchlist Companies* List companies on the user's watchlist with company data (name, KRS, NIP, revenue, city). Supports pagination via limit/offset. **Parameters:** - `limit` (integer) — Max results (default: 20, max: 100). - `offset` (integer) — Pagination offset (default: 0). #### add_to_watchlist *Add Company to Watchlist* Add a company to the user's watchlist. Identify by KRS (10-digit) or NIP (10-digit). Supports both KRS companies and CEIDG sole proprietorships (via NIP). **Parameters:** - `krs` (string) — KRS registry number (10 digits, zero-padded). - `nip` (string) — NIP tax number (10 digits). Used for CEIDG if no KRS match. #### remove_from_watchlist *Remove Company from Watchlist* Remove a company from the user's watchlist. Identify by KRS or NIP. **Parameters:** - `krs` (string) — KRS registry number (10 digits, zero-padded). - `nip` (string) — NIP tax number (10 digits). #### list_api_keys *List REST API Keys* List all active REST API keys (cb_…) for the user's account. Returns id, name, key_prefix, created_at, last_used_at. **Parameters:** none #### create_api_key *Create REST API Key* Create a new REST API key (cb_…). The raw key is returned once and cannot be retrieved later. **Parameters:** - `name` (string, required) — Human-readable label for the key (max 100 chars). #### delete_api_key *Revoke REST API Key* Revoke (deactivate) a REST API key by its ID. The key stops working immediately. **Parameters:** - `key_id` (string, required) — UUID of the API key to revoke (from list_api_keys). #### list_mcp_keys *List MCP Keys* List all active MCP keys (mcpk_…) for the user's account. Returns id, name, key_prefix, created_at, last_used_at. **Parameters:** none #### create_mcp_key *Create MCP Key* Create a new MCP key (mcpk_…). The raw key is returned once and cannot be retrieved later. **Parameters:** - `name` (string, required) — Human-readable label for the key (max 100 chars). #### delete_mcp_key *Revoke MCP Key* Revoke (deactivate) an MCP key by its ID. Cannot revoke the key currently in use. The key stops working immediately. **Parameters:** - `key_id` (string, required) — UUID of the MCP key to revoke (from list_mcp_keys). #### export_companies *Export Companies to CSV* Bulk file export of companies matching filters (CSV / XLSX / JSON). Up to 500 rows per call. Default `fields=contacts_only`: name, NIP, KRS, city, email, phone, website — small enough to use in-chat. `fields=summary` adds location, PKD, latest revenue/profit. `fields=full` is the complete dump (change history, rankings, people, enrichments, CSV twins) and often exceeds MCP client limits. Consumes export quota only after the file is built successfully. A short list of emails is also available directly from search_companies with fields=contacts_only. **Parameters:** - `name` (string) — Company name fragment (case-insensitive). - `krs` (string) — KRS registry number (exports that one company). - `nip` (string) — NIP tax number (exports matching companies). - `city` (string) — City name. - `county` (string) — County / powiat (lowercase). Same filter as search_companies / count_companies. - `region` (string) — Voivodeship (e.g. mazowieckie). - `pkd` (string) — Primary PKD code prefix, e.g. '80.10', '80.10.Z', or '80' (same prefix matching as search_companies). - `all_pkd` (string) — Match any PKD code in the company's activity list (not just primary). - `revenue_min` (number) — Minimum total revenue. - `revenue_max` (number) — Maximum total revenue. - `is_active` (boolean) — true = active companies only. - `format` (enum: csv | xlsx | json) — Export format (default: csv). Column set follows `fields` (contacts_only by default). - `locale` (enum: en | pl | de) — Column/label language (default: en). - `limit` (integer) — Max rows to export (default: 50, max: 500). - `fields` (enum: contacts_only | summary | full) — Payload size. Default contacts_only (name, NIP, KRS, city, email, phone, website). summary adds county/region, PKD, latest revenue/profit. full is the complete profile dump — often too large for MCP clients; use only when asked for the full file. #### upgrade_plan *Upgrade Subscription Plan* Create a Stripe Checkout session for a plan upgrade. Shows current plan and available upgrades. Pass plan_id ('pro' or 'scale') to get a checkout_url on checkout.stripe.com — the user pays there in the browser. The checkout_url is the direct payment page for the selected plan. **Parameters:** - `plan_id` (enum: pro | scale) — Target plan ID. Required to create a Stripe Checkout URL. - `locale` (enum: en | pl | de) — UI locale for the success/cancel return URLs (default en). - `currency` (enum: PLN | USD | EUR) — Checkout currency. Defaults from locale (pl → PLN, otherwise USD). #### set_webhook_url *Configure Webhook URL* Configure, view, or remove webhook for watchlist event notifications. Events (default: all): watchlist.company_changed, watchlist.board_changed, watchlist.ownership_changed, watchlist.status_changed, watchlist.company_removed_from_registry, watchlist.financials_updated, watchlist.filing_overdue, watchlist.insolvency, watchlist.court_gazette, watchlist.secured_liabilities, watchlist.sanctions, watchlist.public_tenders, watchlist.public_aid, watchlist.licenses, watchlist.nfz, watchlist.trademarks, watchlist.job_offers. **Parameters:** - `action` (enum: get | set | delete, required) — Action: 'get' to view config, 'set' to configure, 'delete' to remove. - `url` (string) — HTTPS webhook endpoint URL (required for action=set). - `events` (array) — Event types to subscribe to. Defaults to all available events. #### get_byok_keys *Get Bring-Your-Own-Key Providers* List configured Bring-Your-Own-Key (BYOK) provider keys status. Shows which providers (openai, claude, gemini) have keys configured, with prefix and last-used date. Never returns the actual key. **Parameters:** none #### set_byok_key *Set Bring-Your-Own-Key Provider* Add or update a BYOK provider API key. Key is encrypted at rest (AES-256-GCM). Requires paid plan (Pro+). Providers: openai (sk-…), claude (sk-ant-…), gemini (AIza… or AQ.…). **Parameters:** - `provider` (enum: openai | claude | gemini, required) — AI provider name. - `api_key` (string, required) — Raw API key for the provider. #### delete_byok_key *Remove Bring-Your-Own-Key Provider* Remove a configured BYOK provider key. After removal, the platform falls back to its own model access. **Parameters:** - `provider` (enum: openai | claude | gemini, required) — Provider to remove key for. #### add_watchlist_batch *Batch Add Companies to Watchlist* Add multiple companies to watchlist in one call. Provide an array of KRS/NIP identifiers (max 500). Resolves identifiers to companies, skips duplicates, respects plan limits. **Parameters:** - `identifiers` (array, required) — Array of KRS numbers (10 digits) or NIP numbers (10 digits). #### set_notification_preferences *Set Notification Preferences* Get or update email notification preferences for watchlist changes. When email_notifications=true, you will receive an email whenever a watched company's data changes (registry updates, new financial statements, deregistration, etc.). **Parameters:** - `action` (enum: get | set, required) — 'get' returns current preferences, 'set' updates them. - `email_notifications` (boolean) — Enable/disable email notifications for watchlist changes (required for 'set'). - `notification_email` (string) — Override email address for notifications. Omit to use account email. --- ## 6. GDPR / Data Protection **Administrator:** Content Writer sp. z o.o. (NIP 7792567297, KRS 0001088645) **GDPR channel:** compliance@compabase.com - Personal data (name, surname, function, shares, approximate age) comes only from public registers (KRS incl. RAR, CEIDG, CRBR). Sanctions lists and PEP sources (Sejm, Wikidata, boards of State Treasury companies) are used only to flag persons already in KRS; a match is published only when the birth date or year also matches. No personal data from websites or social media. - PESEL and full birth date never exposed (UI/API/export) — only birth_year - Email masking for unauthenticated users; full email available with API key - AI assistant does not train models on platform/user data; access only through parameterized read-only SQL on whitelisted views - CEIDG (JDG) data: only entries with public contact email appear in catalog - CRBR beneficial owners: available only to signed-in users and API/MCP keys, every access logged; PESEL never in payload --- ## 7. Example Prompts for AI Agents - "Find active IT companies in Warsaw with revenue over 5 million PLN." - "What is the latest revenue and net profit of Allegro?" - "List board members of the company with KRS 0000028860." - "How many active companies in mazowieckie have primary PKD starting with 62?" - "What is the median revenue in PKD section J?" - "Is Orlen listed on GPW? What is the ticker and P/E?" - "Show cash, liabilities, and equity for Orlen from 2019 to 2023." - "What public aid has company with NIP 7392954369 received?" - "Show public procurement contracts won by this company." - "Who are the beneficial owners of KRS 0000159161?" - "Export top 50 IT companies in Warsaw as CSV." - "Does this company have insolvency proceedings?" - "Any EU-funded projects for Orlen?" - "What URE energy concessions does this company hold?" - "Compare average net profit in mazowieckie vs Poland overall."