# Brazil CNPJ Lookup – Receita Federal Company Data (`noturn0/brazil-cnpj-lookup`) Actor

Bulk lookup of Brazilian companies by CNPJ from Receita Federal open data: legal & trade name, status, opening date, CNAE, Simples/MEI, capital, address, phones, email. Invalid CNPJs are never charged.

- **URL**: https://apify.com/noturn0/brazil-cnpj-lookup.md
- **Developed by:** [Noturno Data](https://apify.com/noturn0) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 company founds

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

### What does Brazil CNPJ Lookup do?

**Brazil CNPJ Lookup** turns a list of CNPJs (Brazilian company tax IDs) into clean, structured company records from **Receita Federal open data**: legal name, trade name, registration status, opening date, CNAE activities, Simples Nacional and MEI status, share capital, full address, phones and email.

Paste 1 or 10,000 CNPJs in any format, press **Start**, and download the results as JSON, CSV, Excel or via API.

### Why use it?

- **Bulk and fast** – look up thousands of CNPJs in one run, with automatic retries.
- **Two data sources with automatic fallback** – if one public source is slow or rate-limited, the Actor switches to the other, so runs keep going.
- **Pay only for real companies** – invalid CNPJs (wrong check digits), duplicates and CNPJs that do not exist are skipped and **never charged**. They are listed in the `PROBLEMS` record so you can review them.
- **Clean English field names** – ready for CRMs, spreadsheets, BI tools and AI agents.
- **No personal data of partners** – the output contains company data only (no QSA / partner names or CPFs).

### Use cases

- **KYC / KYB and onboarding** – check that a supplier or customer is active before signing.
- **Lead enrichment** – add activity, size, city and contact info to a list of CNPJs.
- **CRM clean-up** – fix company names and addresses in bulk.
- **Market research** – analyze activities (CNAE), company size and location.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `cnpjs` | array | CNPJs in any format, e.g. `00.000.000/0001-91` or `00000000000191`. |
| `includeSecondaryCnaes` | boolean | Add secondary activities (default `true`). |
| `maxConcurrency` | integer | Parallel lookups, 1–10 (default 3). |

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

### Output example

```json
{
  "cnpj": "00000000000191",
  "cnpjFormatted": "00.000.000/0001-91",
  "legalName": "BANCO DO BRASIL SA",
  "tradeName": "DIRECAO GERAL",
  "registrationStatus": "ATIVA",
  "registrationStatusDate": "2005-11-03",
  "isHeadquarters": true,
  "openingDate": "1966-08-01",
  "legalNature": "Sociedade de Economia Mista",
  "companySize": "DEMAIS",
  "shareCapitalBRL": 120000000000,
  "mainActivity": { "cnae": "6422100", "description": "Bancos múltiplos, com carteira comercial" },
  "simplesNacional": { "optedIn": false, "since": null, "excludedAt": null },
  "mei": { "optedIn": false, "since": null, "excludedAt": null },
  "address": { "street": "SAUN QUADRA 5 LOTE B", "number": "SN", "neighborhood": "ASA NORTE", "city": "BRASILIA", "state": "DF", "zipCode": "70040912" },
  "phones": ["6134939002"],
  "email": null,
  "secondaryActivities": [{ "cnae": "6499999", "description": "Outras atividades de serviços financeiros" }],
  "source": "brasilapi",
  "fetchedAt": "2026-11-09T20:00:00.000Z"
}
```

### How much does it cost?

You pay a small fixed price **per company found** (see the Pricing tab). Skipped CNPJs cost nothing.

### Data source and legal note

Data comes from the public CNPJ open data released by Receita Federal (dados abertos), served through the open-source public APIs BrasilAPI and Minha Receita. Information is as up to date as the latest official release. The Actor returns company registration data only and does not collect partner (QSA) personal data. You are responsible for using the data in line with Brazil's LGPD and your local laws.

***

### Em português

Consulte milhares de CNPJs de uma vez e receba razão social, nome fantasia, situação cadastral, data de abertura, CNAE principal e secundários, Simples Nacional e MEI, capital social, endereço, telefones e e-mail, direto dos dados abertos da Receita Federal. CNPJs inválidos, repetidos ou inexistentes são ignorados e **não são cobrados**.

### Support

Found a problem or need a new field? Open an issue in the **Issues** tab – we reply as fast as we can.

# Actor input Schema

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

List of CNPJs to look up. Any format works (00.000.000/0001-91 or 00000000000191). Duplicates and invalid numbers are skipped and never charged.

## `includeSecondaryCnaes` (type: `boolean`):

Adds the list of secondary CNAE codes and descriptions to each company.

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

How many CNPJs are looked up in parallel. Keep it low to avoid rate limits.

## Actor input object example

```json
{
  "cnpjs": [
    "00.000.000/0001-91",
    "33.000.167/0001-01"
  ],
  "includeSecondaryCnaes": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,noturn0/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/6Azw8yQyt3UG8IgQ9/builds/rVSmlV7wcyHfe4byK/openapi.json
