DEV Community

rodrigo da silva
rodrigo da silva

Posted on

65 million Brazilian companies — public data you can use right now

Brazil has one of the most open business registries in the world. The Receita Federal (Federal Revenue) publishes the complete CNPJ database — 65+ million companies — as public data. Here's what you can do with it.

What's available

Every registered Brazilian company has a CNPJ (14-digit tax ID). The public dataset includes:

  • Razão social (legal name) and trading name
  • Situação cadastral (active, suspended, cancelled, etc.)
  • Full address — street, city, state, ZIP
  • CNAE — economic activity code (like SIC codes but more granular)
  • QSA — partners/shareholders/directors with entry dates
  • Capital social — stated share capital
  • Phone and email — when declared

The dataset is updated daily by the Receita Federal and covers both active companies and historical records going back decades.

The data in numbers

  • ~65.7M CNPJ registrations total
  • ~17M currently ATIVA (active)
  • ~27M partner/director records (QSA)
  • ~1,300 CNAE activity codes
  • Coverage: all 27 states + DF, 5,500+ municipalities

How to access it

Option 1 — Raw dumps (advanced)
The Receita Federal publishes monthly CSV dumps at dados.gov.br. Each dump is ~7GB compressed. You'll need to parse, normalize and index yourself.

Option 2 — Search tools
Several services have already indexed the data and expose it via search. Jurídico Online is one — search by company name, CNPJ, or partner name and get structured results. Free for basic lookups.

For developers building on top of this data: the QSA (partner) graph is particularly interesting. You can map ownership chains, identify related companies sharing the same shareholders, and build corporate intelligence tools.

Use cases

  • Due diligence automation — verify counterparties before contracts
  • KYC pipelines — enrich onboarding flows with company data
  • Market research — how many logistics companies opened in SP in 2024?
  • Compliance — flag companies with suspended CNPJ in payment flows
  • Journalists — track ownership chains in public procurement

One gotcha

The QSA in the public dataset shows current partners only. Historical ownership changes require the Junta Comercial (state commercial registry).


If you're exploring Brazil-related data, juridicoonline.com.br is a fast way to sanity-check your data — search a company name or CNPJ to see the structured output before you build.

Happy to answer questions about the data structure or parsing the raw dumps.

Top comments (0)