CNPJ lookup
GET/v1/cnpj/{cnpj}
Returns a company’s registration data from its CNPJ: legal name, status, main activity, address, share capital, email, phones and partners. The source is the Federal Revenue CNPJ open data, up to 30 days old.
Path parameter
- cnpjpathrequired
- CNPJ with 14 characters, with or without punctuation. The alphanumeric CNPJ is accepted.
Only a 200 response uses 1 credit, from the same balance as CPF lookups. Nothing is charged in the sandbox.
- Alphanumeric CNPJ: since July 2026 the Federal Revenue issues CNPJs with letters and numbers. They have 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. The API accepts both formats with or without punctuation, converts letters to uppercase and computes the check digits with the official method (each letter is worth its ASCII code minus 48, with the same modulo 11). The numeric CNPJ remains valid, andPOST /v1/validatealso checks the alphanumeric format. - Checks run in this order: format and check digits (400 with the
INVALID_CNPJ_FORMATerror), balance (402) and, last, the lookup (open data). - The data reflects the latest Federal Revenue publication, up to 30 days old, and is not a real-time query to its system.
- The response has the same format as the other lookups:
success,data(all the company fields) andcredits_remaining(when the toggle is on in the dashboard). The names below live insidedata.statuscan beATIVA,BAIXADA,INAPTA,SUSPENSAorNULA.trade_nameisnullwhen the company has no trade name.share_capitalis the share capital in reais (a number),emailis the company’s registered email (ornull) andphoneslists the company’s phones witharea_code,numberandis_fax.partnerscarries name, qualification,document(tax ID already partially masked by the source),age_rangeandjoined_at(date of entry into the company); partners’ email and phone are not returned.branch_type(MATRIZorFILIAL),company_size(size, as the Federal Revenue reports it),secondary_cnaes(secondary activities, withcodeandtext),simplesandmei(each withopted:true,falseornullwhen the source does not say,opted_atandexcluded_at) andaddress.complementcomplete the record. Inpartners,identifier_typeisINDIVIDUAL,COMPANYorFOREIGN. Companies looked up before the update may lack the newest fields for up to 30 days. - A CNPJ with no record answers 404 with the
CNPJ_NOT_FOUNDcode. If the source is unavailable, the answer is 503. Neither case is charged. - In the sandbox, these CNPJs have data:
12345678000195(active company with a partner),11222333000181(active company with no trade name),11444777000161(closed company),12ABC34501DE35(alphanumeric) and00000000000191(answers 503). Any other valid CNPJ answers 404.
cURL
1curl https://api.brazid.com/v1/cnpj/12345678000195 \2 -H "x-api-key: $BRAZID_API_KEY"
1const res = await fetch('https://api.brazid.com/v1/cnpj/12345678000195', {2 headers: { 'x-api-key': process.env.BRAZID_API_KEY },3});4 5const data = await res.json();6console.log(res.status, data);
1import os2import requests3 4res = requests.get(5 "https://api.brazid.com/v1/cnpj/12345678000195",6 headers={"x-api-key": os.environ["BRAZID_API_KEY"]},7)8 9print(res.status_code, res.json())
1$ch = curl_init("https://api.brazid.com/v1/cnpj/12345678000195");2curl_setopt_array($ch, [3 CURLOPT_RETURNTRANSFER => true,4 CURLOPT_HTTPHEADER => ["x-api-key: " . getenv("BRAZID_API_KEY")],5]);6 7$data = json_decode(curl_exec($ch), true);8$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
200 OK
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}
400 Bad Request
1{2 "error": "INVALID_CNPJ_FORMAT",3 "message": "CNPJ inválido: informe 14 caracteres (com ou sem pontuação) e dígitos verificadores corretos."4}
404 Not Found
1{2 "error": "CNPJ not found",3 "code": "CNPJ_NOT_FOUND"4}