Look up a Brazilian company by its 14-digit CNPJ, or search by name/state/business activity/size. Backed by the Receita Federal do Brasil ("Dados Abertos do CNPJ") monthly open-data dump.
Returns legal name (razão social), trade name, registration status, primary/secondary CNAE codes, address, contact info, partners (QSA, CPF partially masked per LGPD), company size (porte), and Simples Nacional/MEI flags.
curl "https://api.mcp-dados-br.dev/v1/cnpj/01426461000193" \ -H "X-API-Key: $KEY"
{
"cnpj": "01426461000193",
"razaoSocial": "PROMOFARMA DROGARIA LTDA",
"nomeFantasia": "...",
"situacaoCadastral": "Ativa",
"cnaePrincipal": { "codigo": "4771701", "descricao": "..." },
"endereco": { "uf": "MG", "municipio": "...", "cep": "36947000", "..." : "..." },
"socios": [ { "nome": "...", "cpfCnpjMascarado": "***123456**" } ],
"simplesNacional": { "optante": true, "dataOpcao": "..." },
"mei": { "optante": false, "dataOpcao": null }
}
Search by name (prefix match), UF, CNAE, and/or porte — paginated, max 50 results/page. At least one filter is required.
curl "https://api.mcp-dados-br.dev/v1/cnpj/search?name=magazine+luiza" \ -H "X-API-Key: $KEY" curl "https://api.mcp-dados-br.dev/v1/cnpj/search?uf=SP&cnae=6201500&limit=20" \ -H "X-API-Key: $KEY"
| Param | Type | Notes |
|---|---|---|
name | string | Prefix match against razão social, min 3 chars. |
uf | string | 2-letter state code, e.g. SP. |
cnae | string | CNAE fiscal principal code. |
porte | string | 00/01/03/05 — see below. |
page | integer | 1-based, default 1. |
limit | integer | Default 20, max 50. |
| porte | Meaning |
|---|---|
| 00 | Não informado |
| 01 | Micro Empresa |
| 03 | Empresa de Pequeno Porte |
| 05 | Demais (Normal/Grande) |
| Code | HTTP | Meaning |
|---|---|---|
invalid_input | 400 | Malformed CNPJ, missing filters, or bad UF. |
not_found | 404 | CNPJ not in the dataset. |
rate_limited | 429 | Anonymous per-IP daily cap reached. |
payment_required | 402 | Monthly API-key quota exhausted. |
Receita Federal do Brasil, "Dados Abertos do CNPJ" — public open data under Brazil's Open Data Policy (Decreto 8.777/2016). Attribution: "Fonte: Receita Federal do Brasil — Dados Abertos do CNPJ".