# CNPJ Brazil Lookup - Company Data, CNAE, Status, Address (`pshivam/cnpj-brazil-scraper`) Actor

Look up Brazilian companies by CNPJ, no login: legal and trade name, registration status, opening date, size, capital, main and secondary CNAE activities, address, phones, email, Simples and MEI, optionally the partners. Bulk lookup. Export to Excel, CSV or API.

- **URL**: https://apify.com/pshivam/cnpj-brazil-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (community)
- **Categories:** Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.05 / 1,000 companies

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## CNPJ Brazil Lookup - Company Data, CNAE, Status, Address

**Look up Brazilian companies by CNPJ in bulk: legal and trade name, registration status, opening date, size, capital, main and secondary CNAE activities, address, phones, email, Simples Nacional and MEI.** No login, no certificate, no API key. Paste CNPJs with or without dots and dashes, get one clean row per company, and export to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-19. Every release passes 90+ automated tests on real saved answers of the register.

### What can you use it for?

- **Check a supplier or customer.** Is the company active (`status`), how old is it (`openedAt`), how big (`size`, `capitalBrl`), where is it (`city`, `state`)?
- **Enrich a lead list.** Add the legal name, CNAE activity, phones and email to a list of CNPJs from your CRM or invoices.
- **Know your counterparty (KYC and due diligence).** Registration status and reason, special status such as judicial recovery, tax regime and, when you turn it on, the partners.
- **Find out what a company does.** The main CNAE code and description, plus every secondary activity.
- **Clean a database.** Tests the check digits, drops wrong numbers and returns the official name and address for the rest.
- **Watch a list.** Schedule the Actor weekly with `onlyNew` to pay only for companies you have not looked up before.

### What data can you get?

Give a list of CNPJ numbers. Every row is one company.

| You give | You get |
|---|---|
| `cnpjs`: CNPJ numbers in any format | One row per valid company found in the public register |
| `includePartners` | The partners and administrators of each company (name, role, since, age range, masked document) |

#### Fields

A field that the register does not hold for a company is `null`.

##### The company

| Field | What it is |
|---|---|
| `cnpj` | The 14-digit CNPJ (company number), digits only. |
| `cnpjFormatted` | The CNPJ as it is written: 33.000.167/0001-01. |
| `isHeadquarters` | True for the headquarters (matriz), false for a branch (filial). |
| `legalName` | The legal name (razão social). |
| `tradeName` | The trade name (nome fantasia). Empty when the company has none. |
| `legalNature` | The legal nature (natureza jurídica), for example Sociedade Empresária Limitada. |
| `legalNatureCode` | The code of the legal nature, for example 2062. |
| `size` | The size (porte): MICRO EMPRESA, EMPRESA DE PEQUENO PORTE or DEMAIS. |
| `capitalBrl` | The share capital (capital social) in Brazilian reais. |
| `openedAt` | The date the company started its activity (YYYY-MM-DD). |

##### Status

| Field | What it is |
|---|---|
| `status` | The registration status (situação cadastral): ATIVA, BAIXADA, SUSPENSA, INAPTA or NULA. |
| `statusDate` | The date the status started (YYYY-MM-DD). |
| `statusReason` | The reason of the status, for example SEM MOTIVO or EXTINCAO POR ENCERRAMENTO LIQUIDACAO VOLUNTARIA. |
| `specialStatus` | A special status of the company, when there is one (for example RECUPERACAO JUDICIAL). |

##### Activities

| Field | What it is |
|---|---|
| `mainActivityCode` | The code of the main activity (CNAE), 7 digits. |
| `mainActivity` | The description of the main activity (CNAE). |
| `secondaryActivities` | The secondary activities: a list of objects with code and description. |

##### Address and contact

| Field | What it is |
|---|---|
| `street` | The street with its type (AVENIDA, RUA ...). |
| `number` | The street number (SN for no number). |
| `complement` | The complement of the address (floor, room ...). |
| `district` | The district (bairro). |
| `city` | The city (município). |
| `state` | The state (UF), two letters. |
| `postalCode` | The postal code (CEP), 8 digits. |
| `cityIbgeCode` | The IBGE code of the city. |
| `phones` | The phone numbers in international format (+55...). |
| `fax` | The fax number in international format. |
| `email` | The email address in the register, in lower case. Many companies have none. |

##### Tax regime

| Field | What it is |
|---|---|
| `simplesNacional` | True when the company is in the Simples Nacional tax regime, false when it is not, empty when the register does not say. |
| `simplesSince` | The date the company opted for Simples Nacional. |
| `meiOptIn` | True when the company is a MEI (individual microentrepreneur), false when not, empty when the register does not say. |
| `taxRegimes` | The tax regime of the latest years the register knows, newest first: a list of objects with year and regime (LUCRO REAL, LUCRO PRESUMIDO ...). |

