# CNPJ API documentation

> Brazilian company data API: CNPJ lookup and search, partners, tax regime, state registrations, SUFRAMA and CEP, what each guide covers and how to get started.

> **Tip:** Concepts on this page: [Data available on CNPJá](https://cnpja.com/en-us/docs/data), [Data sources](https://cnpja.com/en-us/docs/data/sources) and [Data freshness](https://cnpja.com/en-us/docs/data/freshness).

The CNPJá API delivers the registration of Brazilian companies and related data, such as partners, tax regime, state registrations, SUFRAMA registrations and CEPs, read from public sources such as the Receita Federal. It is the same database as the app, accessed by your system.

## About the CNPJá API

The API is organized around REST: each operation is a predictable URL under the base `https://api.cnpja.com`, with the `/v2` prefix, accessed over HTTPS. Use `GET` to look up and search data, and `POST`, `PATCH` and `DELETE` to manage lists. `2xx` statuses indicate success, `4xx` a problem with the request and `5xx` a failure on the API side.

```http
GET /v2/establishments/37335118000180 HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
```

Response from [Lookup CNPJ](https://cnpja.com/en-us/docs/api/reference#tag/establishments/GET/v2/establishments/%7btaxId%7d), trimmed:

```json
{
  "taxId": "37335118000180",
  "tradeName": "Cnpja",
  "status": { "code": "ACTIVE", "label": "Active" },
  "company": {
    "id": "37335118",
    "legalName": "CNPJA TECNOLOGIA LTDA"
  },
  "address": { "city": "São Paulo", "state": "SP" },
  "updatedAt": "2026-01-27T03:00:00.000Z"
}
```

The data is organized into resources, each with its own identifier:

| Resource | Identifier |
|---|---|
| [Company](https://cnpja.com/en-us/docs/glossary#empresa--company) | [CNPJ root](https://cnpja.com/en-us/docs/glossary#cnpj-raiz--cnpj-root), the first 8 characters |
| [Establishment](https://cnpja.com/en-us/docs/glossary#estabelecimento--establishment) | 14-character [CNPJ](https://cnpja.com/en-us/docs/glossary#cnpj) |
| [Person](https://cnpja.com/en-us/docs/glossary#pessoa--person) | Its own `id`, which is neither the CPF nor the CNPJ |
| [Individual](https://cnpja.com/en-us/docs/glossary#indivíduo--individual) | [CPF](https://cnpja.com/en-us/docs/glossary#cpf) with a state or SUFRAMA registration |
| [CEP](https://cnpja.com/en-us/docs/glossary#cep) | 8 digits |
| [List](https://cnpja.com/en-us/docs/glossary#lista--list) | Its own `id`, belonging to the organization |

What each resource holds is in [Company, establishment, person, individual, CEP and list](https://cnpja.com/en-us/docs/data#resources), and where each item comes from, in [Data sources](https://cnpja.com/en-us/docs/data/sources).

These guides explain what each feature delivers and when to use it. The full technical specification, with every operation, parameter and field, is in the [Reference](https://cnpja.com/en-us/docs/api/reference), and registry and tax terms are in the [Glossary](https://cnpja.com/en-us/docs/glossary).

## Features

| Guide | What it delivers | Operations |
|---|---|---|
| [CNPJ lookup](https://cnpja.com/en-us/docs/api/cnpj-lookup) | Receita Federal registration of a CNPJ, with registration status, address, contacts, economic activities ([CNAE](https://cnpja.com/en-us/docs/glossary#cnae)) and company data, plus optional resources requested in `expand` | Lookup CNPJ, Lookup company |
| [CNPJ search and lists](https://cnpja.com/en-us/docs/api/cnpj-search) | Establishments filtered by activity, address, size, tax regime, registration status, dates and contacts, sorted by relevance, CNPJ, opening date, share capital or legal name, with cursor pagination, and CNPJ lists to restrict or exclude results | Search CNPJ, Create list, Search lists, Lookup list, Update list, Delete list |
| [Partners and people](https://cnpja.com/en-us/docs/api/partners) | Each company's QSA and the current participations of each natural person, legal entity or foreign party | Lookup CNPJ, Lookup company, Search CNPJ, Lookup person, Search people |
| [Tax regime](https://cnpja.com/en-us/docs/api/tax-regime) | The company's current regime, Simples Nacional and [SIMEI](https://cnpja.com/en-us/docs/glossary#simei) opt-in, IBS and CBS regular regime option, and period history | Lookup CNPJ, Lookup company, Search CNPJ |
| [State registrations](https://cnpja.com/en-us/docs/api/state-registrations) | [State registrations](https://cnpja.com/en-us/docs/glossary#inscrição-estadual--state-registration) from the CCC by state, with type, status and enabled tax documents, by CNPJ or by CPF | Lookup CNPJ, Lookup CPF |
| [SUFRAMA](https://cnpja.com/en-us/docs/api/suframa) | SUFRAMA registrations, with status, registration date and approved project, by CNPJ or by CPF | Lookup CNPJ, Lookup CPF |
| [Certificates](https://cnpja.com/en-us/docs/api/certificates) | A single PDF, the dossier, with the [certificates](https://cnpja.com/en-us/docs/glossary#comprovante--certificate) you choose, which carry the registration at the source on the date of the query, each as the source's original PDF or as a reproduction generated by CNPJá: the CNPJ registration certificate, the QSA, Simples Nacional opt-in, and CCC and SUFRAMA registrations | Issue CNPJ dossier, Issue CPF dossier |
| [Location and maps](https://cnpja.com/en-us/docs/api/location) | Coordinates of an establishment's address, a map image and a street view image | Lookup CNPJ, Render CNPJ map, Render CNPJ street view |
| [CEP and addresses](https://cnpja.com/en-us/docs/api/postal-codes) | Address, type and status of a CEP as registered in the DNE, and CEP search by address or prefix | Lookup CEP, Search CEP |

## How it works

### Authentication

Outside public access, every request carries one of the organization's API keys in the `Authorization` header, as the whole value and with no prefix, and the key stays on your server only. See [Authentication](https://cnpja.com/en-us/docs/api/authentication) and, to create and revoke keys, [Managing API keys](https://cnpja.com/en-us/docs/organizations/api-keys).

### Public access

Lookup CNPJ and Lookup CEP also accept requests without a key and without parameters, with the default values and limits per IP address. See [Public access](https://cnpja.com/en-us/docs/api/public-access).

### Response format

Responses are JSON, except the PDF dossiers and the images; coded values carry a stable `code` and a `label` in the requested language, and searches are paginated with a cursor. See [Response format](https://cnpja.com/en-us/docs/api/responses).

### Data freshness

Each resource comes from a [live query](https://cnpja.com/en-us/docs/glossary#consulta-em-tempo-real--live-query), which brings the data available at the source at the time of the query, or from the cache, according to the max age requested in `maxAge`; a failure at the source can result in `206`, a partial success. See [Max age and partial success](https://cnpja.com/en-us/docs/api/max-age) and [Data freshness](https://cnpja.com/en-us/docs/data/freshness).

### Billing

Each resource delivered is charged separately, in live or cached queries, from the same [quota](https://cnpja.com/en-us/docs/glossary#cota--allowance) the app uses, and responses do not report usage. See [Queries and quota](https://cnpja.com/en-us/docs/billing/queries-and-quotas) and each operation's consumption in the [Metering Rules](https://cnpja.com/en-us/legal/metering#api).

### Usage limits

The API limits requests per second and concurrent requests, by plan, and the duration of each request, and answers `429` above a limit. See [Limits and errors](https://cnpja.com/en-us/docs/api/limits-and-errors) and the organization's limits in [Usage limits](https://cnpja.com/en-us/docs/billing/limits).

## Use cases

- **Customer onboarding:** validate a new customer's CNPJ and fill in legal name, address and contacts with [CNPJ lookup](https://cnpja.com/en-us/docs/api/cnpj-lookup), or the address from the CEP with [CEP and addresses](https://cnpja.com/en-us/docs/api/postal-codes).
- **Supplier vetting:** support the check of the registration status and the partners before doing business, with [CNPJ lookup](https://cnpja.com/en-us/docs/api/cnpj-lookup) and [Partners and people](https://cnpja.com/en-us/docs/api/partners).
- **Invoice issuance:** support the check of the recipient's tax regime, Simples Nacional opt-in and state registrations, with [Tax regime](https://cnpja.com/en-us/docs/api/tax-regime) and [State registrations](https://cnpja.com/en-us/docs/api/state-registrations).
- **Manaus Free Trade Zone benefits:** check the SUFRAMA registrations of a CNPJ or CPF with [SUFRAMA](https://cnpja.com/en-us/docs/api/suframa).
- **Prospecting:** find companies by activity, municipality, size or opening date, excluding current customers, with [CNPJ search and lists](https://cnpja.com/en-us/docs/api/cnpj-search), within the [Terms of Use](https://cnpja.com/en-us/legal/terms#acceptable-use).
- **Economic group analysis:** see which companies a person takes part in with [Partners and people](https://cnpja.com/en-us/docs/api/partners).
- **Audit and compliance:** keep as PDF a CNPJ's or CPF's registration at the source, on the date of the query, with [Certificates](https://cnpja.com/en-us/docs/api/certificates).
- **Logistics and field visits:** get an establishment's coordinates or show its address on a map with [Location and maps](https://cnpja.com/en-us/docs/api/location).
- **Low-volume forms:** look up CNPJs and CEPs without a key with [Public access](https://cnpja.com/en-us/docs/api/public-access).

## Next steps

- **No account:** use [Public access](https://cnpja.com/en-us/docs/api/public-access) to look up CNPJs and CEPs directly.
- **First request with a key:** [create your account](https://cnpja.com/en-us/signup) and follow [First request](https://cnpja.com/en-us/docs/api/first-request) to get a key and use every parameter.
- **Plan choice:** compare each plan's quotas in [Free, Pro and Enterprise plans](https://cnpja.com/en-us/docs/billing/plans) and the prices on the [pricing page](https://cnpja.com/en-us/pricing).
- **Questions:** find short answers in [Frequently asked questions](https://cnpja.com/en-us/docs/api/faq).
- **Full reference:** browse the [Reference](https://cnpja.com/en-us/docs/api/reference) for every operation, parameter and field, or [download the OpenAPI file](https://cnpja.com/en-us/docs/api/reference/openapi.json) to import it into tools that support this format. Trying an operation in the Reference with your key consumes the organization's quota like any request, under the [Metering Rules](https://cnpja.com/en-us/legal/metering#platform).
