Brazil · br_receita_cnpj_cnpj
OpenAPI

Lookup receita · cnpj by CNPJ

GET https://api.latinfo.dev/br/receita/cnpj/cnpj/{cnpj}

An establishment, not necessarily the entire corporate group. Coverage: Published CNPJ legal-entity establishments. Lookup by cnpj as a string, preserving leading zeros. Accepted syntax and normalization are defined by the contract below. Municipality values are Receita codes; resolve against the correct codebook before presenting names. Returns one record. Import time is not observation time; inspect freshness headers.

Contrato da fonte

Publicador
Receita Federal, Brazil
Cobertura
Published CNPJ legal-entity establishments.
Significado do registro
An establishment, not necessarily the entire corporate group.
Identificador
Lookup by cnpj as a string, preserving leading zeros. Accepted syntax and normalization are defined by the contract below.
Padrão aceito
^[0-9A-Z]{12}\d{2}$
Normalização
padStart:14:0
Quantidade de registros
one
Licença
A permissão de reutilização não foi verificada. Acesso público não equivale a uma licença de reutilização.

Limitações conhecidas

  • Municipality values are Receita codes; resolve against the correct codebook before presenting names.

Contrato da fonte para agentes · Documentação da fonte

Autenticação necessária. As requisições REST usam uma chave de api do Latinfo. O console adiciona o cabeçalho de autorização e não armazena a chave.

Parâmetros

cnpjstringpathobrigatório

CNPJ in the source's normalized format. Keep identifiers as strings; preserve leading zeros.

Example: 00000000000191

Exemplo de requisição

curl https://api.latinfo.dev/br/receita/cnpj/cnpj/00000000000191 \
  -H "Authorization: Bearer $LATINFO_API_KEY"

Respostas

200Published source records. Missing data is not a clearance or a negative finding.

Cabeçalhos da resposta

X-Latinfo-Imported-At

Import time, not the date of the government observation.

X-Source-Updated-At

Publisher update time, when known.

X-Latest-Observation-At

Latest date in returned records, when known.

X-Freshness-Status

string

CURRENT · DELAYED · STALE · UNKNOWN
X-Credits-Cost

Actual credits charged for this request.

X-Source-Generation

Opaque immutable source generation. Follow the guarded next-page Link when collecting a history.

Content-Type: application/json

Campos da resposta

cnpj string obrigatório

Lookup by cnpj as a string, preserving leading zeros. Accepted syntax and normalization are defined by the contract below.

razao_social string obrigatório

Registered legal name.

situacao string obrigatório

Receita establishment status: ATIVA, BAIXADA, INAPTA, SUSPENSA or NULA.

ATIVA · SUSPENSA · INAPTA · BAIXADA · NULA

Significado dos valores

TAX_REGISTRATION

ATIVA

Active: Brazil's Federal Revenue reports the CNPJ registration as active.

SUSPENSA

Suspended: Brazil's Federal Revenue reports the CNPJ registration as suspended.

INAPTA

Declared unfit: Brazil's Federal Revenue reports the CNPJ registration as unfit because the entity did not satisfy applicable registration obligations.

BAIXADA

Deregistered: Brazil's Federal Revenue reports the CNPJ registration as deregistered.

NULA

Null registration: Brazil's Federal Revenue reports the CNPJ registration as null.

nome_fantasia string obrigatório

Published trade name; may be absent.

uf string obrigatório

Two-letter Brazilian state code.

municipio string obrigatório

Receita municipality code, not a municipality name.

cnae_principal string obrigatório

Principal CNAE activity code.

Esquema de resposta
{
  "type": "object",
  "properties": {
    "cnpj": {
      "type": "string",
      "description": "Lookup by cnpj as a string, preserving leading zeros. Accepted syntax and normalization are defined by the contract below."
    },
    "razao_social": {
      "type": "string",
      "description": "Registered legal name.",
      "x-latinfo-meaning": "text"
    },
    "situacao": {
      "type": "string",
      "description": "Receita establishment status: ATIVA, BAIXADA, INAPTA, SUSPENSA or NULA.",
      "x-latinfo-meaning": "text",
      "enum": [
        "ATIVA",
        "SUSPENSA",
        "INAPTA",
        "BAIXADA",
        "NULA"
      ],
      "x-latinfo-vocabulary": {
        "id": "br.receita.tax_status.v1",
        "scope": "TAX_REGISTRATION",
        "empty_policy": "reject",
        "values": {
          "ATIVA": {
            "code": "ACTIVE",
            "label_en": "Active",
            "explanation_en": "Brazil's Federal Revenue reports the CNPJ registration as active."
          },
          "SUSPENSA": {
            "code": "SUSPENDED",
            "label_en": "Suspended",
            "explanation_en": "Brazil's Federal Revenue reports the CNPJ registration as suspended."
          },
          "INAPTA": {
            "code": "INACTIVE",
            "label_en": "Declared unfit",
            "explanation_en": "Brazil's Federal Revenue reports the CNPJ registration as unfit because the entity did not satisfy applicable registration obligations."
          },
          "BAIXADA": {
            "code": "CANCELLED",
            "label_en": "Deregistered",
            "explanation_en": "Brazil's Federal Revenue reports the CNPJ registration as deregistered."
          },
          "NULA": {
            "code": "CANCELLED",
            "label_en": "Null registration",
            "explanation_en": "Brazil's Federal Revenue reports the CNPJ registration as null."
          }
        }
      }
    },
    "nome_fantasia": {
      "type": "string",
      "description": "Published trade name; may be absent.",
      "x-latinfo-meaning": "text"
    },
    "uf": {
      "type": "string",
      "description": "Two-letter Brazilian state code.",
      "x-latinfo-meaning": "text"
    },
    "municipio": {
      "type": "string",
      "description": "Receita municipality code, not a municipality name.",
      "x-latinfo-meaning": "text"
    },
    "cnae_principal": {
      "type": "string",
      "description": "Principal CNAE activity code.",
      "x-latinfo-meaning": "code"
    }
  },
  "required": [
    "cnpj",
    "razao_social",
    "situacao",
    "nome_fantasia",
    "uf",
    "municipio",
    "cnae_principal"
  ],
  "additionalProperties": false
}
400Invalid identifier or query. Correct the input before retrying.
Nenhum corpo de resposta documentado.
401Missing or invalid API key. Authenticate before retrying.
Nenhum corpo de resposta documentado.
404No published record, or identifier outside the legal-entity scope. Not proof that the company does not exist.
Nenhum corpo de resposta documentado.
429Rate or credit limit exceeded. Inspect the response and rate-limit headers before retrying.
Nenhum corpo de resposta documentado.
503Source unavailable. Report unavailable, not an empty result.
Nenhum corpo de resposta documentado.
Exemplo JSON

Exemplo ilustrativo do esquema. Não é uma resposta ao vivo.

{
  "cnpj": "string",
  "razao_social": "string",
  "situacao": "ATIVA",
  "nome_fantasia": "string",
  "uf": "string",
  "municipio": "string",
  "cnae_principal": "string"
}

Procedência e limitações

A cobertura varia por país e fonte pública. Um campo ausente não comprova que o fato não exista. Os registros públicos podem ter atrasos ou erros; revise as evidências e a data da fonte antes de usar um resultado.