---
title: "export_companies"
method: POST
path: "/tools/export_companies"
tags: ["Account"]
---

# export_companies

`POST /tools/export_companies`

## Request

- Base URL: `https://compabase.com/api/mcp`
- URL: `https://compabase.com/api/mcp/tools/export_companies`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Bulk file export of companies matching filters (CSV / XLSX / JSON). Up to 500 rows per call.
Default `fields=contacts_only` is name, NIP, KRS, city, email, phone, website — small enough
for MCP clients. `fields=summary` adds location, PKD, latest revenue/profit.
`fields=full` is the complete dump (change history, rankings, people, enrichments) and often
exceeds client limits.

**Consumes `export_companies` quota only after the file is built.** A failed export does
not consume rows. The `mcp_queries` meter is left alone.

**Example prompts:** "Export contacts for IT companies in powiat wołomiński as JSON."
· "Bulk export active companies in PKD 62.01.Z for CRM import (contacts_only)."

**Parameters:** `name`, `krs`, `nip`, `city`, `county` (powiat, same as `search_companies`),
`region`, `pkd`, `revenue_min`, `revenue_max`,
`is_active`, `format` (`csv` default, or `xlsx` / `json`), `locale` (`en`/`pl`/`de`),
`limit` (default 50, max 500), `fields` (`contacts_only` default, or `summary` / `full`).

## Request body

- ExportCompaniesArgs
  - `name` string
  - `krs` string
  - `nip` string
  - `city` string
  - `county` string: County / powiat. Same filter as search_companies.
  - `region` string
  - `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
  - `revenue_max` number
  - `is_active` boolean
  - `format` 'csv' | 'xlsx' | 'json': Export format (default csv).
  - `locale` 'en' | 'pl' | 'de'
  - `limit` integer: Max rows (default 50, max 500).
  - `fields` 'contacts_only' | 'summary' | 'full': Payload size. Default contacts_only (name, NIP, KRS, city, email, phone, website). summary adds location, PKD, latest revenue/profit. full is the complete dump and often exceeds MCP client limits.

## Response `200`

Exported file payload (CSV text, JSON companies, or XLSX base64)

- object

---

[API](https://skmtc.dev/compabase/apis/compabase-mcp.md) · [All operations](https://skmtc.dev/compabase/apis/compabase-mcp/llms.txt) · [OpenAPI document](https://skmtc.dev/compabase/apis/compabase-mcp/revisions/43169ccbb0f7?raw)
