# Brazil Company Finder (CNPJ, English industry labels) (`latsouth/brazil-company-finder`) Actor

Search every active Brazilian company (CNPJ) by industry (CNAE), state, city, size, age and share capital. Pre-cleaned Receita Federal data with English CNAE labels, HTTP-verified websites and an accountant-contact filter. No 25 GB raw download.

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

## Pricing

$3.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 Company Finder: every active Brazilian company (CNPJ), filterable, in English

Search 10.6 million active Brazilian companies and branches by industry, state, city, size, age and share
capital. You get clean records with **English industry labels**, an **HTTP-verified website**, the registered
**phone and e-mail**, and a filter that removes **accountant contacts**. No 25 GB government download,
no Portuguese codebook, no ETL.

Built from the official open-data release of Brazil's federal tax authority (Receita Federal,
*Cadastro Nacional da Pessoa Jurídica*). It is the same registry that powers every Brazilian B2B list,
already cleaned and indexed.

### Who it's for

- **Sales and SDR teams** going into Brazil who need an account list by industry and region: "software
  companies in São Paulo with a corporate website", "dental clinics in Minas Gerais opened since 2022".
- **Market sizing and TAM analysis**: every run reports `total_matching`, the number of companies that
  match your filters, even if you only pull a sample.
- **Data enrichment**: start from a CNPJ list in a CNAE (industry) segment and feed it to your enrichment
  waterfall or CRM.

### Why not just download the raw Receita dump?

| | Raw Receita open data | This actor |
|---|---|---|
| Size | ~7 GB of zips that unpack to ~25 GB of CSV, which you then have to join | Query in seconds, pay per row |
| Format | 30 unnamed columns, latin-1, `;`-separated, split across shards | Named English fields, JSON/CSV/Excel |
| Industry codes | Codes only, with Portuguese labels in a separate table | `cnae_label_en` in English, plus division and section in English, and the Portuguese original |
| Status | Active, suspended, closed and void companies all mixed together | **Active companies only** (situação cadastral 02) |
| Individual entrepreneurs / MEI | Included, with personal names and CPF numbers | **Excluded** (only legal entities are kept) |
| Website | Not provided | `website`: the corporate e-mail domain, **checked over HTTP** (live, not parked, not for sale), with the check date. The unchecked `website_guess` is kept too |
| Accountant contacts | Many companies register their accountant's e-mail/phone, so you end up calling the accountant | `is_likely_accountant_contact` flag, excluded by default |
| Phones | `DDD` and number in separate fields, mixed formats | Normalized `+55DDNNNNNNNN` |

### Input examples

**Software companies in São Paulo with a verified website**

```json
{
  "cnae_divisions": ["62"],
  "states": ["SP"],
  "only_with_verified_website": true,
  "max_results": 500
}
```

**New dental clinics in Minas Gerais and Rio de Janeiro (opened since 2023), head offices only**

```json
{
  "cnae_codes": ["8630504", "8630505"],
  "states": ["MG", "RJ"],
  "opened_after": "2023-01-01",
  "headquarters_only": true
}
```

**Logistics companies with at least BRL 1M share capital, matched by keyword**

```json
{
  "keyword": "freight",
  "min_share_capital": 1000000,
  "company_size": ["other"],
  "sort_by": "share_capital_desc"
}
```

| Field | What it does |
|---|---|
| `cnae_divisions` | 2-digit CNAE divisions of the main activity (62 = IT services, 47 = retail, 86 = health...) |
| `cnae_codes` | 7-digit CNAE subclasses (`6201501` or `6201-5/01`), or shorter prefixes |
| `include_secondary_cnaes` | Also match companies that have the code as a secondary activity |
| `keyword` | Substring in the English activity label or the legal/trade name |
| `states`, `cities` | State (UF) codes and city names (accents optional) |
| `company_size` | `micro`, `small`, `other` (Receita *porte*) |
| `opened_after`, `opened_before` | Opening date range |
| `min_share_capital` | Minimum declared share capital (BRL) |
| `only_with_verified_website` | Only companies whose website passed the HTTP check (see field notes) |
| `only_with_website`, `only_with_email`, `only_with_phone` | Contact completeness filters (`only_with_website` = has a `website_guess`, checked or not) |
| `exclude_accountant_contacts` | Default **true**. Leaves out companies whose contact is an accountant's |
| `headquarters_only` | Only head offices (*matriz*), no branches |
| `sort_by` | `share_capital_desc` (default), `opening_date_desc`, `opening_date_asc`, `cnpj` |
| `max_results` | Default 1000 |

### Output sample

Illustrative rows. The companies, names and contacts below are made up.

