# Brazil CNPJ Lookup: Company Registry Data (Receita Federal) (`informed_almandine_vzb/brazil-cnpj-lookup`) Actor

Bulk lookup Brazilian companies by CNPJ (Receita Federal): legal & trade name, status, CNAE codes, share capital, address, Simples/MEI. Export JSON/CSV.

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

## Pricing

$4.00 / 1,000 company looked ups

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: Company Registry Data (Receita Federal)

Bulk lookup Brazilian companies by CNPJ (Receita Federal): legal & trade name, status, CNAE codes, share capital, address, Simples/MEI. Export JSON/CSV.

### What it does

Bulk CNPJ enrichment from Receita Federal open data via the public BrasilAPI. Invalid or unknown CNPJs are reported, not charged. Export clean, deduplicated data as **JSON, CSV, Excel, XML, or RSS**, or connect directly via the **Apify REST API, Python/JavaScript SDKs, CLI, MCP Server, n8n, Make, or Zapier** — with **no login, cookies, or browser overhead**.

### Use cases

- **KYB & Onboarding Verification:** Verify company registration status (`ATIVA`), opening date, legal nature, and share capital against Receita Federal open data.
- **B2B Lead Enrichment:** Enrich Brazilian tax IDs (CNPJs) with primary and secondary CNAE industry codes, municipality/UF address, company size (`porte`), and business phone.
- **Vendor & Tax Compliance Audits:** Check Simples Nacional and MEI flags across supplier lists in bulk with automatic BrasilAPI + ReceitaWS failover.
- **Market & Sector Mapping:** Classify Brazilian enterprise lists by CNAE activity codes and geographic state (`uf`).

### Why use this scraper?

| Feature | This Actor | Generic Browser / HTML Scrapers |
|---|---|---|
| **Architecture** | Direct structured API / JSON / feed requests (`curl_cffi`) | Heavy headless browser automation |
| **Speed & reliability** | **2–25 seconds** for 50–200 items | Minutes of high compute burn |
| **Pricing model** | **Pay per result (`$0.00` actor-start fee)** | Monthly rental or high CU overhead |
| **Error handling** | Failed inputs logged in `ERRORS` key-value record and **never charged** | Bills compute time even on failures |

### Input parameters

- **CNPJ numbers** (`cnpjs`, `array`): Brazilian company tax IDs, with or without punctuation (19.131.243/0001-97).
- **Include registered business email** (`includeContact`, `boolean`): Adds the email registered with Receita Federal. Off by default because for small firms (MEI) it is often a personal address.
- **Delay between requests** (`delaySeconds`, `number`): Polite pause between requests (default `0.5`).

#### Example input

```json
{
  "cnpjs": [
    "00000000000191",
    "33000167000101",
    "33592510000154",
    "60701190000104",
    "60746948000112"
  ]
}
```

### Output & example output

One dataset row per result. Default table view columns: `cnpj, legalName, tradeName, status, openedAt, mainActivity, city, state, size, shareCapital`. Full structured JSON is stored in the run's default dataset.

#### Example output item

```json
{
  "cnpj": "00000000000191",
  "legalName": "BANCO DO BRASIL SA",
  "tradeName": "DIRECAO GERAL",
  "status": "ATIVA",
  "statusDate": "2005-11-03",
  "openedAt": "1966-08-01",
  "legalNature": "Sociedade de Economia Mista",
  "size": "DEMAIS",
  "shareCapital": 120000000000,
  "isHeadOffice": true,
  "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 C1602 TIII SL N101 A N1602",
  "district": "ASA NORTE",
  "city": "BRASILIA",
  "state": "DF",
  "zip": "70040912",
  "businessPhone": "6134939002",
  "businessEmail": null,
  "simplesNacional": false,
  "mei": false,
  "partnerCount": 41,
  "scrapedAt": "2026-10-25T04:22:58+00:00"
}
```

### Pricing (Pay-Per-Result)

This Actor uses transparent **Pay-Per-Event** pricing with a **`$0.00` actor-start fee**:

| Event | What is charged | Price |
|---|---|---|
| `company-result` | Company looked up (One CNPJ company record) | **$0.004 / result** (**$4.00 / 1,000 results**) |
| `apify-actor-start` | Actor start fee | **$0.00** |

#### Concrete pricing math

- **`company-result` (Company looked up):** `1,000 results = $4.00` (`50 results = $0.20`, `10,000 results = $40.00`). Apify's **$5.00/month Free Tier** covers up to **1,250 results/month** at **$0.00** out-of-pocket.
- **Empty runs (`0` results) & skipped duplicates (`onlyNew` / `onlyChanged`):** **$0.00**.

### Data and compliance

Business data only. Partner names and masked CPFs (QSA) are dropped and only the partner count is kept. Registered email is off by default. Requests are rate-limited and routed through Apify Proxy. Per-input errors are recorded in the run's `ERRORS` key-value record and are never charged.

### FAQ

**Do I need an account, login, or API key?**\
No. This Actor queries public endpoints directly and requires zero credentials.

**What happens if I start a run with empty `{}` input via API or CLI?**\
Every required input defines both `prefill` and `default` values in `.actor/input_schema.json`, so an empty `{}` run automatically returns **50+ live records** out of the box.