##### Partners

| Field | What it is |
|---|---|
| `partnersCount` | How many partners and administrators the register lists. |
| `partners` | The partners and administrators: name, role, since, ageRange, documentMasked, country. Only when Include partners is on. |

##### Where it came from

| Field | What it is |
|---|---|
| `sourceUrl` | The address the record was read from. |
| `scrapedAt` | When the record was collected (UTC). |

#### Example results

```json
{"cnpj": "33000167000101", "cnpjFormatted": "33.000.167/0001-01", "isHeadquarters": true, "legalName": "PETROLEO BRASILEIRO S A PETROBRAS", "tradeName": "PETROBRAS - EDISE", "status": "ATIVA", "statusDate": "2005-11-03", "statusReason": "SEM MOTIVO", "openedAt": "1966-09-28", "legalNature": "Sociedade de Economia Mista", "legalNatureCode": "2038", "size": "DEMAIS", "capitalBrl": 205431960000, "mainActivityCode": "0600001", "mainActivity": "Extração de petróleo e gás natural", "secondaryActivities": [{"code": "1921700", "description": "Fabricação de produtos do refino de petróleo"}, {"code": "3520401", "description": "Produção de gás; processamento de gás natural"}], "street": "AVENIDA REPUBLICA DO CHILE", "number": "65", "district": "CENTRO", "city": "RIO DE JANEIRO", "state": "RJ", "postalCode": "20031170", "cityIbgeCode": 3304557, "phones": ["+552121660000"], "taxRegimes": [{"year": 2024, "regime": "LUCRO REAL"}, {"year": 2023, "regime": "LUCRO REAL"}], "partnersCount": 8, "sourceUrl": "https://minhareceita.org/33000167000101", "scrapedAt": "2026-11-19T10:00:06Z"}
```

```json
{"cnpj": "00000000000191", "cnpjFormatted": "00.000.000/0001-91", "isHeadquarters": true, "legalName": "BANCO DO BRASIL SA", "tradeName": "DIRECAO GERAL", "status": "ATIVA", "statusDate": "2005-11-03", "statusReason": "SEM MOTIVO", "openedAt": "1966-08-01", "legalNature": "Sociedade de Economia Mista", "legalNatureCode": "2038", "size": "DEMAIS", "capitalBrl": 120000000000, "mainActivityCode": "6422100", "mainActivity": "Bancos múltiplos, com carteira comercial", "secondaryActivities": [{"code": "6499999", "description": "Outras atividades de serviços financeiros não especificadas anteriormente"}], "street": "QUADRA SAUN QUADRA 5 BLOCO B TORRE I, II, III", "number": "SN", "complement": "ANDAR T I SL S101 A S1602 T II SL C101 A...", "district": "ASA NORTE", "city": "BRASILIA", "state": "DF", "postalCode": "70040912", "cityIbgeCode": 5300108, "phones": ["+556134939002"], "fax": "+556134931040", "simplesNacional": false, "simplesSince": "2007-07-01", "meiOptIn": false, "taxRegimes": [{"year": 2024, "regime": "LUCRO REAL"}, {"year": 2023, "regime": "LUCRO REAL"}], "partnersCount": 41, "partners": [{"name": "ALAN CARLOS GUEDES DE OLIVEIRA", "role": "Diretor", "since": "2023-05-17", "ageRange": "Entre 41 a 50 anos", "documentMasked": "***550179**", "country": null}], "sourceUrl": "https://minhareceita.org/00000000000191", "scrapedAt": "2026-11-19T10:00:06Z"}
```

### Input

| Input | What it does |
|---|---|
| `cnpjs` | The CNPJ numbers to look up, one per line |
| `includePartners` | Also return the partners and administrators |
| `onlyNew` | Skip companies that earlier runs of the same input returned |
| `maxItems` | Stop after this many companies |
| `maxConcurrency`, `secondsBetweenRequests`, `proxyConfiguration` | Speed and how the Actor deals with refusals |

### How much does it cost?

You pay per company returned. There is no start fee. Wrong numbers and companies the register does not know are not returned and not charged.

| Plan | Price per 1,000 companies |
|---|---|
| Free | $1.50 |
| Bronze | $1.35 |
| Silver | $1.20 |
| Gold | $1.05 |

