Look up a CNPJ

CNPJAPI's main endpoint takes a CNPJ and returns the company's registration data in JSON, based on public data from Receita Federal (Brazil's tax authority).

  • Method and path: GET /{cnpj}
  • Base URL: https://api.cnpjapi.com.br
  • Parameter: the 14 characters of the CNPJ, without punctuation (e.g.: 00776574000156). It also accepts the alphanumeric CNPJ, in uppercase or lowercase; for it, the API validates the check digits (a wrong digit returns 422). A masked value with . and / is not accepted in the path.
  • Authentication: API key in the Authorization header (see Authentication).

Example (curl)

curl https://api.cnpjapi.com.br/00776574000156 \
  -H "Authorization: Bearer cnpj_sua_chave"

Examples by language

Prefer copy-paste for your stack? The guides show the same endpoint with authentication and 429/Retry-After handling ready to go:

Want to try it without writing code? Open the Postman collection and run the calls in your browser (just add your key).

Response (200 OK, application/json)

{
  "CNPJ": "00.776.574/0001-56",
  "RazaoSocial": "...",
  "NomeFantasia": "...",
  "MatrizFilial": { "Codigo": "1", "Descricao": "Matriz" },
  "Porte": { "Codigo": "05", "Descricao": "Demais" },
  "DataAbertura": "0000-00-00",
  "AtividadePrincipal": { "Codigo": "0000000", "Descricao": "..." },
  "AtividadesSecundarias": [ { "Codigo": "0000000", "Descricao": "..." } ],
  "NaturezaJuridica": { "Codigo": "0000", "Descricao": "..." },
  "SituacaoCadastral": { "Codigo": "02", "Descricao": "ATIVA", "Motivo": "...", "Data": "0000-00-00" },
  "SimplesNacional": "...",
  "Endereco": {
    "TipoLogradouro": "...", "Logradouro": "...", "Numero": "...",
    "Complemento": "...", "Bairro": "...", "CEP": "...", "Municipio": "...", "UF": "..."
  },
  "Municipio": { "SIAFI": "...", "IBGE": "...", "Nome": "..." },
  "Contato": { "DDD1": "...", "Telefone1": "...", "Email": "...", "DDD2": "...", "Telefone2": "..." },
  "QSA": [
    { "Nome": "...", "Tipo": "...", "CPFCNPJ": "...", "Qualificacao": "...", "DataEntradaSociedade": "0000-00-00", "FaixaEtaria": "..." }
  ],
  "CapitalSocial": 0,
  "UltimaAtualizacao": "0000-00-00",
  "EFR": "..."
}

Response fields

Field Description
CNPJ CNPJ looked up, with the mask (e.g.: 00.776.574/0001-56)
RazaoSocial Legal name
NomeFantasia Trade name
SituacaoCadastral Registration status (Codigo, Descricao, Motivo, Data)
AtividadePrincipal Primary CNAE (Codigo, Descricao)
AtividadesSecundarias List of secondary CNAEs
NaturezaJuridica Legal nature (Codigo, Descricao)
Endereco Street type, street, number, complement, neighborhood, ZIP code, city, state
Municipio City (SIAFI, IBGE, Nome)
Contato Phone numbers and email, when available
QSA Shareholder structure: partners (Nome, Tipo, CPFCNPJ, Qualificacao, ...)
CapitalSocial Share capital
Porte / MatrizFilial / SimplesNacional Registration metadata
Sancoes The company's sanctions and embargoes (CGU and IBAMA), on paid plans. See the "Sanctions and embargoes" section below

Looking up many CNPJs

On a paid plan? Look up up to 20 CNPJs in a single call with POST /consulta/lote - it counts as 1 request for the rate limit. Without a paid plan, or for one-off lookups, call GET /{cnpj} once per CNPJ, respecting your plan's limits (requests per minute and monthly quota). When exceeded, the API responds 429 with Retry-After - use that value to pause before continuing.

State Registration alongside (optional)

Need the State Registration (IE) together with the registration data? Add ?incluir=ie: the response gains an InscricoesEstaduais field (a list per state, from the official SEFAZ source). It is a premium feature: it requires a registered account (an anonymous call with ?incluir=ie gets a 401), spends IE quota/credit, and works in the native format only.

curl "https://api.cnpjapi.com.br/00776574000156?incluir=ie" \
  -H "Authorization: Bearer cnpj_sua_chave"
Field Description
InscricoesEstaduais List of registrations per state (UF, IE, Indicador, Situacao, Tipo, ...). Use ?ie_uf=SP to target one state (1 credit); without it, a nationwide sweep (3 credits)
InscricoesEstaduaisUFsDaBase States where SEFAZ did not respond and InscricoesEstaduais carries the last looked-up data (each item has ConsultadoEm). Empty in the normal case. See "When SEFAZ does not respond" at Look up the State Registration
InscricoesEstaduaisUFsIndisponiveis States that could not be looked up right now; the list does not include them. Empty in the normal case
InscricoesEstaduaisErro Present only when the IE lookup failed: InscricoesEstaduais comes back null and this field carries the reason (indisponivel, or cnpj_alfanumerico for an alphanumeric CNPJ, which SEFAZ does not accept yet). In that case the IE is not charged (and, for cnpj_alfanumerico, no plan with IE is required)

Full contract, fields and credits at Look up the State Registration.

Sanctions and embargoes (paid plans)

On paid plans, every lookup in the native format carries a Sancoes field, with no extra parameter and no extra cost: it tells whether the company appears in the sanction registries of CGU, Brazil's Office of the Comptroller General (CEIS, CNEP, CEPIM and leniency agreements in force), and in the areas embargoed by IBAMA, the federal environmental agency. CGU updates CEIS, CNEP and the leniency agreements several times a day, and CEPIM and IBAMA daily; CNPJAPI collects the sources every 6 hours, and each one comes with the date of the loaded file.

The example below is fictitious (the CNPJ does not exist at the Receita). The match is by the CNPJ root (the first 8 characters): looking up any establishment returns the records of the whole company, headquarters and branches, and each record tells in CNPJRegistrado which CNPJ appears in the registry.

"Sancoes": {
  "PossuiRegistros": true,
  "Fontes": [
    { "Fonte": "CEIS", "AtualizadoEm": "2026-10-23" },
    { "Fonte": "CNEP", "AtualizadoEm": "2026-10-23" },
    { "Fonte": "CEPIM", "AtualizadoEm": "2026-10-22" },
    { "Fonte": "LENIENCIA", "AtualizadoEm": "2026-10-23" },
    { "Fonte": "IBAMA_EMBARGO", "AtualizadoEm": "2026-10-23" }
  ],
  "Itens": [
    {
      "Fonte": "IBAMA_EMBARGO",
      "CNPJRegistrado": "98765432000279",
      "Tipo": "Termo de embargo",
      "Numero": "...",
      "Municipio": "...",
      "UF": "...",
      "AreaHectares": 12.5,
      "Descricao": "...",
      "AutoInfracao": "...",
      "DataInicio": "2026-10-01",
      "DataFim": null
    }
  ]
}
Field Description
Sancoes.PossuiRegistros true when there is at least one record in force; false when nothing is on record
Sancoes.Fontes Sources checked and the update date of each one (Fonte, AtualizadoEm)
Sancoes.Itens[].Fonte CEIS, CNEP, CEPIM, LENIENCIA or IBAMA_EMBARGO
Sancoes.Itens[].CNPJRegistrado Full CNPJ on record (it may be another establishment of the same company)
Sancoes.Itens[].Tipo Record type (e.g. debarment, suspension, fine, embargo notice), in Portuguese as published
Sancoes.Itens[].DataInicio / DataFim Record period; always present, null when there is none. Expired records are not returned
CEIS and CNEP fields Orgao, Esfera, UFOrgao, Abrangencia, Fundamentacao, Processo; ValorMulta (CNEP only, when there is a fine)
CEPIM fields Orgao, Convenio, Motivo
Leniency fields Orgao, Processo, Situacao, Efeitos, Descricao (terms of the agreement)
IBAMA fields Numero, Processo, Municipio, UF, AreaHectares, Descricao, AutoInfracao, PossuiDecisaoJudicial, DecisaoJudicialTipo and DecisaoJudicialData (the latest decision)
CPF in texts In Descricao, any CPF (individual taxpayer number) quoted comes masked (***.***.***-**)

When the field does not carry the block:

  • Free plan: "Sancoes": null and "SancoesDisponivelEm": "planos_pagos".
  • Check unavailable right now: "Sancoes": null and "SancoesErro": "indisponivel". The CNPJ data comes normally; the lookup never fails because of sanctions.

The block also comes in each found item of a batch (inside Dados) and does not exist in the ReceitaWS format. The records republish the official registries and are not a judgment by CNPJAPI about the company. Step by step at Check a CNPJ's sanctions and embargoes.

Federal tax debt registry (paid plans)

On paid plans, every lookup in the native format also brings the DividaAtiva field, with no extra parameter and no extra cost: the company's entries in Brazil's federal tax debt registry (dívida ativa da União), as they appear in the open data that PGFN (the National Treasury Attorney's Office) publishes. Before using it, read these five points:

  1. Source: "PGFN, dados abertos da dívida ativa da União", in the Fonte field of every response.
  2. Date: PGFN publishes the data every quarter. Referencia is the extraction month and PublicadoEm is the date PGFN published the batch.
  3. Lag: the data is a snapshot of the extraction date and is usually from 3 weeks to about 4 months old; if publication is late, up to 5 months after the reference month, when the block starts coming as unavailable. Payments, installment plans, guarantees and court decisions after the extraction do not show; entries made afterwards do not show either.
  4. Where to check the current status: in PGFN's official lookup (Dívida Aberta) and, to request a review of an entry, in REGULARIZE.
  5. Not a certificate: this information does not replace the official tax clearance certificate.

The example below is fictitious (CNPJ and amounts). The match is by the CNPJ root (the first 8 characters): federal taxes are usually assessed on the head office's CNPJ, so looking up any establishment returns the entries of the whole company, and CNPJsRegistrados tells which CNPJs of the root are in the data. Only entries where the company is the principal debtor are included.

"DividaAtiva": {
  "Fonte": "PGFN, dados abertos da dívida ativa da União",
  "Referencia": "2026-09",
  "PublicadoEm": "2026-10-21",
  "ConstavaEmCobranca": true,
  "EmCobranca": {
    "Inscricoes": 12,
    "ValorConsolidado": 184532.17,
    "Ajuizadas": 3,
    "PorBase": {
      "NaoPrevidenciaria": { "Inscricoes": 9, "ValorConsolidado": 150210.40 },
      "Previdenciaria": { "Inscricoes": 2, "ValorConsolidado": 30101.77 },
      "FGTS": { "Inscricoes": 1, "ValorConsolidado": 4220.00 }
    }
  },
  "SituacaoRegular": {
    "BeneficioFiscal": { "Inscricoes": 2, "ValorConsolidado": 20400.00 },
    "Garantia": { "Inscricoes": 0, "ValorConsolidado": 0.00 },
    "SuspensaDecisaoJudicial": { "Inscricoes": 1, "ValorConsolidado": 8000.00 },
    "EmNegociacao": { "Inscricoes": 0, "ValorConsolidado": 0.00 }
  },
  "CNPJsRegistrados": ["98765432000198"]
}
Field Description
DividaAtiva.Fonte Always "PGFN, dados abertos da dívida ativa da União"
DividaAtiva.Referencia Extraction month (YYYY-MM)
DividaAtiva.PublicadoEm Date PGFN published the batch (YYYY-MM-DD)
DividaAtiva.ConstavaEmCobranca true when there was at least one entry under collection in the Referencia extraction. It is about the extraction date, not today
DividaAtiva.EmCobranca Entries under collection: count, consolidated amount at the extraction date (in BRL), how many are in court, and the split by registry (non-social-security, social security and FGTS)
DividaAtiva.SituacaoRegular Entries in regular status at the extraction date, which do not count as under collection: tax benefit (installment plan or moratorium), guarantee, suspended by court decision and under negotiation
DividaAtiva.CNPJsRegistrados Full CNPJs of the root that appear in the batch, with an entry under collection or in regular status

When the company is not in the data, the block comes with ConstavaEmCobranca: false, zeroed counts, CNPJsRegistrados: [], the Referencia and the PublicadoEm: read it as "was not under collection in the September 2026 extraction", not as "no debt". The data does not include debts not yet registered.

When the field does not bring the block:

  • Free plan: "DividaAtiva": null and "DividaAtivaDisponivelEm": "planos_pagos".
  • Check unavailable right now (including when the served batch is more than 5 months old with no newer batch loaded, because PGFN published late or the next batch has not been loaded yet): "DividaAtiva": null and "DividaAtivaErro": "indisponivel". The CNPJ data comes normally; the lookup never fails because of the debt check.

The block also comes in each found item of the batch (inside Dados) and does not exist in the ReceitaWS format. The data comes from PGFN's official registry, aggregated by CNPJ root, without changing status or amounts, and is not a judgment by CNPJAPI about the company. Step by step and FAQ in Check a CNPJ's federal tax debt.

Active installment plans with Receita Federal (paid plans)

On paid plans, every lookup in the native format also brings the ParcelamentosRFB field, after DividaAtiva, with no extra parameter and no extra cost: the company's active installment plans with Receita Federal (Brazil's federal tax authority), by type, as they appear in the open data Receita Federal publishes. It is a different dataset from the federal tax debt registry: these are debts placed in installments at Receita Federal, before they go to PGFN; installment plans for debts already in the registry show in the DividaAtiva block, in regular status (tax benefit). Before using it, read these seven points:

  1. Source: "Receita Federal, dados abertos de parcelamentos ativos", in the Fonte field of every response.
  2. Date: Receita Federal publishes the data every month, between the 20th and the 31st. PublicadoEm is the date Receita Federal published the data (there is no reference month).
  3. Lag: the data is a snapshot of the extraction date and can be up to about two months old. Payoffs, terminations (including for late payment) and requests made after the publication do not show until the next publication.
  4. Where to check the current status: the tax clearance certificate (Receita Federal and PGFN) shows the current standing of any CNPJ, but does not list installment plans; only the company itself sees the details of its plans, in e-CAC.
  5. Not a certificate: this information does not replace the official tax clearance certificate.
  6. An installment plan is not an irregularity: an installment plan kept up to date does not, by itself, prevent the "positive with effects of negative" certificate (certidão positiva com efeitos de negativa).
  7. No information on late payments: the data does not say whether any installment is overdue; the balance includes overdue installments and those still to come due.

The example below is fictitious (CNPJ and amounts). The match is by the CNPJ root (the first 8 characters): looking up any establishment returns the plans of the whole company, and CNPJsRegistrados tells which CNPJs of the root are in the data.

"ParcelamentosRFB": {
  "Fonte": "Receita Federal, dados abertos de parcelamentos ativos",
  "PublicadoEm": "2026-10-27",
  "ConstavaParcelamentoAtivo": true,
  "Parcelamentos": 2,
  "ValorParcelado": 412300.50,
  "SaldoDevedor": 301455.12,
  "PorTipo": {
    "MEI": { "Parcelamentos": 0, "ValorParcelado": 0.00, "SaldoDevedor": 0.00 },
    "SimplesNacional": { "Parcelamentos": 0, "ValorParcelado": 0.00, "SaldoDevedor": 0.00 },
    "OrdinarioSimplificado": { "Parcelamentos": 1, "ValorParcelado": 142756.79, "SaldoDevedor": 133332.08 },
    "Especial": { "Parcelamentos": 1, "ValorParcelado": 269543.71, "SaldoDevedor": 168123.04, "Modalidades": ["PERT"] },
    "OrgaoPublico": { "Parcelamentos": 0, "ValorParcelado": 0.00, "SaldoDevedor": 0.00, "Modalidades": [] }
  },
  "CNPJsRegistrados": ["98765432000198"]
}
Field Description
ParcelamentosRFB.Fonte Always "Receita Federal, dados abertos de parcelamentos ativos"
ParcelamentosRFB.PublicadoEm Date Receita Federal published the data (YYYY-MM-DD)
ParcelamentosRFB.ConstavaParcelamentoAtivo true when the company was in the active installment plan data published on PublicadoEm, including with a zero balance. It is about the publication date, not today
ParcelamentosRFB.Parcelamentos Number of active installment plans of the root, adding the five types
ParcelamentosRFB.ValorParcelado Amount placed in installments, in BRL, adding the five types
ParcelamentosRFB.SaldoDevedor Balance adjusted up to the extraction, in BRL, adding overdue installments and those still to come due
ParcelamentosRFB.PorTipo The five types, always present (zeroed when there is none): MEI, SimplesNacional, OrdinarioSimplificado, Especial (adds up the special plans for legal entities, Simples Nacional and MEI, such as PERT and RELP) and OrgaoPublico (public bodies), each with Parcelamentos, ValorParcelado and SaldoDevedor. Especial and OrgaoPublico also carry Modalidades, with the names Receita Federal publishes
ParcelamentosRFB.CNPJsRegistrados Full CNPJs of the root that appear in the data

The response does not carry the plan's start date or the number of installments. When the company is not in the data, the block comes with ConstavaParcelamentoAtivo: false, zeroed totals and types, CNPJsRegistrados: [] and the PublicadoEm: read it as "had no active installment plan in the data Receita Federal published on October 27, 2026", not as "no debt". Debts not in installments, not yet declared or already in the federal tax debt registry are not in this data.

When the field does not bring the block:

  • Free plan (or an ended paid plan): "ParcelamentosRFB": null and "ParcelamentosRFBDisponivelEm": "planos_pagos".
  • Check unavailable right now (including when the served data is more than 70 days past its publication with no newer data loaded, because Receita Federal published late or the next data has not been loaded yet): "ParcelamentosRFB": null and "ParcelamentosRFBErro": "indisponivel". The CNPJ data comes normally; the lookup never fails because of the installment plan check.

The block also comes in each found item of the batch (inside Dados) and does not exist in the ReceitaWS format. The data comes from Receita Federal's official data, aggregated by CNPJ root and by type, without changing the amounts, and is not a judgment by CNPJAPI about the company. Step by step and FAQ in Check a CNPJ's installment plans with Receita Federal.

ReceitaWS format

Already integrated with ReceitaWS? CNPJAPI also responds in its format, field by field - just use GET /v1/cnpj/{cnpj} or GET /{cnpj}?formato=receitaws. See ReceitaWS-compatible.

Next steps

Create your free account at https://app.cnpjapi.com.br and make your first lookup in minutes.