empresas_municipio_cnae

Establishments by municipality, CNAE and company size

Count of CNPJ establishments by municipality, primary CNAE and company size (ME, EPP, other), joining the Empresas and Estabelecimentos files from the Receita dump. Complements cnpj_estabelecimentos_municipio with the company-size dimension.

Query via MCP ↓2,901,385 rows · 6 columns
One row is
one row per (snapshot, ibge_code, cnae, porte)
Key columns
snapshot, ibge_code, cnae, porte
License
gov.br open data (CC0/LAI in the project's source catalog)
Domain
Companies
Snapshot
2026-09-25

Columns

ColumnTypeDescription
ibge_codeKEYBIGINTIBGE municipality code (7 digits). Null in ~300 rows whose municipality could not be reliably identified.
ufVARCHARState abbreviation (UF).
cnaeKEYVARCHARPrimary fiscal CNAE of the establishment (7 digits).
porteKEYVARCHARCompany size at the Receita: 01 micro-enterprise, 03 small business, 05 other.
qtdBIGINTNumber of establishments (all registration statuses).
snapshotKEYVARCHARMonth of the Receita dump (AAAA-MM).

Queries that read this table

  • Municipality businesses by CNAE and size. Active establishments (Federal Revenue Service, CNPJ) in a municipality aggregated by CNAE (division, group, class or subclass), broken down by size (ME, EPP, others). Never lists individual companies.

Query via MCP

The lake is served through curated queries. Connect your agent to the MCP server and ask — it finds the right query on its own. All you need is an API key — new keys come with 50 free credits (pricing).

empresas_municipio

Which sectors (CNAE divisions) have the most companies in Santos?