- 10,000 companies cost about $15 on the Free plan.
- Use `maxItems` to cap the cost of a run, and `onlyNew` to pay only for new companies on scheduled runs.

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/cnpj-brazil-scraper").call(run_input={
    "cnpjs": ["33.000.167/0001-01", "00.000.000/0001-91"],
    "includePartners": True,
})
for company in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(company["cnpjFormatted"], company["legalName"], company["status"], company["mainActivity"])
```

#### Use it in Clay, n8n, Make or Zapier

Use the Actor ID `pshivam/cnpj-brazil-scraper` and an input like this:

```json
{"cnpjs": ["33000167000101", "60701190000104"], "includePartners": false, "onlyNew": true}
```

### Good to know

- **Official data, one lookup per company.** The data is the Receita Federal's public company register (CNPJ), served by the open Minha Receita API. A company's row is as current as the register, which the tax office updates every month.
- **Lookup by number, not search.** The Actor looks up the CNPJs you give. It does not search companies by name or by activity: the register has no such search.
- **Wrong numbers are free.** The two check digits are tested before any lookup. Wrong numbers and numbers the register does not know are listed in the run's status message and not charged.
- **Partners are off by default.** The register lists the partners and administrators of a company: names, role, since when, an age range and a partly hidden document number. Turn `includePartners` on only when you need them. The count is always given.
- **Speed.** A test run of 3 companies took 0.7 seconds. The pause between requests (0.25 seconds by default) sets the pace at about 4 companies per second.
- **When the service refuses.** If the service does not answer 20 requests in a row, the Actor stops instead of retrying for the rest of the hour. It returns the companies it has and says so in the run's status message; a run without any ends as failed with that message. Run it again later or lower `maxConcurrency`.
- **Independent tool.** Not affiliated with the Receita Federal or Minha Receita. You are responsible for how you use the data, including Brazilian data protection law (LGPD) for any personal data of partners.

### FAQ

#### How do I look up a CNPJ?

Put the number in `cnpjs`, with or without dots and dashes, and run. Each valid number gives one row.

#### Can I look up many companies at once?

Yes. Paste thousands of CNPJs, one per line. The Actor looks them up a few at a time and returns one row per company.

#### Can I search companies by name or by activity?

No. The Actor needs the CNPJ number. Use it after a search elsewhere, or on the CNPJs you already have.

#### Do I need a certificate, login or API key?

No. The Actor reads an open API over the public register.

#### Is the data current?

It is the register's data, which the tax office updates every month. `status` and `statusDate` tell if a company is still active.

#### Is it legal?

The CNPJ register is public data that the Brazilian tax office publishes as open data. You are responsible for how you use it. Check the LGPD rules before you use the data of partners.

# Actor input Schema

## `cnpjs` (type: `array`):

The companies to look up, one CNPJ per line, with or without dots and dashes (33.000.167/0001-01 or 33000167000101). The check digits are tested first: a wrong number is skipped and reported, and never charged. Leave empty to look up three example companies.

## `includePartners` (type: `boolean`):

Add the company's partners and administrators (name, role, since when, age range, masked document) as listed in the public register. Off by default: the register lists people, so turn it on only when you need them. The partner count is always given.

## `onlyNew` (type: `boolean`):

Skip companies that earlier runs of this same input already returned, so you get and pay for new ones only. The first run works as usual and remembers what it returned, in your key-value store 'cnpj-brazil-scraper-only-new'.

## `maxItems` (type: `integer`):

Stop after this many companies. You are charged per company returned.

## `maxConcurrency` (type: `integer`):

How many companies are looked up at the same time.

## `secondsBetweenRequests` (type: `number`):

Pause between requests. The service is free for everyone: if it asks the Actor to slow down, the Actor lets its address rest and lengthens the pause.

## `proxyConfiguration` (type: `object`):

Not needed: the Actor reads with its own address. Turn it on only if the service refuses the address; the proxy then takes over while the address rests.

## Actor input object example

```json
{
  "cnpjs": [
    "33.000.167/0001-01",
    "00.000.000/0001-91",
    "60.701.190/0001-04"
  ],
  "includePartners": false,
  "onlyNew": false,
  "maxItems": 50,
  "maxConcurrency": 4,
  "secondsBetweenRequests": 0.25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `companies` (type: `string`):

Companies as a table.

## `contacts` (type: `string`):

Contacts as a table.

## `runStats` (type: `string`):

Requests made, time spent and number of records for this run (RUN_STATS record).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cnpjs": [
        "33.000.167/0001-01",
        "00.000.000/0001-91",
        "60.701.190/0001-04"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/cnpj-brazil-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "cnpjs": [
        "33.000.167/0001-01",
        "00.000.000/0001-91",
        "60.701.190/0001-04",
    ],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("pshivam/cnpj-brazil-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cnpjs": [
    "33.000.167/0001-01",
    "00.000.000/0001-91",
    "60.701.190/0001-04"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call pshivam/cnpj-brazil-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pshivam/cnpj-brazil-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Qcm44qgZ4lldosNnh/builds/eJBIihlzk0LlBgFLY/openapi.json