```json
[
  {
    "cnpj": "12345678000190",
    "cnpj_root": "12345678",
    "is_headquarters": true,
    "legal_name": "EXEMPLO SISTEMAS LTDA",
    "trade_name": "EXEMPLO TECH",
    "legal_nature_code": "2062",
    "legal_nature": "Limited liability company (Ltda.)",
    "company_size": "small",
    "share_capital_brl": 250000.0,
    "opening_date": "2019-03-14",
    "cnae_code": "6202300",
    "cnae_label_en": "Development and licensing of customizable software",
    "cnae_label_pt": "Desenvolvimento e licenciamento de programas de computador customizáveis",
    "cnae_division": "62",
    "cnae_division_en": "Information technology services (software development and IT consulting)",
    "cnae_section": "J",
    "cnae_section_en": "Information and communication",
    "secondary_cnaes": ["6204000", "6209100"],
    "state": "SP",
    "city": "CAMPINAS",
    "zip": "13000000",
    "address": "RUA EXEMPLO, 100 - SALA 1 - CENTRO",
    "phone": "+551930000000",
    "email": "contato@exemplotech.com.br",
    "email_domain": "exemplotech.com.br",
    "website_guess": "https://exemplotech.com.br",
    "website": "https://www.exemplotech.com.br/",
    "website_verified": true,
    "website_checked_at": "2026-10-22T14:40:05Z",
    "is_likely_accountant_contact": false,
    "data_as_of": "2026-10-10"
  }
]
```

The run's key-value store `OUTPUT` record holds `total_matching` (all companies matching your filters),
`pushed`, `data_as_of` of the release that was queried, and whether the run stopped at your spending limit.

### Field notes

- **`website_guess`** is `https://` plus the domain of the registered e-mail, and only when that domain is
  corporate. Free-mail and ISP domains (Gmail, Hotmail/Outlook, Yahoo, UOL, BOL, Terra, IG, Globo, iCloud...),
  their typos, domains with accounting wording, and generic domains shared by many unrelated companies are
  never used. About 14% of all rows have one. On its own it is unchecked.
- **`website` / `website_verified` / `website_checked_at`**: how "verified" works, exactly.
  Every distinct `website_guess` domain is checked by an automated script: DNS lookup of the domain (then
  `www.`), an HTTP GET to `https://<domain>/`, then `http://<domain>/`, then `https://www.<domain>/` if the bare
  domain refuses connections. Up to 5 redirects are followed, with an 8-second timeout per request. Answers
  of 400 or above get one retry with a regular-browser TLS fingerprint, because many sites block scripts.
  `website_verified` is `true` only when the final answer is HTTP 2xx or 3xx **and** the first 64 KB of the
  page don't look like a parked, for-sale, suspended, expired, "under construction" or hosting / web-server
  default page (title and body patterns, plus redirects to domain marketplaces). `website` is then the final
  URL after redirects. It can be on another domain when the company forwards its e-mail domain to a brand
  site. Otherwise `website` is null and `website_verified` is `false` (dead DNS, no answer, 4xx/5xx, parked
  page, or not checked yet). `website_checked_at` (UTC) is when the check ran. Checks are redone every 90
  days, and a check older than 90 days when the dataset is built counts as unchecked. The dataset is rebuilt
  monthly, so a check is at most about 4 months old when you read it. Verified means the site answered at that
  time. It doesn't mean it is still up today, and it says nothing about the e-mail inbox.
- **`is_likely_accountant_contact`** is true when the same e-mail is registered for more than 4 unrelated
  companies (different CNPJ roots), the same phone for more than 5, the e-mail looks like an accounting
  firm's, or the e-mail domain belongs to an accounting firm. In Brazil
  the accountant often files the registration and puts in their own contact details. About 38% of rows
  are flagged. The exact rule is documented in the pipeline that builds the data.
- **`company_size`** is the Receita *porte*: `micro` (ME), `small` (EPP), `other` (everything above EPP).
  It is null when it wasn't informed.
- **`phone`** is the first valid company phone, in `+55` + area code + number format. No digits are
  added. Older 8-digit mobile numbers are left as registered.

### Data freshness

Data comes from the Receita Federal open-data release dated **2026-10-10** (published 2026-10-13). Receita
publishes a new release monthly, and this dataset is rebuilt from it; the actor always reads the latest
published release. Every row carries `data_as_of`, and the run log and `OUTPUT` record show it too. Website
checks have their own date, `website_checked_at`.

### Privacy and LGPD

This actor returns **company data only**, as published by the Brazilian government as open data:

- Individual entrepreneurs (*empresário individual*, including MEI) and the other natural-person legal
  natures (rural producer, individual real-estate enterprise, electoral candidate) are **excluded**.
- No shareholder or partner data (QSA), no CPF numbers. CPF-like digit runs at the end of company names
  are stripped.