# Actor input Schema

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

Brazilian company tax IDs, with or without punctuation (19.131.243/0001-97).

## `includeContact` (type: `boolean`):

Adds the email registered with Receita Federal. Off by default because for small firms (MEI) it is often a personal address.

## `delaySeconds` (type: `number`):

Polite pause between requests.

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

Apify Proxy settings.

## Actor input object example

```json
{
  "cnpjs": [
    "00000000000191",
    "33000167000101",
    "33592510000154",
    "60701190000104",
    "60746948000112",
    "18236120000158",
    "07526557000100",
    "47960950000121",
    "84429695000111",
    "07689002000189",
    "09346601000125",
    "71673990000177",
    "16670085000155",
    "61585865000151",
    "92754738000162",
    "02558157000162",
    "02421421000111",
    "43776517000180",
    "17155730000164",
    "00001180000126",
    "33611500000119",
    "16404287000155",
    "33042730000104",
    "89637490000145",
    "02916265000160",
    "01838723000127",
    "03853896000140",
    "33256439000139",
    "50746577000115",
    "34274233000102",
    "02474103000119",
    "03220438000173",
    "02429144000193",
    "60840055000131",
    "06047087000139",
    "63554067000198",
    "53113791000122",
    "02351877000152",
    "01027058000191",
    "16501555000157",
    "08561701000101",
    "30306294000145",
    "02332886000104",
    "90400888000142",
    "00360305000104",
    "34028316000103",
    "33657248000189",
    "00330845000145",
    "33469172000168",
    "33469164000111"
  ],
  "includeContact": false,
  "delaySeconds": 0.5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `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": [
        "00000000000191",
        "33000167000101",
        "33592510000154",
        "60701190000104",
        "60746948000112",
        "18236120000158",
        "07526557000100",
        "47960950000121",
        "84429695000111",
        "07689002000189",
        "09346601000125",
        "71673990000177",
        "16670085000155",
        "61585865000151",
        "92754738000162",
        "02558157000162",
        "02421421000111",
        "43776517000180",
        "17155730000164",
        "00001180000126",
        "33611500000119",
        "16404287000155",
        "33042730000104",
        "89637490000145",
        "02916265000160",
        "01838723000127",
        "03853896000140",
        "33256439000139",
        "50746577000115",
        "34274233000102",
        "02474103000119",
        "03220438000173",
        "02429144000193",
        "60840055000131",
        "06047087000139",
        "63554067000198",
        "53113791000122",
        "02351877000152",
        "01027058000191",
        "16501555000157",
        "08561701000101",
        "30306294000145",
        "02332886000104",
        "90400888000142",
        "00360305000104",
        "34028316000103",
        "33657248000189",
        "00330845000145",
        "33469172000168",
        "33469164000111"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("informed_almandine_vzb/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": [
        "00000000000191",
        "33000167000101",
        "33592510000154",
        "60701190000104",
        "60746948000112",
        "18236120000158",
        "07526557000100",
        "47960950000121",
        "84429695000111",
        "07689002000189",
        "09346601000125",
        "71673990000177",
        "16670085000155",
        "61585865000151",
        "92754738000162",
        "02558157000162",
        "02421421000111",
        "43776517000180",
        "17155730000164",
        "00001180000126",
        "33611500000119",
        "16404287000155",
        "33042730000104",
        "89637490000145",
        "02916265000160",
        "01838723000127",
        "03853896000140",
        "33256439000139",
        "50746577000115",
        "34274233000102",
        "02474103000119",
        "03220438000173",
        "02429144000193",
        "60840055000131",
        "06047087000139",
        "63554067000198",
        "53113791000122",
        "02351877000152",
        "01027058000191",
        "16501555000157",
        "08561701000101",
        "30306294000145",
        "02332886000104",
        "90400888000142",
        "00360305000104",
        "34028316000103",
        "33657248000189",
        "00330845000145",
        "33469172000168",
        "33469164000111",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("informed_almandine_vzb/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": [
    "00000000000191",
    "33000167000101",
    "33592510000154",
    "60701190000104",
    "60746948000112",
    "18236120000158",
    "07526557000100",
    "47960950000121",
    "84429695000111",
    "07689002000189",
    "09346601000125",
    "71673990000177",
    "16670085000155",
    "61585865000151",
    "92754738000162",
    "02558157000162",
    "02421421000111",
    "43776517000180",
    "17155730000164",
    "00001180000126",
    "33611500000119",
    "16404287000155",
    "33042730000104",
    "89637490000145",
    "02916265000160",
    "01838723000127",
    "03853896000140",
    "33256439000139",
    "50746577000115",
    "34274233000102",
    "02474103000119",
    "03220438000173",
    "02429144000193",
    "60840055000131",
    "06047087000139",
    "63554067000198",
    "53113791000122",
    "02351877000152",
    "01027058000191",
    "16501555000157",
    "08561701000101",
    "30306294000145",
    "02332886000104",
    "90400888000142",
    "00360305000104",
    "34028316000103",
    "33657248000189",
    "00330845000145",
    "33469172000168",
    "33469164000111"
  ]
}' |
apify call informed_almandine_vzb/brazil-cnpj-lookup --silent --output-dataset

```

## MCP server setup

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