# Brazil CNPJ Lookup — Receita Federal Company Data in Bulk (`actor-forge/brazil-cnpj-lookup`) Actor

Paste a list of CNPJ numbers and get the Receita Federal register record for each: razão social, nome fantasia, situação cadastral, natureza jurídica, CNAE, opening date, address and capital social. Check digits validated, partners (QSA) opt-in. $1 per 1,000 CNPJs.

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

## Pricing

from $1.00 / 1,000 company results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 in Bulk

Paste a list of CNPJ numbers and get the Receita Federal register record for each: razão social, nome fantasia, situação cadastral, natureza jurídica, CNAE, opening date, address and capital social. Check digits validated, partners (QSA) opt-in. $1 per 1,000 CNPJs.

**Bulk CNPJ lookup without an API key.** Paste a list of CNPJ numbers (any format) and get one clean row per company from the **Receita Federal public CNPJ register**: razão social, nome fantasia, situação cadastral (Ativa, Baixada, Inapta, Suspensa), natureza jurídica, **CNAE principal and secundários**, data de início de atividade, full address with município, UF and CEP, and **capital social**. Partners (QSA) are available as an opt-in.

Use it for supplier and customer onboarding (KYB), checking that a CNPJ is still *Ativa* before you invoice, enriching a CRM with CNAE codes for segmentation, or cleaning a spreadsheet of Brazilian companies. Every CNPJ is validated with its check digits before any request, so typos come back as a free status row instead of a wrong match.

**$1 per 1,000 CNPJs**, with no start fee beyond Apify's platform minimum. Invalid or unknown CNPJs are never charged.

#### Em português

Consulta de CNPJ em lote, sem chave de API: cole uma lista de CNPJs e receba razão social, nome fantasia, situação cadastral, natureza jurídica, CNAE principal e secundários, data de abertura, endereço completo e capital social, direto dos dados públicos da Receita Federal. Os dígitos verificadores são validados antes de cada consulta. O quadro de sócios (QSA) é opcional e nunca inclui CPF. US$ 1 por 1.000 CNPJs.

#### Where the data comes from

Receita Federal public CNPJ data, served by **OpenCNPJ** (opencnpj.org, an open-source non-profit mirror). BrasilAPI is not used because its terms discourage automated use. Company e-mail and phone fields from the register are never output, because many of them belong to individuals. Not affiliated with the Receita Federal.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| companyId | name | statusDetail | legalForm | incorporationDate | activityCode | activityDescription | address.city | address.region | capital.amount |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 00000000000191 | BANCO DO BRASIL SA | Ativa | Sociedade de Economia Mista | 1966-08-01 | 6422100 | Bancos múltiplos, com carteira comercial | BRASILIA | DF | 120000000000 |
| 33000167000101 | PETROLEO BRASILEIRO S A PETROBRAS | Ativa | Sociedade de Economia Mista | 1966-09-28 | 0600001 | Extração de petróleo e gás natural | RIO DE JANEIRO | RJ | 205431960490.52 |
| 19131243000197 | OPEN KNOWLEDGE BRASIL | Ativa | Associação Privada | 2013-10-03 | 9430800 | Atividades de associações de defesa de direitos sociais | SAO PAULO | SP |  |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `company-result` | $0.001 | per company record delivered | 1,000 companies = $1.00 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 256 MB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `queries` | array | no | — | One CNPJ per line, with or without punctuation (00.000.000/0001-91 or 00000000000191). Check digits are validated before any request; an invalid or unknown CNPJ gets a free status row. Brazilian company names are not searchable in the free register API, so use the 14-digit number. |
| `defaultCountry` | string | no | `"BR"` | Always BR on this listing. |
| `includeOfficers` | boolean | no | `false` | Add the partners listed in the QSA (quadro de sócios e administradores): name, role (qualificação) and entry date only. The masked CPF and age band are never copied. Off by default: partners can be private individuals, so only turn this on if you have a lawful basis (LGPD) for processing their names. |
| `lookupLei` | boolean | no | `false` | Also look up each company's Legal Entity Identifier in GLEIF by its national ID (free, one extra request per company; GLEIF allows about 60 per minute, so large lists run slower). |

### Limits & honest notes

- CNPJ lookups only: the free register API has no name search. Each CNPJ must have 14 digits with valid check digits; punctuation is ignored.
- Data is the public Receita Federal CNPJ register as mirrored by OpenCNPJ, so a change made at the Receita in the last days can lag behind.
- At most 5 requests per second, so 1,000 CNPJs take a few minutes.
- Partners (QSA): off by default. With includeOfficers you get name, role and entry date only; the masked CPF and age band are never copied. Company e-mail addresses and phone numbers are never output.
- Need companies from other countries? Company Registry Lookup covers France, Norway, Finland, Czechia, Poland and any LEI worldwide with the same row format.
- Respects your run budget: set a maximum total charge and the run stops cleanly at the cap. Invalid or unknown CNPJs each get a free status row and never fail the run.

### Related ActorForge actors

- [Company Registry Lookup](https://apify.com/actor-forge/company-registry-lookup) — France, Norway, Finland, Czechia, Poland and LEI lookups in the same format
- [Public Tenders](https://apify.com/actor-forge/public-tenders) — Brazil PNCP procurement notices

### Changelog

- **2026-10-23** — Initial release: Brazil-only listing of Company Registry Lookup with a plain CNPJ list input and Portuguese column labels, $1 per 1,000 CNPJs.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `queries` (type: `array`):

One CNPJ per line, with or without punctuation (00.000.000/0001-91 or 00000000000191). Check digits are validated before any request; an invalid or unknown CNPJ gets a free status row. Brazilian company names are not searchable in the free register API, so use the 14-digit number.

## `defaultCountry` (type: `string`):

Always BR on this listing.

## `includeOfficers` (type: `boolean`):

Add the partners listed in the QSA (quadro de sócios e administradores): name, role (qualificação) and entry date only. The masked CPF and age band are never copied. Off by default: partners can be private individuals, so only turn this on if you have a lawful basis (LGPD) for processing their names.

## `lookupLei` (type: `boolean`):

Also look up each company's Legal Entity Identifier in GLEIF by its national ID (free, one extra request per company; GLEIF allows about 60 per minute, so large lists run slower).

## Actor input object example

```json
{
  "queries": [
    "00.000.000/0001-91",
    "33.000.167/0001-01"
  ],
  "defaultCountry": "BR",
  "includeOfficers": false,
  "lookupLei": false
}
```

# Actor output Schema

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

One row per CNPJ from the Receita Federal register, plus free status rows for invalid or unknown CNPJs.

## `summary` (type: `string`):

Companies delivered per register, not-found / invalid / failed query counts, API requests and billing.

# 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 = {
    "queries": [
        "00.000.000/0001-91",
        "33.000.167/0001-01"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/brazil-cnpj-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 = { "queries": [
        "00.000.000/0001-91",
        "33.000.167/0001-01",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/brazil-cnpj-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 '{
  "queries": [
    "00.000.000/0001-91",
    "33.000.167/0001-01"
  ]
}' |
apify call actor-forge/brazil-cnpj-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actor-forge/brazil-cnpj-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/qLfYDgnY5gMO3mY3C/builds/NmNclV3a3cMuo5Jfp/openapi.json
