The CNPJ (Cadastro Nacional da Pessoa Jurídica) is the 14-digit number that identifies every company in Brazil's national register of legal entities, kept by Receita Federal. dbdireto's CNPJ API automates the public lookup of this register and returns each company's record as structured JSON, ready for onboarding, KYB, supplier registration or your ERP.
The same integration gives you access to more than 200 other official Brazilian sources, from state tax registrations and debt clearance certificates to sanctions lists, so you can build a complete picture of a company with a single provider.
What you get
-
01
Automated validation
CNPJ and CPF lookups at Receita Federal and PGFN straight from your workflow, with no one checking government portals by hand.
-
02
The full record in one call
One document, one response: the company's complete registration record comes back in a single call, with no need to chain several requests.
-
03
No retention of returned data
The response to each lookup is not stored after it is returned to your application. We keep only the access log for auditing, on the legal bases provided by the LGPD.
What the CNPJ lookup returns
Input: the CNPJ (14 digits, with or without formatting).
Response:
- Legal name (razão social) and trade name
- Company opening date
- Registration status: active, suspended, unfit (inapta) or closed (baixada)
- Legal nature (natureza jurídica)
- Main and secondary CNAE codes, Brazil's economic activity classification
- Share capital
- Partners (quadro societário)
- Full address, phone and email
- Responsible federal entity (ente federativo responsável)
Why the status matters
A CNPJ marked unfit (inapta), usually after failing to file mandatory returns, is a red flag: under Brazilian law (article 82 of Law 9,430/1996), invoices issued by an unfit company are considered unreliable and do not support tax credits or expense deductions for the buyer, unless the buyer can prove good faith.
Checking the status before you register, buy from or pay a company removes this risk. For a complete supplier check, with tax regime, state registration and debt certificates, see our tax compliance API.
More lookups in the same integration
- CPF lookup: the CPF is the taxpayer ID of individuals in Brazil. Send the CPF and the date of birth to get the full name, CPF status (regular, pending, suspended or canceled), registration date and check digit.
- Debt clearance certificates (CND) for companies and individuals, covering federal taxes and the National Treasury Attorney's Office (PGFN).
- Simples Nacional and SIMEI status, Brazil's simplified tax regimes for small businesses. See the tax compliance API.
- NF-e: lookup of Brazilian electronic invoices by their 44-digit access key, returning the status and a summary, or the full XML when a digital certificate is registered.
- RADAR: Receita Federal's authorization for foreign trade (import and export) operations.
200+ official Brazilian sources
Beyond Receita Federal, the API gives you more than 200 ready-to-use lookups, organized by category:
- Tax and registration: CNPJ, CPF, Simples Nacional, federal debt clearance certificates, NF-e and RADAR
- State registries: Sintegra in all 27 states, the national CCC register, state debt certificates and SUFRAMA (Manaus Free Trade Zone). See the Sintegra API.
- Courts and background: lawsuits by CPF or CNPJ, arrest warrants (CNJ), labor debt certificate (TST), Superior Military Court (STM) and Federal Police criminal records
- Sanctions and compliance lists: CEIS, CNEP, CEPIM, CEAF, the slave labor employers list, TCU, OFAC, UN sanctions and politically exposed persons (COAF)
- Environmental: IBAMA debt certificate, embargoed areas, federal technical registers (CTF) and operating licenses
- Regulators: ANP (oil and fuels), ANTT (land transport), ANVISA (health surveillance), CADE (antitrust) and CARF (tax appeals)
- Municipal: municipal debt certificates and city registrations in major cities
- Vehicles and reference data: vehicle details by plate or chassis, and IBGE municipality codes
- Peru: SUNAT, SUNARP, RNP and government supplier registers
Can't find the source you need? Our team can build new lookups within 48 hours: tell us what you need and we'll assess feasibility and come back with timeline and cost.
How to integrate
REST API: JSON responses, ideal for modern applications and real-time flows such as checkout and onboarding.
SOAP web service: XML responses (SOAP 1.1/1.2), for legacy systems and corporate ERP integrations.
Batch files: for whole databases, via FTPS or our web interface.
Works with the main ERPs on the market, including SAP, Microsoft Dynamics, Totvs, Senior and Sankhya.
Technical specs
- Protocols: REST and SOAP
- Response formats: JSON, JSONP and XML
- Authentication: secure token per client
- Timeout: configurable per lookup (default 120 s)
- Rate limits: set by contract
- Infrastructure: Microsoft Azure cloud, 24x7 maintenance
- Support: 24-hour SLA (support response, not infrastructure availability)
- Documentation: Swagger / OpenAPI
- Free sandbox for testing
Batch processing
For whole customer or supplier databases, send a spreadsheet (Excel, CSV or TXT) with the CNPJs or CPFs via FTPS or our web interface, and receive the results in the same format, ready to import into your system. Almost every API lookup is also available in batch, including CNPJ, CPF, Simples Nacional, Sintegra, debt certificates and sanctions lists.
Typical uses are database cleanup, system migrations, tax audits and onboarding a database inherited from another company. Small batches (up to 5,000 documents) are processed in a few hours; larger ones take from a few hours to a few business days, and the schedule is agreed at the start of each project.
CNPJ monitoring
Register the CNPJs of your customers and suppliers once, choose a daily, weekly or monthly frequency, and get an email alert whenever something changes. Monitoring covers:
- Registration status at Receita Federal (active, closed, suspended, unfit or null)
- State registration (Sintegra) in all 27 states
- Federal (PGFN), state and municipal debt clearance certificates
- Labor (TST), FGTS and Ministry of Labor (MTE) certificates
- Sanctions lists: CEIS, CEPIM, CNEP, OFAC and UN
Each alert says exactly what changed and when, can go to several recipients (tax, procurement, legal), and every check is kept in an auditable history.
Use cases
- KYB onboarding at banks, fintechs and marketplaces: approve or reject company sign-ups automatically based on CNPJ and CPF data
- Supplier registration in ERPs: block unfit suppliers in SAP, Dynamics, Totvs or legacy systems before they enter the purchasing flow
- Credit decisions: combine CNPJ status, partners' debt certificates and RADAR authorization in a single call
- E-invoice compliance: validate customer data before issuing an NF-e
- M&A due diligence with sanctions lists and debt certificates
- Database cleanup with periodic batch revalidation
Pricing
Pay per query, with prices that go down as your monthly volume grows: from BRL 0.34 down to BRL 0.20 per lookup. CNPJ monitoring costs from BRL 2.50 down to BRL 1.00 per CNPJ per month.
Prices in Brazilian reais (BRL); a minimum contract value applies. Testing in the sandbox is free; production lookups are billed.
Request a quoteFrequently asked questions
How do I look up a Brazilian company by CNPJ via API?
Send the CNPJ (14 digits, with or without formatting) and get a JSON response with the registration fields listed above. If the document is invalid or the source is unavailable, the API returns a standardized status code and error message so you can handle it in your flow. For large volumes, use batch processing instead of individual calls.
Can I also check individuals (CPF)?
Yes. The CPF lookup takes the CPF number and the date of birth and returns the full name, CPF status, registration date and check digit, in compliance with the LGPD.
Does the API return debt clearance certificates (CND)?
Yes. There are specific endpoints for company (CND PJ) and individual (CND PF) debt clearance certificates, as well as lookups at the National Treasury Attorney's Office (PGFN).
Is there a free CNPJ API?
Production use is paid, priced per lookup with volume discounts. We offer a free sandbox for testing during your integration, but every production lookup is billed.
Can I monitor companies instead of looking them up again and again?
Yes. With CNPJ monitoring you register the companies once, choose a daily, weekly or monthly frequency and receive an email whenever a registration status, certificate, address or partner changes.