Skip to content
BrazID

CNPJ lookup API, built on Federal Revenue open data

Send a CNPJ and get the legal name, registration status, activity, address and partners as standard JSON. It accepts the number with or without punctuation and already supports the new alphanumeric CNPJ.

Free plan with 20 lookups a month. No credit card.

Lookup result

CNPJ
12.345.678/0001-95
Legal name
Empresa Exemplo Tecnologia Ltda
Status
Active
Main activity
6201501
Active company

What a lookup returns

Public registry data, ready to vet a customer, a supplier or a partner.

Identification
CNPJ, legal name, trade name, legal nature and share capital, in the format the Federal Revenue uses.
Registration status
Active, closed, unfit or suspended, with the status date and the company opening date.
Activities and size
Main and secondary CNAE, company size, headquarters or branch, and the Simples Nacional and MEI enrollment, with dates.
Address
Street, number, complement, neighborhood, city, state and ZIP code of the registered headquarters, plus the company’s email and phones.
Partners
Name, qualification, type (individual, company or foreign), partially masked tax ID, age range and date of entry into the company for each partner or administrator.
Data freshness
The data reflects the Federal Revenue’s latest open data publication, up to 30 days old.

How a lookup works

  1. 1

    Local validation

    Before any search we check the format and the check digits. An invalid CNPJ returns a 400 error and costs no credit.

  2. 2

    Fast answers

    If the CNPJ was looked up recently, the answer comes back in milliseconds.

  3. 3

    Federal Revenue open data

    When needed, we query the CNPJ open data and return the result.

Ready for the alphanumeric CNPJ

Since July 2026 the Federal Revenue issues CNPJs with letters and numbers. BrazID already validates and looks up both formats, with no change to your integration.

12.ABC.345/01DE-35

What the new format looks like
14 characters: the first 12 can be letters (A to Z) or digits, and the last 2 are always check digits. Example: 12.ABC.345/01DE-35.
Official validation method
We compute the check digits the way the Federal Revenue defines. The numeric CNPJ remains valid and is checked the same way.
Flexible input
With or without punctuation, uppercase or lowercase. The API normalizes before looking up, and the response returns the CNPJ without punctuation.
Validate for free
The POST /v1/validate route checks CPF and CNPJ, including the alphanumeric one, without spending a credit.

One call, one JSON

Authenticate with the x-api-key header and pass the CNPJ in the path, with or without punctuation.

Endpoint documentation

cURL GET /v1/cnpj/12345678000195

1curl -X GET \2 'https://api.brazid.com/v1/cnpj/12345678000195' \3 -H 'x-api-key: YOUR_API_KEY'

Response

1{2 "success": true,3 "data": {4 "cnpj": "12345678000195",5 "legal_name": "EMPRESA EXEMPLO TECNOLOGIA LTDA",6 "trade_name": "EXEMPLO TECH",7 "status": "ATIVA",8 "status_date": "2020-03-15",9 "opening_date": "2020-03-15",10 "legal_nature": "206-2 - Sociedade Empresária Limitada",11 "share_capital": 100000,12 "email": "[email protected]",13 "phones": [14 {15 "area_code": "11",16 "number": "30000000",17 "is_fax": false18 }19 ],20 "main_cnae": {21 "code": "6201501",22 "text": "Desenvolvimento de programas de computador sob encomenda"23 },24 "branch_type": "MATRIZ",25 "company_size": "Microempresa (ME)",26 "secondary_cnaes": [27 {28 "code": "6204000",29 "text": "Consultoria em tecnologia da informação"30 }31 ],32 "simples": {33 "opted": true,34 "opted_at": "2020-03-15",35 "excluded_at": null36 },37 "mei": {38 "opted": false,39 "opted_at": null,40 "excluded_at": null41 },42 "address": {43 "street": "RUA DAS ACACIAS",44 "number": "100",45 "complement": "SALA 1",46 "neighborhood": "CENTRO",47 "city": "SAO PAULO",48 "state": "SP",49 "zip_code": "01001000"50 },51 "partners": [52 {53 "name": "MARIA SILVA SANTOS",54 "qualification": "49-Sócio-Administrador",55 "document": "***456789**",56 "age_range": "41 a 50 anos",57 "joined_at": "2018-03-12",58 "identifier_type": "INDIVIDUAL"59 }60 ]61 },62 "credits_remaining": 1963}

Lookup completed successfully.

What it costs

1 credit per successful lookup

Only a 200 response uses a credit. Invalid CNPJ (400), not found (404) and unavailability (503) are free.

Free sandbox

Sandbox keys (brz_test_) answer with test data and never charge your balance. Use them to integrate without spending credits.

Same balance as CPF

Plan credits work for CPF and CNPJ lookups. Past your allowance, overage follows your plan rules.

Where to use it

B2B customer signup

Fill in the legal name and address from the CNPJ and reject closed or unfit companies.

Supplier and partner vetting

Confirm the registration status and the partners before signing a contract.

Data enrichment

Update lead and customer databases with activity and location.

Frequently asked questions

Where does the CNPJ data come from?

From the CNPJ open data published by the Federal Revenue. It is not a real-time query to the Revenue system: the data reflects the latest publication, up to 30 days old.

Does the API accept the alphanumeric CNPJ?

Yes. Since July 2026 the Federal Revenue issues CNPJs with letters and numbers. Check digit validation and lookups work for both formats.

What happens if I send an invalid CNPJ?

The API answers 400 with the INVALID_CNPJ_FORMAT error, without querying any source and without spending a credit. To only check a number, POST /v1/validate is free.

Does the data include partners’ tax IDs, email or phone?

Only in part. We return name, qualification, age range, date of entry and the tax ID already partially masked by the Revenue (e.g. ***345856**). Full tax IDs, emails and phone numbers are not part of the response.

How much does each lookup cost?

Each 200 response uses 1 credit from your plan. The free plan includes 20 credits a month, no card needed. See the plans on the pricing page.

Vet companies without spreadsheets

Create your account, generate a sandbox key and run your first CNPJ lookup in minutes.

Free plan with 20 lookups a month. No credit card.