Guide · Brazil · Lookup and validation

CNPJ API: look up and validate a Brazilian company

A customer types a Brazilian CNPJ, its 8-digit root or the first letters of a company name; your form fills in the legal name, legal form, status, registered address, capital and CNAE code from the Receita Federal register. One key, and the same response shape as every other country the API covers.

Limits: company records only (no partners or officers, no VAT number, no insolvency notices); commercial legal persons, one record per CNPJ root; sole proprietors and MEI are not served; updated monthly.

Brazil at a glance

Register: CNPJ (Receita Federal do Brasil)

Identifiers CNPJ

  • Company recordsYes
  • OfficersNo
  • Insolvency noticesIn the status only
  • Corporate eventsRegister changes
  • MonitoringYes
  • Financial statementsListed companies
  • VAT numberNo
  • NACE classDerived via ISIC
  • UpdatedMonthly

The guide below states the limits of every row. Financial statements are on the Scale plan and above; the other plans and the free trial get 10 calls a month.

Price From EUR 9.99 a month (Starter plan)

In other languagesPortuguês (Brasil)

Sign up

Try Brazil live

Look up a company in Brazil with the shared demo key. No sign-up.

The demo key is shared and capped per page view; your own key has the limits of your plan.

What you get, and what you do not

Company records from the Cadastro Nacional da Pessoa Jurídica (CNPJ) of the Receita Federal do Brasil: legal name, trade name, legal form, status, registered address with the state, share capital where filed, founding date and the CNAE activity code. Commercial legal persons only: limited companies (Ltda.), corporations (S.A.), simple societies, single-member limited companies (EIRELI), state-owned companies and cooperatives. MEI and other sole proprietors (empresários individuais) and every other natural-person form, single-lawyer firms, non-profit entities, bodies of the public administration and branches are never served. One record per CNPJ root, with the head office's 14-character CNPJ; the 8-digit root finds it too. Status is active, suspended, inapta (served as active_strike_off_pending), deregistered or merged, and judicial recovery, bankruptcy and liquidation are read from the register's special situation. The activity code is CNAE 2.3 (seven digits), not a NACE code; a NACE Rev. 2 class (or only the NACE division) is derived from it through ISIC Rev. 4 where the official tables allow, and nace_derived marks it. No VAT number (a vat search is refused), no partners (QSA), no officers and no contacts, no registry-compliance signal and no insolvency notices. Updated monthly. Register-change events (name, status, legal form and address changes, dated by the monthly read that first sees them, none before the first load in October 2026) and company monitoring are available.

That is the record of a Brazilian company as an onboarding form, an invoice check or a CRM row needs it. If you need partners (QSA), officers or contacts for Brazil, this is not the API for it. To learn what the register is, start with What is the CNPJ? (also em português).

What the Brazilian record gives your product

  • Exact match on the CNPJ. company_number=33.000.167/0001-01 with country=BR; punctuation is optional. The two check digits are strict: a CNPJ that fails them, a string of one repeated character or an 11-digit CPF is a 400 validation error.
  • The root finds the head office. The 8-digit root, company_number=33000167, resolves to the head office's record. Branches are not served.
  • Letters are allowed. Since July 2026 the root and the order of a CNPJ may contain capital letters; the check digits stay digits.
  • Autocomplete by name. ?name= is a normalised, partial match on the legal name and the trade name. Each call is one request.
  • The fields a form needs. The legal name and trade name; the legal form; status; the head office's address, postal code, city and state in region; capital in BRL; the CNAE code and its title.
  • The register's own state. status includes suspended, active_strike_off_pending (inapta), in_liquidation and in_restructuring (from the special situation) and deregistered, so a company in a procedure is not served as plain active.
  • One schema for every country. The same response shape as the other countries, selected with country=BR.
FieldWhat it holds for Brazil
company_numberThe head office's 14-character CNPJ, without punctuation: 33000167000101. It is written 33.000.167/0001-01.
company_name, registry_details.trade_nameThe legal name and the trade name (nome fantasia).
legal_formThe legal nature (sociedade limitada, sociedade anônima and so on).
status, local_statusThe standard reading of the register's state; the register's own text (ativa, baixada) is in local_status. The reason, its date and the special situation are in registry_details.
address, postal_code, city, regionThe head office's address; region is the state.
capital_amount, capital_currencyShare capital in BRL where filed.
activity_code, activity_code_scheme, activity_descriptionThe main CNAE 2.3 subclass (seven digits), scheme BR-CNAE-2.3, and its title in Portuguese; the secondary codes are in registry_details. nace_code stays empty.

An abridged answer for Petrobras (illustrative; the real object has the full standard company fields):

