> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# CNPJá

> Brazilian company registry (CNPJ) data: establishments, companies with partners, Simples Nacional and Receita Federal records, and filtered searches.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/cnpja.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=65d63f8f6929b059ce0b4397b36a5acd)

[Web Catalog · Company data](https://docs.webrouter.net/data-apis.md?category=company-data)

Needs&#x20;

`CNPJA_API_KEY`

Endpoints

9

Auth

Key in header

[Vendor docs](https://api.cnpja.com/docs)

## Setup

| Variable | | What it is |
| - | - | - |
| `CNPJA_API_KEY` | required | A CNPJá commercial API key (cnpja.com account), sent as the raw Authorization header value with no prefix. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Credits (₪): an online CNPJ lookup costs 1, a cached one 0; add-ons (simples, suframa, geocoding, registrations) add 1 each. Company, person-by-id and postal-code lookups are free. Searches cost 1 per 10 records.
* strategy=CACHE never charges; it returns 404 when nothing is cached. sync=true makes the response carry the charge in the cnpja-request-cost header.
* CNPJ and CPF values are digits only. A company id is the first 8 digits of the CNPJ (the root); an establishment is the full 14-digit CNPJ.
* Searches page with the token returned by the previous page; a token excludes every other filter. Filter names are dotted (names.in, address.state.in) and lists are comma-separated.
* Docs and field descriptions are in Portuguese. The keyless public API at open.cnpja.com is a separate, rate-limited service not in this entry.

## Endpoints

GET

Look up a CNPJ

One establishment: legal and trade name, status, address, phones, emails, activities (CNAE), partners, and optional Simples, state registrations, SUFRAMA and geocode.

[Open](#cnpja-office-get)

GET

Search establishments

CNPJs matching filters on name, status, founding date, address, activity (CNAE), size, Simples/MEI, phones and emails.

[Open](#cnpja-office-search)

GET

Get a company

A company (CNPJ root) with all its partners and establishments.

[Open](#cnpja-company-get)

GET

Search people

Partners and administrators by name, type, partial CPF/CNPJ, age band or country.

[Open](#cnpja-person-search)

GET

Get a person

One person and the companies they are a partner in.

[Open](#cnpja-person-get)

GET

Get the Receita Federal record

The Receita Federal registration: details, economic activities and partners and administrators (QSA).

[Open](#cnpja-rfb-get)

GET

Get Simples Nacional status

Simples Nacional option and MEI status with dates, optionally with history.

[Open](#cnpja-simples-get)

GET

Look up a postal code

Address and IBGE municipality for a CEP.

[Open](#cnpja-zip-get)

GET

Get credit balance

Credits remaining on the account.

[Open](#cnpja-credit-get)

### Look up a CNPJ

GET

`/office/{taxId}`

`cnpja.office.get`

One establishment: legal and trade name, status, address, phones, emails, activities (CNAE), partners, and optional Simples, state registrations, SUFRAMA and geocode.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`taxId` required</td><td>string</td><td>path</td><td>CNPJ, digits only. Example `37335118000180`</td></tr>

    <tr>
      <td>
        `simples`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        +1 credit: add Simples Nacional and MEI status.
      </td>
    </tr>

    <tr>
      <td>
        `simplesHistory`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        +1 credit: add past Simples and MEI periods.
      </td>
    </tr>

    <tr><td>`registrations`</td><td>string</td><td>query</td><td>+1 credit (CCC) or +1 per state (SINTEGRA): state registrations for these UFs, comma-separated; ORIGIN or ALL also accepted. Example `ORIGIN`</td></tr>
    <tr><td>`registrationsSource`</td><td>string</td><td>query</td><td>Source for state registrations; default AUTO. One of `AUTO`, `CCC`, `SINTEGRA`</td></tr>

    <tr>
      <td>
        `suframa`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        +1 credit: add the SUFRAMA registration.
      </td>
    </tr>

    <tr>
      <td>
        `geocoding`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        +1 credit: add latitude and longitude.
      </td>
    </tr>

    <tr><td>`strategy`</td><td>string</td><td>query</td><td>CACHE: cache only, never charged, 404 when absent. CACHE\_IF\_FRESH: cache within maxAge, else online. CACHE\_IF\_ERROR (default): as CACHE\_IF\_FRESH, falling back to cache within maxStale if online fails. ONLINE: always online (prefer maxAge=1). One of `ONLINE`, `CACHE_IF_FRESH`, `CACHE_IF_ERROR`, `CACHE`</td></tr>

    <tr>
      <td>
        `maxAge`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted; default 45.
      </td>
    </tr>

    <tr>
      <td>
        `maxStale`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted when the online lookup fails (CACHE\_IF\_ERROR); default 365.
      </td>
    </tr>

    <tr>
      <td>
        `sync`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Settle credits synchronously and return the cnpja-request-cost header.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Corpo API](https://docs.webrouter.net/data-apis/corpoapi.md#corpoapi-company-verify), [FMCSA QCMobile (SAFER carrier data)](https://docs.webrouter.net/data-apis/fmcsa.md#fmcsa-carriers-basics), [Societe.com API Pro](https://docs.webrouter.net/data-apis/societe-com.md#societe-com-companies-exists), [VOYGR](https://docs.webrouter.net/data-apis/voygr.md#voygr-validate)

```python Python theme={null}
router.call_data_api("cnpja.office.get", {'taxId': '37335118000180', 'registrations': 'ORIGIN'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.office.get", params={"taxId": "37335118000180", "registrations": "ORIGIN"})
```

> [!NOTE]
>
> * 1 credit online, 0 from cache, plus add-ons.

### Search establishments

GET

`/office`

`cnpja.office.search`

CNPJs matching filters on name, status, founding date, address, activity (CNAE), size, Simples/MEI, phones and emails.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `token`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Paging token from the previous page; excludes every other filter.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Records per page; default 10.
      </td>
    </tr>

    <tr>
      <td>
        `names_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Terms in the legal or trade name: space-separated must all match one company, comma-separated match different ones.
      </td>
    </tr>

    <tr><td>`status_id_in`</td><td>string</td><td>query</td><td>Registration status codes, comma-separated: 1 null, 2 active, 3 suspended, 4 unfit, 8 closed. Example `2`</td></tr>

    <tr>
      <td>
        `main_activity_id_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Main CNAE activity codes, comma-separated.
      </td>
    </tr>

    <tr>
      <td>
        `activities_id_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Main or secondary CNAE codes, comma-separated.
      </td>
    </tr>

    <tr><td>`address_state_in`</td><td>string</td><td>query</td><td>States (UF), comma-separated. Example `SP`</td></tr>

    <tr>
      <td>
        `address_municipality_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        IBGE municipality codes, comma-separated.
      </td>
    </tr>

    <tr>
      <td>
        `founded_gte`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Opened on or after this date.
      </td>
    </tr>

    <tr>
      <td>
        `founded_lte`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Opened on or before this date.
      </td>
    </tr>

    <tr>
      <td>
        `head_eq`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true: head offices only; false: branches only.
      </td>
    </tr>

    <tr>
      <td>
        `company_size_id_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Company size codes: 1 micro (ME), 3 small (EPP), 5 other.
      </td>
    </tr>

    <tr>
      <td>
        `company_simples_optant_eq`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true: Simples Nacional optants only.
      </td>
    </tr>

    <tr>
      <td>
        `phones_ex`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true: only establishments with a phone.
      </td>
    </tr>

    <tr>
      <td>
        `emails_ex`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        true: only establishments with an email.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Adzuna](https://docs.webrouter.net/data-apis/adzuna.md#adzuna-companies-top), [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-company-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-companies-search), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-symbol-search), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-search)

```python Python theme={null}
router.call_data_api("cnpja.office.search", {'status_id_in': '2', 'address_state_in': 'SP'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.office.search", params={"status_id_in": "2", "address_state_in": "SP"})
```

> [!NOTE]
>
> * 1 credit per 10 records returned.

### Get a company

GET

`/company/{companyId}`

`cnpja.company.get`

A company (CNPJ root) with all its partners and establishments.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`companyId` required</td><td>string</td><td>path</td><td>The first 8 digits of the CNPJ. Example `37335118`</td></tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Corpo API](https://docs.webrouter.net/data-apis/corpoapi.md#corpoapi-company-shareholders), [Ethplorer](https://docs.webrouter.net/data-apis/ethplorer.md#ethplorer-token-top-holders), [OpenRegister](https://docs.webrouter.net/data-apis/openregister.md#openregister-companies-owners)

```python Python theme={null}
router.call_data_api("cnpja.company.get", {'companyId': '37335118'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.company.get", params={"companyId": "37335118"})
```

> [!NOTE]
>
> * Free; served from cache, refreshed every 30 days.

### Search people

GET

`/person`

`cnpja.person.search`

Partners and administrators by name, type, partial CPF/CNPJ, age band or country.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `token`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Paging token from the previous page; excludes every other filter.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Records per page; default 10.
      </td>
    </tr>

    <tr>
      <td>
        `name_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Names: space-separated must all match one person, comma-separated match different ones.
      </td>
    </tr>

    <tr>
      <td>
        `type_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated: NATURAL, LEGAL, FOREIGN, UNKNOWN.
      </td>
    </tr>

    <tr>
      <td>
        `taxId_in`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        CPFs or CNPJs, comma-separated; CPFs match on digits 4 to 9 only.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-people-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-people-search), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-search-people), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-people-search), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-person-search), [BetterContact](https://docs.webrouter.net/data-apis/bettercontact.md#bettercontact-leads-search)

```python Python theme={null}
router.call_data_api("cnpja.person.search")
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.person.search")
```

> [!NOTE]
>
> * 1 credit per 10 records returned.

### Get a person

GET

`/person/{personId}`

`cnpja.person.get`

One person and the companies they are a partner in.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `personId`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The person's CNPJá id, from a search or a company's partners.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-people-reverse-lookup), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-profile-get), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-linkedin-profile), [Anymail Finder](https://docs.webrouter.net/data-apis/anymailfinder.md#anymailfinder-person-reverse-lookup), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-people-enrich), [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-person-enrich)

> [!NOTE]
>
> * Free.

### Get the Receita Federal record

GET

`/rfb`

`cnpja.rfb.get`

The Receita Federal registration: details, economic activities and partners and administrators (QSA).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`taxId` required</td><td>string</td><td>query</td><td>CNPJ, digits only. Example `37335118000180`</td></tr>
    <tr><td>`strategy`</td><td>string</td><td>query</td><td>CACHE: cache only, never charged, 404 when absent. CACHE\_IF\_FRESH: cache within maxAge, else online. CACHE\_IF\_ERROR (default): as CACHE\_IF\_FRESH, falling back to cache within maxStale if online fails. ONLINE: always online (prefer maxAge=1). One of `ONLINE`, `CACHE_IF_FRESH`, `CACHE_IF_ERROR`, `CACHE`</td></tr>

    <tr>
      <td>
        `maxAge`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted; default 45.
      </td>
    </tr>

    <tr>
      <td>
        `maxStale`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted when the online lookup fails (CACHE\_IF\_ERROR); default 365.
      </td>
    </tr>

    <tr>
      <td>
        `sync`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Return the cnpja-request-cost header.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Corpo API](https://docs.webrouter.net/data-apis/corpoapi.md#corpoapi-company-verify), [FMCSA QCMobile (SAFER carrier data)](https://docs.webrouter.net/data-apis/fmcsa.md#fmcsa-carriers-basics), [Societe.com API Pro](https://docs.webrouter.net/data-apis/societe-com.md#societe-com-companies-exists), [VOYGR](https://docs.webrouter.net/data-apis/voygr.md#voygr-validate)

```python Python theme={null}
router.call_data_api("cnpja.rfb.get", {'taxId': '37335118000180'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.rfb.get", params={"taxId": "37335118000180"})
```

> [!NOTE]
>
> * 1 credit online, 0 from cache.

### Get Simples Nacional status

GET

`/simples`

`cnpja.simples.get`

Simples Nacional option and MEI status with dates, optionally with history.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`taxId` required</td><td>string</td><td>query</td><td>CNPJ, digits only. Example `37335118000180`</td></tr>

    <tr>
      <td>
        `history`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        +1 credit: add past periods and IBS/CBS events.
      </td>
    </tr>

    <tr><td>`strategy`</td><td>string</td><td>query</td><td>CACHE: cache only, never charged, 404 when absent. CACHE\_IF\_FRESH: cache within maxAge, else online. CACHE\_IF\_ERROR (default): as CACHE\_IF\_FRESH, falling back to cache within maxStale if online fails. ONLINE: always online (prefer maxAge=1). One of `ONLINE`, `CACHE_IF_FRESH`, `CACHE_IF_ERROR`, `CACHE`</td></tr>

    <tr>
      <td>
        `maxAge`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted; default 45.
      </td>
    </tr>

    <tr>
      <td>
        `maxStale`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Days a cached record is accepted when the online lookup fails (CACHE\_IF\_ERROR); default 365.
      </td>
    </tr>

    <tr>
      <td>
        `sync`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Return the cnpja-request-cost header.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Corpo API](https://docs.webrouter.net/data-apis/corpoapi.md#corpoapi-company-verify), [FMCSA QCMobile (SAFER carrier data)](https://docs.webrouter.net/data-apis/fmcsa.md#fmcsa-carriers-basics), [Societe.com API Pro](https://docs.webrouter.net/data-apis/societe-com.md#societe-com-companies-exists), [VOYGR](https://docs.webrouter.net/data-apis/voygr.md#voygr-validate)

```python Python theme={null}
router.call_data_api("cnpja.simples.get", {'taxId': '37335118000180'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.simples.get", params={"taxId": "37335118000180"})
```

> [!NOTE]
>
> * 1 credit online, 0 from cache.

### Look up a postal code

GET

`/zip/{code}`

`cnpja.zip.get`

Address and IBGE municipality for a CEP.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`code` required</td><td>string</td><td>path</td><td>CEP, digits only. Example `01452922`</td></tr>
  </tbody>
</table>

[Vendor docs](https://api.cnpja.com/docs) · Same job: [Aviato](https://docs.webrouter.net/data-apis/aviato.md#aviato-geocoder-search), [CompanyEnrich](https://docs.webrouter.net/data-apis/companyenrich.md#companyenrich-geo-regions), [Duffel](https://docs.webrouter.net/data-apis/duffel.md#duffel-places-suggestions), [Forager](https://docs.webrouter.net/data-apis/forager.md#forager-reference-locations), [IBGE](https://docs.webrouter.net/data-apis/ibge.md#ibge-aggregates-places), [Mangools](https://docs.webrouter.net/data-apis/mangools.md#mangools-locations-search)

```python Python theme={null}
router.call_data_api("cnpja.zip.get", {'code': '01452922'})
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.zip.get", params={"code": "01452922"})
```

> [!NOTE]
>
> * Free.

### Get credit balance

GET

`/credit`

`cnpja.credit.get`

Credits remaining on the account.

Input

No inputs.

[Vendor docs](https://api.cnpja.com/docs)

```python Python theme={null}
router.call_data_api("cnpja.credit.get")
```

```text MCP theme={null}
call_data_api(endpoint="cnpja.credit.get")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.