- Contact fields are the company's registered contact details.

You are responsible for using the data lawfully in your jurisdiction. That includes LGPD and anti-spam
rules for outreach, and honouring opt-out requests.

### Pricing

Pay per event:

| Event | When it's charged | Price |
|---|---|---|
| `company-result` | Once per company row returned in the dataset | $X.XX per 1,000 results (placeholder) |

Set a **maximum cost per run** in Apify and the actor stops pushing rows when it's reached. You only
pay for rows you actually receive.

### FAQ

**Can I get every company in a segment?** Yes. Set `max_results` high enough, or run once per state.
`total_matching` in `OUTPUT` tells you how many there are.

**Why are some well-known companies missing a website?** They registered a free-mail or accountant
e-mail with Receita. The company is still returned, just with `website_guess` and `website` empty.

**Why is `website_guess` set but `website` null?** The domain failed the check: no DNS, no answer, an error
page, or a parked/for-sale/under-construction page. Or it hasn't been checked yet (`website_checked_at` is null).

**Can I look up specific CNPJs?** Not in this version. Use the industry and location filters.

# Actor input Schema

## `cnae_divisions` (type: `array`):

Two-digit CNAE divisions of the main activity, e.g. 62 = IT services (software development, IT consulting), 47 = retail trade, 86 = human health. Combined with industry codes using OR.

## `cnae_codes` (type: `array`):

Full 7-digit CNAE subclasses (6201501 or 6201-5/01) or shorter prefixes (4-5 digits = class or group).

## `include_secondary_cnaes` (type: `boolean`):

If on, industry codes also match companies that list the code as a secondary activity.

## `keyword` (type: `string`):

Case- and accent-insensitive substring searched in the English activity label and in the legal and trade names (e.g. software, clinic, logistica).

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

Leave empty for all of Brazil. Selecting states makes runs faster.

## `cities` (type: `array`):

City names as in the federal registry, accents optional (e.g. Sao Paulo, Campinas, Belo Horizonte).

## `company_size` (type: `array`):

Leave empty for all sizes.

## `opened_after` (type: `string`):

YYYY-MM-DD

## `opened_before` (type: `string`):

YYYY-MM-DD

## `min_share_capital` (type: `integer`):

Declared share capital of the company, in Brazilian reais.

## `only_with_website` (type: `boolean`):

Keep only companies whose registered e-mail uses a corporate domain (not Gmail/Hotmail/ISP/accounting firm).

## `only_with_verified_website` (type: `boolean`):

Keep only companies whose website answered an HTTP check with a 2xx/3xx status and is not a parked, for-sale, suspended, under-construction or hosting default page. The check is at most 90 days older than the dataset build; see website_checked_at.

## `only_with_email` (type: `boolean`):

Keep only companies with a syntactically valid registered e-mail.

## `only_with_phone` (type: `boolean`):

Keep only companies with a valid registered phone number.

## `exclude_accountant_contacts` (type: `boolean`):

Many Brazilian companies register their accountant's e-mail or phone. When on, companies whose registered contact is shared by many unrelated companies (or looks like an accounting firm) are left out.

## `headquarters_only` (type: `boolean`):

Return only head offices (matriz), not branches (filiais).

## `sort_by` (type: `string`):

Order of results. Largest share capital first is a good default for B2B prospecting.

## `max_results` (type: `integer`):

You pay per company returned. The run also stops at your spending limit.

## Actor input object example

```json
{
  "cnae_divisions": [
    "62"
  ],
  "include_secondary_cnaes": false,
  "states": [
    "SP"
  ],
  "only_with_website": false,
  "only_with_verified_website": false,
  "only_with_email": false,
  "only_with_phone": false,
  "exclude_accountant_contacts": true,
  "headquarters_only": false,
  "sort_by": "share_capital_desc",
  "max_results": 1000
}
```

# Actor output Schema

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

Matching companies, one item per row. Download as JSON, CSV, Excel or XML via the dataset API.

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

Counts, applied filters, data_as_of and whether the run stopped at the buyer's budget cap.

# 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 = {
    "cnae_divisions": [
        "62"
    ],
    "states": [
        "SP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("latsouth/brazil-company-finder").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 = {
    "cnae_divisions": ["62"],
    "states": ["SP"],
}

# Run the Actor and wait for it to finish
run = client.actor("latsouth/brazil-company-finder").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 '{
  "cnae_divisions": [
    "62"
  ],
  "states": [
    "SP"
  ]
}' |
apify call latsouth/brazil-company-finder --silent --output-dataset

```

## MCP server setup

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

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/eC1NEu5PgyXMHcMbZ/builds/eX89qjAPoh88euYPx/openapi.json
