# Brazil CNPJ Lookup — Receita Federal Company Data, Bulk (`nexgensignal/brazil-cnpj-company-lookup`) Actor

Look up Brazilian companies by CNPJ in bulk, or search the Receita Federal register by state, CNAE, municipality or legal nature: status, activities, address, capital, Simples/MEI, tax regime, company partners. No key. Part of NexGen Signal — data tools and official-source data products

- **URL**: https://apify.com/nexgensignal/brazil-cnpj-company-lookup.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 company records

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

## 🇧🇷 Brazil CNPJ Lookup — Receita Federal Company Data, Bulk

Look up **Brazilian companies by CNPJ, in bulk**, or **search the Receita Federal register** by state, CNAE activity, municipality and legal nature, and get one clean row per company: legal and trade name, registration status and its date and reason, opening date, legal nature, size, share capital, primary and secondary CNAE activities, address, registered phone and email, Simples Nacional and MEI status, tax regime by year, and partners that are companies.

CNPJs can be typed with or without punctuation; their check digits are verified before anything is fetched, and invalid ones are listed and never charged. Filter by status (ATIVA, BAIXADA…), headquarters or branch, and opening date — `openedAfter` plus a state and CNAE gives you newly opened companies in a sector.

The data is the Receita Federal's public CNPJ register (public under Brazil's access-to-information law), read through the open Minha Receita API. The unit of output is one company record delivered; CNPJs that are not found are not billed.

### Who buys this and for what job

- **KYB, onboarding and credit teams** checking a supplier's or customer's CNPJ status before approving them.
- **Sales teams** building lists of active companies by sector (CNAE), state and size.
- **Data teams** enriching a CRM's CNPJs with activity, size and address.
- **Market researchers** counting new openings by sector and city.

Buyers usually search for this as **"consulta CNPJ"**, **"CNPJ lookup API"** or **"Receita Federal company data"**.

### 📊 Sample Output

