- CNPJ structure and validation
- Official data sources available in 2026
- How to query company data with the EnrichLATAM API
CNPJ structure
A CNPJ has the formatXX.XXX.XXX/XXXX-DD, where:
- The first 8 digits identify the parent company
- The next 4 digits identify the establishment (branch)
- The last 2 are check digits
11.222.333/0001-81
The /0001 suffix indicates the headquarters. A company can have multiple CNPJs for different branches (/0002, /0003, etc.).
1. Validate a CNPJ in Python
2. Normalize the format
3. Official data sources in 2026
| Source | Type | Cost | Coverage |
|---|---|---|---|
| Receita Federal (OpenCNPJ) | Public REST API | Free | 55M+ companies, complete data |
| Junta Comercial (JUCESP, etc.) | State web portal | Free (query) | Corporate acts, partners |
| PNCP | OCDS REST API | Free | Federal contracts since 2017 |
https://open.cnpj.ws) is the most complete source: legal name, situação cadastral, opening date, economic activity (CNAE), legal nature, address, and the partner/administrator registry (QSA).
4. Query company data with the API
EnrichLATAM connects to the Receita Federal and exposes the data in a consistent format — the same interface you use for Chile:5. KYB — Business verification
For compliance or B2B onboarding use cases, use the/v1/kyb endpoint which returns the subset of data relevant for verification:
6. Check government contracts
To see whether a company has contracts with the Brazilian federal government:Brazil vs. Chile — key differences
| Aspect | Brazil 🇧🇷 | Chile 🇨🇱 |
|---|---|---|
| Identifier | CNPJ (14 digits) | RUT (8 digits + check digit) |
| Check digits | 2 | 1 (0–9 or K) |
| Registered companies | ~55 million | ~2 million |
| Branches | Separate CNPJ per branch | Same RUT |
| Free official API | OpenCNPJ (Receita Federal) | SII bulk file |