Data

BrasilAPI: CNPJ lookup

Free public CNPJ lookup at https://brasilapi.com.br/api/cnpj/v1/{cnpj} — no auth, no token, drop-in HTTP GET. Returns razao_social, nome_fantasia, CNAE fiscal + secondary CNAEs, opção pelo Simples + MEI, situação cadastral, full address, sócios. Data from Receita Federal open data dumps via MinhaReceita.

Verified: 2026-04-27 (vendor-docs-2026-04-27)

When to use BrasilAPI: CNPJ lookup

Choose if

You want a free, drop-in, no-auth CNPJ lookup with comprehensive fields (CNAE, Simples, address, partners) — ideal for agent-driven bookkeeping enrichment after NFS-e extraction.

Avoid if

You need real-time situação cadastral (BrasilAPI lags by ~30 days from the open data dump cadence) or contractually-backed SLA (use cnpja-cnpj paid or direct gov.br Conecta).

Risk Flags

  • LOW operational Data freshness lags the Receita Federal source by up to ~30 days because BrasilAPI reads from MinhaReceita open data dumps. For real-time situação cadastral changes, pair with a real-time source (cnpja-cnpj paid tier or direct gov.br Conecta).
  • LOW supply_chain BrasilAPI is community-maintained on Vercel. No SLA, no guaranteed uptime. Production workflows should cache responses and have a fallback (auxiliar-cnpj-fetch or cnpj-ws).

Cost

Type: Free · Free tier: Unlimited from Vercel CDN; reasonable rate limits per IP (BrasilAPI hosts; no published cap).

Hidden costs

  • Hosted on Vercel — depends on third-party uptime; no SLA.
  • Data freshness depends on MinhaReceita dump cadence (typically monthly); not real-time.
  • Heavy usage may trigger Vercel-level throttling — reasonable batches recommended.

Install

Default

curl -s "https://brasilapi.com.br/api/cnpj/v1/CNPJ_DIGITS_ONLY"
# Example: 14 digits, no formatting
curl -s "https://brasilapi.com.br/api/cnpj/v1/00000000000191" | jq .
# Returns:
# {
#   "razao_social": "BANCO DO BRASIL SA",
#   "nome_fantasia": "...",
#   "cnae_fiscal": 6422100,
#   "cnae_fiscal_descricao": "Bancos múltiplos, com carteira comercial",
#   "cnaes_secundarios": [...],
#   "opcao_pelo_simples": false,
#   "opcao_pelo_mei": false,
#   "descricao_situacao_cadastral": "ATIVA",
#   "logradouro": "...", "municipio": "...", "uf": "...",
#   "qsa": [...]   # sócios
# }

Setup docs →

Estimated time to first success: ~1 min

Dependencies

Minimum runtime: Any HTTP client

Composes with: auxiliar-nfs-e, nfs-e-parser, CNPJá: CNPJ lookup (free cached + paid real-time), CNPJ.ws: free + commercial CNPJ lookup, Auxiliar.ai CNPJ fetch (BrasilAPI → CNPJ.ws cascade)

Distribution

Repository
https://github.com/BrasilAPI/BrasilAPI
License
MIT (BrasilAPI code; underlying data from Receita Federal open dump)