{
  "data": [
    {
      "country": "BR",
      "company_number": "33000167000101",
      "company_name": "PETROLEO BRASILEIRO S A PETROBRAS",
      "status": "active",
      "founding_date": "1966-09-28",
      "city": "RIO DE JANEIRO",
      "region": "Rio de Janeiro",
      "capital_amount": "205431960490.52",
      "capital_currency": "BRL",
      "activity_code": "0600001",
      "activity_code_scheme": "BR-CNAE-2.3"
    }
  ]
}

Validate before you call

The check is strict, so a form can reject a mistyped CNPJ before it costs a call. The identifier validator runs the same arithmetic in the browser:

// Brazilian CNPJ: 12 characters (digits or capital letters) + 2 check digits. One routine covers both formats.
const W1 = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
const W2 = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
const dv = (body) => {
  const w = body.length === 12 ? W1 : W2
  const r = [...body].reduce((s, c, i) => s + (c.charCodeAt(0) - 48) * w[i], 0) % 11
  return r < 2 ? 0 : 11 - r
}
export function checkCnpj(input) {
  const t = String(input).replace(/[ ./-]/g, '').toUpperCase()
  if (!/^[0-9A-Z]{12}[0-9]{2}$/.test(t) || new Set(t).size === 1) return null
  const d1 = dv(t.slice(0, 12)), d2 = dv(t.slice(0, 12) + d1)
  return t.slice(12) === String(d1) + d2 ? t : null
}

checkCnpj('33.000.167/0001-01')   // '33000167000101'  (Petrobras)
checkCnpj('00.000.000/0001-91')   // '00000000000191'  (Banco do Brasil)
checkCnpj('33.000.167/0001-02')   // null: fails the check digits

A passing check says the CNPJ is well formed, never that the company exists or is still active. That is what the lookup is for.

Two calls and a list

# by CNPJ (or by the 8-digit root, which finds the head office)
curl -H "Authorization: Bearer rk_live_..." "https://api.prometiam.com/functions/v1/risk-api/companies/search?company_number=33.000.167/0001-01&country=BR"

# by name, for a type-ahead field
curl -H "Authorization: Bearer rk_live_..." "https://api.prometiam.com/functions/v1/risk-api/companies/search?name=vale&country=BR"

# a list of up to 100 in one call, each item counted as one request
curl -X POST "https://api.prometiam.com/functions/v1/risk-api/companies/lookup" -H "Authorization: Bearer rk_live_..." -H "Content-Type: application/json" -d '{"items":[{"country":"BR","company_number":"33000167000101"},{"country":"BR","company_number":"33592510000154"}]}'

The search returns the record's id; pass it to the detail endpoint, GET /companies/ followed by the id.

What Brazil does not carry

  • Partners and officers. The partners file (QSA) is never read.
  • Contacts. The phone and e-mail columns of the register are never read.
  • A VAT number. None is given for Brazil and a vat search is refused.
  • A NACE code. The activity code is CNAE 2.3, which is not mapped to NACE.
  • Insolvency notices. Brazil is not one of the sixteen insolvency markets. Judicial recovery, bankruptcy and liquidation show in status when the register records them.
  • MEI and other sole proprietors, single-lawyer firms, non-profit entities, bodies of the public administration and branches. Never served, so a lookup of one returns nothing even though it exists.
  • A registry-compliance signal. Not served for Brazil.

FAQ

How do I look up a Brazilian company by CNPJ from an API?
Call GET /companies/search?company_number=33.000.167/0001-01&country=BR. Punctuation is optional. The check digits are strict: a CNPJ that fails them, a repeated character or an 11-digit CPF is a 400 validation error.

Can I look up a company by the 8-digit root?
Yes. company_number=33000167 resolves to the head office, which is the one record Prometiam serves per root. Branches are not served.

Does the CNPJ validation accept letters?
Yes. Since July 2026 the root and the order may contain capital letters; the check digits remain digits.

Which activity code does it carry?
The main CNAE 2.3 subclass, seven digits, with scheme BR-CNAE-2.3 and its title in Portuguese. It is not mapped to NACE.

Does the record show judicial recovery or bankruptcy?
Yes, through the status, read from the special situation of the register. There are no insolvency notices.

Which Brazilian entities are covered?
Limited companies, corporations, simple societies, single-member limited companies (EIRELI), state-owned companies and cooperatives. MEI and other sole proprietors, natural-person forms, single-lawyer firms, non-profit entities, bodies of the public administration and branches are never served.

Does it include partners or contacts?
No. There are no partners (QSA), officers or contacts.

How fresh is the data?
Monthly: the Receita publishes one full file a month.

Is there a way to try it before signing up?
Yes: the free CNPJ lookup runs the same call with a shared key.

Does it have register-change events and monitoring?
Yes. Register-change events (name, status, legal form and address changes, dated by the monthly read that first sees them, none before the first load in October 2026) and company monitoring are available.

Everything about Brazil

Official sources: Receita Federal, CNPJ open data.

Contains data from the Cadastro Nacional da Pessoa Jurídica (CNPJ), Receita Federal do Brasil, published as open data (CC BY). Adapted by Prometiam.