Check a CNPJ's sanctions and embargoes via API

Before hiring a supplier, approving a customer or closing a partnership, it pays to know whether the company appears in Brazil's official sanction registries. On paid plans, CNPJAPI returns this in every CNPJ lookup, in the same JSON as the registration data, with no extra call and no extra cost:

  • CEIS (national registry of debarred and suspended companies), from CGU, Brazil's Office of the Comptroller General;
  • CNEP (national registry of sanctioned companies), from CGU;
  • CEPIM (non-profit entities barred from receiving federal funds), from CGU;
  • Leniency agreements in force, from CGU;
  • Areas embargoed by IBAMA, the federal environmental agency (active environmental embargoes).

CGU updates CEIS, CNEP and the leniency agreements several times a day, and CEPIM and IBAMA daily; CNPJAPI collects the sources every 6 hours. The response carries the file date of each source, so you know when the check is from.

In public procurement, Law 14.133/2021 (art. 91, § 4) requires the government to check CEIS and CNEP before signing a contract or extending its term. For private companies, the same check fits supplier due diligence, credit analysis and compliance programs.

How it works

Make the regular CNPJ lookup (GET /{cnpj}) with the API key of a paid plan. The response gains a Sancoes field at the end of the JSON. For a company with a record, it looks like this (fictitious CNPJ and data):

curl https://api.cnpjapi.com.br/98765432000198 \
  -H "Authorization: Bearer cnpj_sua_chave"
"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",
      "Municipio": "...",
      "UF": "...",
      "DataInicio": "2026-10-01",
      "DataFim": null
    }
  ]
}

Four points to read the response right:

  • The match is by the CNPJ root. Sanctions apply to the legal entity, and a branch is the same legal entity: looking up any establishment returns the records of the whole company. CNPJRegistrado tells which CNPJ is on record (in the example, a branch).
  • Fontes lists every source checked, with or without records, and the date of each one.
  • Only records in force. Records whose end date has passed are not returned. PossuiRegistros: false with the list of Fontes is the "nothing on record", with the date of each source.
  • Each source has its own fields. Besides Fonte, CNPJRegistrado, Tipo, DataInicio and DataFim, CEIS and CNEP bring the agency, government level, legal basis and case number (and the fine, in CNEP); CEPIM brings the agreement and the reason; leniency brings the status and effects of the agreement; IBAMA brings the notice number, location, area in hectares and the latest court decision, when there is one. Values come in Portuguese, as published. The full list is in the field dictionary.

Code example

The Node examples use native fetch (Node 18+) and top-level await - run them as an ES module (a .mjs file, or "type": "module" in package.json), or wrap the code in an async function.

Python:

import requests

cnpj = "98765432000198"
r = requests.get(
    f"https://api.cnpjapi.com.br/{cnpj}",
    headers={"Authorization": "Bearer cnpj_sua_chave"},
    timeout=10,
)
r.raise_for_status()
company = r.json()

sanctions = company.get("Sancoes")
if sanctions is None:
    # free plan ("SancoesDisponivelEm") or check unavailable right now ("SancoesErro")
    print("Sanctions not checked:", company.get("SancoesDisponivelEm") or company.get("SancoesErro"))
elif not sanctions["PossuiRegistros"]:
    dates = ", ".join(f'{f["Fonte"]} on {f["AtualizadoEm"]}' for f in sanctions["Fontes"])
    print("Nothing on record. Sources updated:", dates)
else:
    for item in sanctions["Itens"]:
        print(item["Fonte"], item["Tipo"], "on CNPJ", item["CNPJRegistrado"], "since", item["DataInicio"])

Node.js:

const cnpj = "98765432000198";
const r = await fetch(`https://api.cnpjapi.com.br/${cnpj}`, {
  headers: { Authorization: "Bearer cnpj_sua_chave" },
});
if (!r.ok) throw new Error(`HTTP ${r.status}`);
const company = await r.json();

const { Sancoes: sancoes } = company;
if (sancoes === null || sancoes === undefined) {
  console.log("Sanctions not checked:", company.SancoesDisponivelEm ?? company.SancoesErro);
} else if (!sancoes.PossuiRegistros) {
  console.log("Nothing on record in:", sancoes.Fontes.map((f) => `${f.Fonte} (${f.AtualizadoEm})`).join(", "));
} else {
  for (const item of sancoes.Itens) {
    console.log(item.Fonte, item.Tipo, "on CNPJ", item.CNPJRegistrado, "since", item.DataInicio);
  }
}

When the block is missing

  • Free plan: "Sancoes": null and "SancoesDisponivelEm": "planos_pagos". The CNPJ data comes normally.
  • Check unavailable right now: "Sancoes": null and "SancoesErro": "indisponivel". The CNPJ lookup is not affected; retry later if the check is mandatory in your flow.
  • ReceitaWS format (?formato=receitaws or /v1/cnpj/{cnpj}): the field does not exist.

Many CNPJs at once

In a batch (POST /consulta/lote, up to 20 CNPJs per call), each found item carries the same block inside Dados. Handy to review your whole supplier base at once.

In the portal

On the platform, the CNPJ lookup shows a "Sanções e embargos" panel with the same data, and the lookup PDF includes the section with the sources and dates. In company lists, you can filter by sanctions and embargoes and export the list with these columns.

Caveats

  • The records republish the official registries of CGU and IBAMA; they are not a judgment by CNPJAPI about the company. When in doubt, check the record at the source.
  • The lookup does not replace official certificates when a process requires them.
  • In embargo descriptions, any CPF (individual taxpayer number) quoted comes masked.

Next steps