CNPJ+API.SH

CNPJ API

Look up any Brazilian company by CNPJ and get the Receita Federal register record as JSON.

The API.SH CNPJ API returns a Brazilian company or branch from the Receita Federal CNPJ register as JSON. One call gives the legal and trade name, head office or branch, registration status with date and reason, start of activity, main and secondary CNAE activities, legal nature, size, share capital, full address, registered phones and e-mail, Simples and MEI options, tax regime by year and the partners and administrators in the register.

  • 1 endpoint
  • from $1 / 1,000 calls
  • 1,000 free credits / month
  • failed calls free
Brazilian company by CNPJ
GET https://api.api.sh/cnpj/v1/company
{ "success": true }
1 credit · $1 per 1,000 calls

What you can build with the CNPJ API

Customer and supplier onboarding

Check that a CNPJ is active and that the legal name and address match before you sign up a customer or pay a supplier.

KYB and compliance

Read the partners and administrators, legal nature and registration status as part of know-your-business checks.

Tax regime checks

See whether a company opts into Simples Nacional or MEI and its tax regime by year before you invoice.

CRM enrichment

Fill in CNAE activity, size, share capital and address for Brazilian accounts from just their CNPJ.

CNPJ data you get

Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.

CNPJ API endpoints and prices

Every CNPJ endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing

Profiles and accounts1
Brazilian company by CNPJ
/cnpj/v1/company
$1 · $2 PAYG
1 credit

Call the CNPJ API

Brazilian company by CNPJ: GET https://api.api.sh/cnpj/v1/company

curl "https://api.api.sh/cnpj/v1/company?cnpj=33000167000101" \
  -H "x-api-key: $APISH_KEY"
  1. Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
  2. Create an API keyOne key works for all 483 platforms.
  3. Send the requestJSON back in one call. Add output=csv or output=ndjson for files.

Why API.SH for CNPJ data

  • Public data only: no CNPJ login, cookies or account needed
  • One key and one response shape for CNPJ and 482 other platforms
  • Built and maintained by API.SH, not third-party publishers
  • Pay per call; errors on our side cost nothing
  • Live status for every endpoint

API.SH vs the official CNPJ API

The CNPJ register is public data from Receita Federal, and most CNPJ APIs that rank, such as ReceitaWS, CNPJ.ws, SintegrAPI and Infosimples, are third-party services built on it. API.SH returns the same register record with one key that also covers every other site on API.SH.

If you already use ReceitaWS or CNPJ.ws, API.SH is an option when you want Brazilian lookups and other data sources under one key and one JSON shape, at a fixed price per call.

CNPJ API questions

What CNPJ data can I get?+

One call to /cnpj/v1/company returns the legal and trade name, status, start date, CNAE activities, legal nature, size, share capital, address, registered phones and e-mail, Simples and MEI options, tax regime by year, and partners and administrators.

How much does the CNPJ API cost?+

Every CNPJ endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

Is there a free CNPJ API?+

Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /cnpj/v1/company at 1 credit each.

Is there an official CNPJ API from Receita Federal?+

Receita Federal publishes the register, but the lookup APIs developers use are mostly third-party services. API.SH is one of them and returns the register fields as JSON.

Do I need a login or a gov.br account?+

No. You only need your API.SH key. The CNPJ register is public and no endpoint uses a gov.br login.

What format does the CNPJ need to be in?+

Pass the CNPJ as cnpj, for example 33000167000101. Use the full number of the head office or of a specific branch.

Does it return the company's partners (QSA)?+

Yes. The response lists the partners and administrators in the register with name, role, type and entry date.

How do I get started?+

1. Sign up at api.sh. 2. Copy your API key. 3. Call /cnpj/v1/company with cnpj=33000167000101. Docs and request examples are at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.

More government & registries APIs all government & registry APIs →

Start with 1,000 free credits
Every month, on every account. One key works for all 483 platforms.
Get a free API key