![Table of Brazilian companies: CNPJ, legal name, status, opening date, city and size.](https://api.apify.com/v2/key-value-stores/IXCaMKjxSmUTLHhmq/records/brazil-cnpj-company-lookup.png)

| cnpj | legal_name | status | opened_on | city | size |
|---|---|---|---|---|---|
| 59.074.926/0001-74 | KATO CONSULTORIA EM DADOS LTDA | ATIVA | 2025-01-24 | SAO PAULO / SP | MICRO EMPRESA |
| 59.075.266/0001-46 | BAYER INFO TECH LTDA | ATIVA | 2025-01-24 | SAO PAULO / SP | MICRO EMPRESA |
| 59.075.278/0001-70 | V+ ASSESSORIA EM SERVICOS DE SAUDE LTDA | ATIVA | 2025-01-24 | SAO PAULO / SP | MICRO EMPRESA |
| 04.423.028/0001-92 | SCALA SUPRIMENTOS INDUSTRIAIS LTDA | ATIVA | 2001-04-25 | BARUERI / SP | EMPRESA DE PEQUENO PORTE |
| 03.917.451/0001-86 | CARPE DIEN INFORMATICA LTDA | ATIVA | 2000-06-28 | SAO PAULO / SP | MICRO EMPRESA |
| 14.256.781/0001-94 | NINETEC S.A. | ATIVA | 2011-09-06 | SAO PAULO / SP | DEMAIS |
| 36.713.059/0001-74 | (withheld: individual entrepreneur) | ATIVA | 2020-03-18 | SAO JOSE DOS CAMPOS / SP | MICRO EMPRESA |

Rows from live run `xhF5eXOhDyyHFggwK` on Apify (São Paulo state, CNAE 6201-5/01 (custom software development), status ATIVA, 40 companies). Notice the row marked withheld: for individual entrepreneurs (MEI and Empresário Individual) the name, address, phone and email belong to a person and are not delivered; the status, activity and dates still are.

### ✅ What you get

Every field of each record:

- `record_id`, `cnpj`, `cnpj_formatted`, `cnpj_root`, `branch_type` — the CNPJ (14 digits and formatted), its 8-digit root, MATRIZ or FILIAL.
- `legal_name`, `trade_name` — razão social and nome fantasia.
- `status`, `status_date`, `status_reason`, `special_situation`, `special_situation_date` — situação cadastral and its details.
- `opened_on`, `legal_nature_code`, `legal_nature`, `company_size`, `share_capital_brl` — opening date, natureza jurídica, porte, capital social in reais.
- `main_activity_code`, `main_activity`, `secondary_activities` — primary CNAE and the secondary CNAEs.
- `street`, `number`, `complement`, `district`, `postal_code`, `city`, `city_ibge_code`, `state`, `country` — registered address.
- `phone_1`, `phone_2`, `fax`, `email` — registered contacts (+55 format).
- `simples_opt_in`, `simples_since`, `simples_until`, `mei_opt_in`, `mei_since`, `mei_until` — Simples Nacional and MEI status.
- `tax_regime_latest`, `tax_regime_history` — tax regime by year (Lucro Real, Lucro Presumido…), when on file.
- `company_partners`, `partner_people_count` — partners that are companies (name, CNPJ, role, since) and the number of individual partners (not named).
- `individual_entrepreneur`, `withheld` — whether personal fields were withheld, and which.
- `source`, `source_url`, `read_at` — source, API address, when read.

### ⚙️ Sample inputs

**Two CNPJs (the Store example)**

```json
{
  "cnpjs": ["33.000.167/0001-01", "00.000.000/0001-91"],
  "maxRecords": 10
}
```

Petrobras and Banco do Brasil.

**Active software companies in São Paulo**

```json
{
  "states": ["SP"],
  "cnaes": ["6201501"],
  "statuses": ["ATIVA"],
  "maxRecords": 5000
}
```

**Software companies opened this year in São Paulo**

```json
{
  "states": ["SP"],
  "cnaes": ["6201501"],
  "primaryCnaeOnly": true,
  "openedAfter": "2026-01-01",
  "maxScan": 100000,
  "maxRecords": 2000
}
```

Opening-date filters run on what the search reads; maxScan sets how far it reads.

**Check a list of suppliers**

```json
{
  "cnpjs": ["60.701.190/0001-04", "33000167000101", "07.526.557/0001-00"],
  "maxRecords": 1000
}
```

Paste up to 100,000 CNPJs.

Input fields:

| Field | Meaning |
|---|---|
| `cnpjs` | CNPJs to look up, any punctuation (check digits verified). |
| `states`, `cnaes`, `primaryCnaeOnly`, `municipalities`, `legalNatureCodes` | search filters (a state-only search is limited to 3 states). |
| `statuses`, `branchType`, `openedAfter`, `openedBefore` | keep only these statuses, headquarters or branches, and opening dates (applied to what the search reads). |
| `maxScan` | how many search results to read before stopping (default 20,000). |
| `includeTaxRegime` | add tax regime by year (default on). |
| `maxRecords` | stop after this many companies (default 1,000). Each delivered company is billed. |

### 🧾 JSON sample record

```json
{
  "record_id": "f390a46df5803e0d34bd912f",
  "cnpj": "33000167000101",
  "cnpj_formatted": "33.000.167/0001-01",
  "cnpj_root": "33000167",
  "branch_type": "MATRIZ",
  "legal_name": "PETROLEO BRASILEIRO S A PETROBRAS",
  "trade_name": "PETROBRAS - EDISE",
  "status": "ATIVA",
  "status_date": "2005-11-03",
  "status_reason": "SEM MOTIVO",
  "special_situation": null,
  "special_situation_date": null,
  "opened_on": "1966-09-28",
  "legal_nature_code": "2038",
  "legal_nature": "Sociedade de Economia Mista",
  "company_size": "DEMAIS",
  "share_capital_brl": 205431960000,
  "main_activity_code": "600001",
  "main_activity": "Extração de petróleo e gás natural",
  "secondary_activities": [
    {
      "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"
    },
    {
      "code": "3520402",
      "description": "Distribuição de combustíveis gasosos por redes urbanas"
    },
    {
      "code": "4681801",
      "description": "Comércio atacadista de álcool carburante, biodiesel, gasolina e demais derivados de petróleo, exceto lubrificantes, não realizado por transportador re"
    },
    {
      "code": "8630599",
      "description": "Atividades de atenção ambulatorial não especificadas anteriormente"
    }
  ],
  "street": "AVENIDA REPUBLICA DO CHILE",
  "number": "65",
  "complement": null,
  "district": "CENTRO",
  "postal_code": "20031170",
  "city": "RIO DE JANEIRO",
  "city_ibge_code": "3304557",
  "state": "RJ",
  "country": "BRASIL",
  "phone_1": "+552121660000",
  "phone_2": null,
  "fax": null,
  "email": null,
  "simples_opt_in": null,
  "simples_since": null,
  "simples_until": null,
  "mei_opt_in": null,
  "mei_since": null,
  "mei_until": null,
  "tax_regime_latest": {
    "year": 2024,
    "regime": "LUCRO REAL"
  },
  "tax_regime_history": [
    {
      "year": 2016,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2017,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2018,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2019,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2020,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2021,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2022,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2023,
      "regime": "LUCRO REAL"
    },
    {
      "year": 2024,
      "regime": "LUCRO REAL"
    }
  ],
  "company_partners": [],
  "partner_people_count": 8,
  "individual_entrepreneur": false,
  "withheld": [],
  "source": "Receita Federal open CNPJ data (via Minha Receita)",
  "source_url": "https://minhareceita.org/33000167000101",
  "read_at": "2026-10-18T02:56:38Z"
}
```

### 🔧 How it works

CNPJ lookups are one request each; searches are read 1,000 companies per page with the API's cursor, one page every 1.5 seconds, because the API limits searches to keep lookups fast (if it asks the actor to slow down, it waits and continues). Status, branch and opening-date filters are applied to the companies read, so `maxScan` controls how far a search reads. The same company found by a lookup and a search is delivered once.

Natural-person data stays out: individual partners are counted but never named (their names and masked CPFs are not read into rows), and for MEI, Empresário Individual and the other natural-person legal forms the name, trade name, street address, postal code, phone and email are withheld, because they are a person's. Companies whose legal name contains a founder's name are legal entities and are delivered as registered.

Every run reads each host's robots.txt first: a path it disallows is skipped, listed in the run receipt and never charged. Only public internet addresses are fetched (no private, loopback or cloud-metadata addresses, checked again on every redirect). No logins, no CAPTCHA solving, no proxies.

Delivery is pushed first and charged after. The run receipt (`RUN_RECEIPT`) lists every CNPJ with found / not found / invalid, the search pages read, how many rows each filter dropped, and the delivered and charged counts.

### 💰 Pricing example

Per company record delivered, no start fee, no monthly charge:

| Apify plan | Price per company record |
|---|---|
| Free | $0.05 |
| Bronze | $0.045 |
| Silver | $0.04 |
| Gold, Platinum, Diamond | $0.0335 |

- 10 company records: $0.50 on the Free plan, $0.34 on Gold.
- 1,000 company records: $50.00 on the Free plan, $33.50 on Gold.
- 10,000 company records: $500.00 on the Free plan, $335.00 on Gold.

**Coverage and size.** Proof runs on 18 Oct 2026: the two-CNPJ Store example in 4 seconds; 40 active São Paulo software companies in 37 seconds; four CNPJs (one with a bad check digit, skipped and not charged) plus a DF search in 3 seconds. The Receita Federal register covers every CNPJ ever issued (headquarters and branches, all statuses); Minha Receita refreshes it from the Receita's monthly release.

### ⚖️ Legal & ToS

The CNPJ register is public data published by the Receita Federal under Brazil's Lei de Acesso à Informação. This actor reads it through Minha Receita, an open-source project that serves the register as a public API.

Use contact fields lawfully; Brazil's LGPD applies to any personal data you go on to process. Personal fields of individual entrepreneurs are withheld here for that reason.

Every run reads each host's robots.txt first: a path it disallows is skipped, listed in the run receipt and never charged. Only public internet addresses are fetched (no private, loopback or cloud-metadata addresses, checked again on every redirect). No logins, no CAPTCHA solving, no proxies.

### ❓ FAQ

**Do I need a key?**
No.

**Can I search by a partner's CPF or name?**
No. People are never named or searched in this actor.

**How fresh is it?**
As fresh as the Receita Federal's latest monthly CNPJ release loaded by Minha Receita.

### 🆘 Troubleshooting

- **A CNPJ is 'not found'** — It is not in the register (check it); it is not billed.
- **Search returns nothing** — Check the CNAE (7 digits) and municipality codes (IBGE or SIAFI numbers, not names).
- **SOURCE UNAVAILABLE** — The API did not answer after retries. Nothing was charged.

### 🔗 Related Actors

- [LLC & Corp Status Lookup — US States](https://apify.com/nexgensignal/us-business-entity-status-check) — company status in official US state registries
- [France Company Registry Search](https://apify.com/nexgensignal/france-company-registry-search) — SIREN, SIRET and NAF records
- [Companies House Company Search & Status](https://apify.com/nexgensignal/uk-company-status-records) — UK company status

🏢 **About NexGen Signal** — data tools and official-source data products. Browse the catalog: [apify.com/nexgensignal](https://apify.com/nexgensignal)

### ⭐ Found this useful?

If this actor saved you time, a rating on its Apify Store page helps other buyers find it.

Part of NexGen Signal — data tools and official-source data products.

# Actor input Schema

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

CNPJs with or without punctuation. Check digits are verified; invalid ones are listed in the receipt and never charged. Up to 100,000 per run.

## `states` (type: `array`):

Search companies in these states. A state-only search is limited to 3 states; add a CNAE, municipality or legal nature for wider searches.

## `cnaes` (type: `array`):

7-digit CNAE codes, e.g. 6201501 or 6201-5/01. Matches primary or secondary activity unless 'Primary CNAE only' is on.

## `primaryCnaeOnly` (type: `boolean`):

Match the CNAE codes against the primary activity only.

## `municipalities` (type: `array`):

IBGE (7-digit, e.g. 3550308 São Paulo) or SIAFI (4-digit) codes — not names.

## `legalNatureCodes` (type: `array`):

4-digit natureza jurídica codes, e.g. 2062 (LTDA), 2054 (S.A. fechada), 2046 (S.A. aberta).

## `statuses` (type: `array`):

Keep only these registration statuses. Empty = all.

## `branchType` (type: `string`):

Keep headquarters (matriz), branches (filial) or both.

## `openedAfter` (type: `string`):

Date like 2024-01-01: keep companies that started activity on or after it (find new companies).

## `openedBefore` (type: `string`):

Date like 2010-12-31.

## `includeTaxRegime` (type: `boolean`):

Add the tax regime by year (Lucro Real, Lucro Presumido…) when on file.

## `maxScan` (type: `integer`):

Search reads up to this many companies before stopping. Status, branch and opening-date filters are applied to what is read, so raise this for rare matches (search reads about 1,000 companies every 2 seconds).

## `maxRecords` (type: `integer`):

Stop after this many companies. Each delivered company is billed; CNPJs not found are not.

## Actor input object example

```json
{
  "cnpjs": [
    "33.000.167/0001-01",
    "00.000.000/0001-91"
  ],
  "states": [],
  "cnaes": [],
  "primaryCnaeOnly": false,
  "municipalities": [],
  "legalNatureCodes": [],
  "statuses": [],
  "branchType": "all",
  "includeTaxRegime": true,
  "maxScan": 20000,
  "maxRecords": 10
}
```

# Actor output Schema

## `results` (type: `string`):

The delivered (and billed) records.

## `receipt` (type: `string`):

Per-link outcome, robots result, delivered and charged counts.

# 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"
    ],
    "maxRecords": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/brazil-cnpj-company-lookup").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",
    ],
    "maxRecords": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/brazil-cnpj-company-lookup").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"
  ],
  "maxRecords": 10
}' |
apify call nexgensignal/brazil-cnpj-company-lookup --silent --output-dataset

```

## MCP server setup

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

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/8xiz20E5GpUkF9h0V/builds/la55Em8SOt69Puy65/openapi.json
