# Brazil CNPJ Scraper: Company Data, Partners, Phone and Email (`themineworks/brazil-cnpj-scraper`) Actor

Look up Brazilian companies by CNPJ or find them by CNAE activity, state and city: legal and trade name, status, opening date, capital, size, Simples and MEI, address, phone, email and partners (QSA) from the Receita Federal open data. No login.

- **URL**: https://apify.com/themineworks/brazil-cnpj-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.44 / 1,000 companies

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 Scraper: Company Data, Partners, Phone and Email

[![400 Brazilian dental clinics with phone, email and partners in 34 seconds](https://api.apify.com/v2/key-value-stores/cUXz95yxflDho41nn/records/brazil-cnpj-scraper-hero.png)](https://console.apify.com/actors/zL2aYWqxLzdoGubAh/input?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

Returns Brazilian companies from the Receita Federal open CNPJ data: look up any CNPJ, or find companies by activity (CNAE code or plain words), state and city. One row per company with legal and trade name, status, opening date, activity codes, size, share capital, Simples Nacional and MEI flags, full address, phone, email and partners (QSA). No login, no cookies, no API key. You pay $1.80 per 1,000 companies on the Free plan and $1.44 per 1,000 on the Gold plan, plus a $0.001 start fee per run. The email costs nothing extra.

From **The Mine Works**, with over 340,000 runs across 330+ public actors.

Updated 12 Nov 2026: first release. CNPJ lookup with three fallback sources, company search by CNAE code or activity words, state, city name and legal nature, filters for status, size, MEI, head office, opening date, share capital, phone and email, and the registered email in every row. Bookmark this Actor on its Store page so it is one click away next time.

### Why choose this actor?

- **Search the way you think.** Type a city as "Campinas, SP" and an activity as "contabilidade" or "dentista"; the actor turns them into the IBGE code and CNAE codes and lists the codes it used in the summary row. Other CNPJ actors ask for numeric municipality codes.
- **Lead lists that are ready to call.** Active companies only by default, plus filters to drop MEIs and branches, keep companies opened after a date, above a share capital, or with a phone or email. Filtered out records are never charged. In our test of 400 dental clinics in Bahia, Pernambuco and Ceara, 398 had a phone and 383 an email.
- **Email included at the same price.** The email registered with the Receita Federal comes in every row from a second public source, with no extra event.
- **Pay per company, nothing for errors.** Invalid CNPJs, CNPJs that do not exist, the summary row and duplicates are never charged.

[![Run it on Apify](https://api.apify.com/v2/key-value-stores/cUXz95yxflDho41nn/records/button-run.png)](https://console.apify.com/actors/zL2aYWqxLzdoGubAh/input?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Part of The Mine Works Company and business data family:** [Company Domain Finder](https://apify.com/themineworks/company-domain-finder?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral), [GST Taxpayer Lookup](https://apify.com/themineworks/gst-taxpayer-lookup?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral), [Company KYB Resolver](https://apify.com/themineworks/company-identity-resolver?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral), [SEC EDGAR Filings Scraper](https://apify.com/themineworks/sec-edgar-filings?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral), [EU VAT Checker (VIES)](https://apify.com/themineworks/eu-vat-vies-validator?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral), [Tech Stack Detector](https://apify.com/themineworks/tech-stack-detector?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral).

### Try it in one minute

Paste this into the input (JSON view) and press Start. It returns 20 active custom software companies in Sao Paulo state with phone, email and partners. It took 3 seconds in our test run on Apify:

```json
{
  "cnaes": ["6201501"],
  "states": ["SP"],
  "maxItems": 20
}
```

Or look up companies you already have:

```json
{
  "cnpjs": ["00.000.000/0001-91", "33.683.111/0002-80"]
}
```

Apify's free plan includes $5 of credit every month, which covers about 2,700 companies at this actor's price.

#### Copy to your AI assistant

```text
themineworks/brazil-cnpj-scraper on Apify. Reads Brazilian company data (CNPJ) from the Receita Federal open data and returns one flat row per company, no login. Call ApifyClient("TOKEN").actor("themineworks/brazil-cnpj-scraper").call(run_input={"cnaes": ["6201501"], "states": ["SP"], "maxItems": 100}), then client.dataset(run["defaultDatasetId"]).list_items().items. Give cnpjs (list of CNPJ numbers, any format, up to 10000) for lookups, and/or search filters: cnaes (7 digit CNAE codes), activityKeywords (Portuguese words or everyday words such as software, dentista, contabilidade), states (UF codes), cities ("Campinas, SP" or IBGE codes), legalNatureCodes (4 digits). Optional: cnaeMatch (primary or any, default primary), statuses (default ["active"]; also closed, inapt, suspended, null; [] for all), companySizes (micro, small, other, not_informed), excludeMei, headOfficeOnly, openedFrom and openedTo (YYYY-MM-DD), minShareCapital, requirePhone, requireEmail, includeEmail (default true), maxItems (search results, default 100, up to 20000). Company rows have no _type field and carry cnpj, cnpj_formatted, cnpj_root, legal_name, trade_name, is_head_office, status, status_en, status_date, status_reason, special_situation, opening_date, company_age_years, main_cnae, main_cnae_description, secondary_cnae_codes, secondary_cnaes, legal_nature_code, legal_nature, company_size, company_size_en, share_capital, simples_nacional, simples_since, simples_until, mei, mei_since, mei_until, tax_regime_latest, tax_regime_year, street_type, street, number, complement, neighborhood, city, city_ibge_code, state, zip_code, country, foreign_city, full_address, phone_1, phone_2, fax, phones_e164, email, responsible_federal_entity, partners (name, type, qualification, entry_date, age_range, cpf_cnpj_masked, country, legal_representative), partner_count, partner_names, source (lookup or search), input, source_url, scraped_at. Each run also writes one row with _type "summary", one with _type "info" when companies were delivered, and a row with _type "error" for each input that could not be used; none of these is charged. Full spec: GET https://api.apify.com/v2/acts/themineworks~brazil-cnpj-scraper/builds/default (Bearer TOKEN), which returns inputSchema and readme.
```

### Key features

- **Lookup and search in one run.** Put CNPJs in `cnpjs` for one row each, whatever the status, and filters in the search fields for new companies; both run in the same job. Dots, slash and dash are optional, and CNPJs that lost their leading zero in a spreadsheet are fixed.
- **Activity by code or by words.** `cnaes` takes 7 digit subclasses with or without the mask (`6201501` or `6201-5/01`). `activityKeywords` matches the official CNAE wording (in Portuguese) and understands everyday words such as software, dentista, advogados, academia, farmacia, salao de beleza and real estate. `cnaeMatch` picks the main activity only or main and secondary.
- **City names, not codes.** `cities` accepts "Curitiba, PR", "Porto Alegre" or the 7 digit IBGE code. A name used in more than one state is flagged in the summary so you can add the state.
- **Filters before you pay.** Status (active by default), company size, MEI, head office, opening date range, minimum share capital, phone present, email present. Records that fail a filter are skipped and never charged.
- **Partners and tax details.** The partner list (QSA) with qualification, entry date, age range and the masked CPF exactly as the Receita Federal publishes it, plus Simples Nacional and MEI dates and the latest declared tax regime.
- **Stops cleanly.** A search reads at most 50 registry records per company you ask for (at least 2,000), so a filter that matches almost nothing ends instead of paging the whole country. Lookups fall back to a second and a third source. The summary row says why a run ended.

### How to use it

#### Basic: enrich a list of CNPJs

```json
{
  "cnpjs": ["60.746.948/0001-12", "33000167000101", "02558157000162"]
}
```

One row per CNPJ with status, address, phone, email and partners. CNPJs that are not valid or not found get an error row and are not charged.

#### Lead list: accounting firms in two states

```json
{
  "activityKeywords": ["contabilidade"],
  "states": ["MG", "RJ"],
  "headOfficeOnly": true,
  "excludeMei": true,
  "maxItems": 1000
}
```

Active head offices with CNAE 6920601, no MEIs. In our test, 993 of 1,000 rows had a phone and 949 an email.

#### New companies in your cities

```json
{
  "cnaes": ["5611201", "5611203", "4729699"],
  "cities": ["Curitiba, PR", "Porto Alegre", "Florianopolis"],
  "openedFrom": "2026-01-01",
  "requireEmail": true,
  "maxItems": 300
}
```

Restaurants, snack bars and food shops opened this year, with an email. Run it monthly on a schedule to catch each new batch.

#### Bigger companies only

```json
{
  "activityKeywords": ["software"],
  "states": ["SP"],
  "companySizes": ["other"],
  "minShareCapital": 1000000,
  "maxItems": 500
}
```

`companySizes: ["other"]` keeps companies above the small business (EPP) limit; `minShareCapital` is in BRL.

### Input parameters

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `cnpjs` | array of strings | empty | CNPJs to look up, any format, up to 10,000. |
| `cnaes` | array of strings | empty | 7 digit CNAE subclasses. |
| `activityKeywords` | array of strings | empty | Words matched against CNAE descriptions; the codes used are in the summary. |
| `cnaeMatch` | string | `primary` | `primary` (main activity) or `any` (main or secondary). |
| `states` | array of strings | empty | Two letter state codes or names. |
| `cities` | array of strings | empty | City names with the state, or IBGE codes. |
| `legalNatureCodes` | array of strings | empty | 4 digit natureza juridica codes, e.g. `2062`. |
| `statuses` | array | `["active"]` | Statuses kept in search results; empty for all. |
| `companySizes` | array | empty | `micro`, `small`, `other`, `not_informed`. |
| `excludeMei` | boolean | `false` | Skip MEIs. |
| `headOfficeOnly` | boolean | `false` | Skip branches. |
| `openedFrom`, `openedTo` | string | empty | Opening date range, YYYY-MM-DD. |
| `minShareCapital` | integer | empty | Minimum share capital in BRL. |
| `requirePhone`, `requireEmail` | boolean | `false` | Keep only companies with a phone or an email. |
| `includeEmail` | boolean | `true` | Add the registered email. |
| `maxItems` | integer | `100` | Most companies from the search, 1 to 20,000. Lookups are not counted. |

A search needs at least one of `cnaes`, `activityKeywords`, `states`, `cities` or `legalNatureCodes`. If you fill a field and none of its values can be used (a city that does not exist, words that match no activity), the search is not run, so you never get companies you did not ask for.

### What data do you get?

One row per company. Company rows have no `_type` field; the summary, info and error rows do, so a filter on `_type` separates them.

| Field | What it is |
|---|---|
| `cnpj`, `cnpj_formatted`, `cnpj_root` | CNPJ as 14 digits, as `00.000.000/0001-91`, and the 8 digit root shared with branches |
| `legal_name`, `trade_name` | Razao social and nome fantasia |
| `is_head_office` | `true` for the matriz, `false` for a filial |
| `status`, `status_en`, `status_date`, `status_reason` | Situacao cadastral (ATIVA, BAIXADA, INAPTA, SUSPENSA, NULA), in English, its date and reason |
| `special_situation` | Situacao especial, when any |
| `opening_date`, `company_age_years` | Activity start date and years since |
| `main_cnae`, `main_cnae_description` | Main activity |
| `secondary_cnae_codes`, `secondary_cnaes` | Secondary activities, codes and code with description |
| `legal_nature_code`, `legal_nature` | Natureza juridica |
| `company_size`, `company_size_en` | Porte (MICRO EMPRESA, EMPRESA DE PEQUENO PORTE, DEMAIS) and in English |
| `share_capital` | Declared share capital in BRL |
| `simples_nacional`, `simples_since`, `simples_until` | Simples Nacional option and dates |
| `mei`, `mei_since`, `mei_until` | MEI option and dates |
| `tax_regime_latest`, `tax_regime_year` | Latest declared tax regime, e.g. LUCRO PRESUMIDO, and its year |
| `street_type`, `street`, `number`, `complement`, `neighborhood` | Address parts |
| `city`, `city_ibge_code`, `state`, `zip_code` | Municipality, IBGE code, UF and CEP |
| `country`, `foreign_city` | For companies registered abroad |
| `full_address` | The address in one line |
| `phone_1`, `phone_2`, `fax`, `phones_e164` | Phones as area code plus number, and in +55 format |
| `email` | Registered email, lowercase |
| `responsible_federal_entity` | For public bodies |
| `partners`, `partner_count`, `partner_names` | QSA: `name`, `type` (person, company, foreign), `qualification`, `entry_date`, `age_range`, `cpf_cnpj_masked`, `country`, `legal_representative` |
| `source`, `input`, `source_url` | `lookup` or `search`, the CNPJ as you gave it, and a link to the record |
| `scraped_at` | When the row was written |

**Summary row** (`_type: "summary"`, never charged): `mode`, `cnpjs_requested`, `cnpjs_found`, `cnpjs_not_found`, `cnpjs_failed`, `search_pages_read`, `search_records_scanned`, `search_records_matched`, `filtered_out` (per filter), `search_end`, `search_filters` (the CNAE codes and cities actually used), `activity_keywords` (codes found per word), `companies_delivered`, `charged_for`, `email_lookups`, `email_found`, `http_requests`, `http_megabytes`, `shortfall_reason` when fewer companies came back than asked. The same summary is saved as the `OUTPUT` record of the run.

#### Example row

```json
{
  "cnpj": "59142996000112",
  "cnpj_formatted": "59.142.996/0001-12",
  "legal_name": "KG & AT SMILE LTDA",
  "trade_name": "CONSULTORIO DRA KAUANNE GALISA",
  "is_head_office": true,
  "status": "ATIVA",
  "status_en": "active",
  "opening_date": "2025-01-28",
  "main_cnae": "8630504",
  "main_cnae_description": "Atividade odontológica",
  "legal_nature": "Sociedade Empresária Limitada",
  "company_size": "MICRO EMPRESA",
  "share_capital": 44000,
  "simples_nacional": true,
  "mei": false,
  "full_address": "PRACA FLAVIO SILVANY, 130, ANDAR 1 SALA 110, CENTRO, ITABERABA BA, CEP 46880000",
  "city": "ITABERABA",
  "state": "BA",
  "phone_1": "7583163883",
  "phones_e164": ["+557583163883"],
  "email": "khaa.tenorio@hotmail.com",
  "partner_count": 2,
  "partner_names": "ADRIANA TENORIO BISPO; KAUANNE BISPO GALISA",
  "source": "search",
  "scraped_at": "2026-11-11T20:23:05.293Z"
}
```

### Pricing

Pay per event: you pay for the companies you receive, plus a flat $0.001 per run, whatever memory you choose. The email costs nothing extra.

| Event | When it is charged | Free plan | Bronze (Starter) | Silver (Scale) | Gold (Business) |
|---|---|---|---|---|---|
| `company` | Once per company row stored in your dataset | $1.80 per 1,000 | $1.80 per 1,000 | $1.62 per 1,000 | $1.44 per 1,000 |
| `run-start` | Once per run, after the first company record came back | $0.001 | $0.001 | $0.001 | $0.001 |

Never charged:

- invalid CNPJs and CNPJs the registry does not have (each gets an error row);
- search records that fail your filters (status, size, MEI, head office, dates, capital, phone, email);
- a company found twice in one run;
- the summary, info and error rows;
- a run with no valid input, or one whose search finds nothing: the start fee is charged only once a company record came back;
- anything past your "Max cost per run". The actor checks the budget before each batch of rows and stops while the total is still below your limit.

### How it compares

| Actor | Price per 1,000 on the Free plan | Start fee | Search by | City input | Email |
|---|---|---|---|---|---|
| **This actor** | $1.80 | $0.001 per run | CNAE codes or words, state, city, legal nature | Name or IBGE code | Included |
| [Brazil Company Registry Data & CNPJ Lookup by jungle_synthesizer](https://apify.com/jungle_synthesizer/brazil-cnpj-receita-federal-crawler?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral) | $2.00 | $0.10 per GB of memory | CNAE code, state, municipality code, legal nature, partner CPF | IBGE or SIAFI code | Optional, billed as one more result |
| [Brazil CNPJ Receita Federal Scraper by epicscrapers](https://apify.com/epicscrapers/brazil-cnpj-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral) | $0.90 | $0.00005 per GB of memory | CNAE code, state, municipality code, legal nature, partner CPF | IBGE or SIAFI code | Listed as a field |
| [CNPJ Lead Scraper API by brasildados](https://apify.com/brasildados/cnpj-lead-scraper-search?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral) | $70.00 | $0.30 per GB of memory | CNAE codes, states, size, status, up to 500 per run | No | Yes |

Checked 11 Nov 2026 from the public Store listings.

### Run it on a schedule

1. Open the actor in Apify Console, set your input and click **Save as a new task**.
2. In the task, open **Schedules**, click **Add schedule** and pick how often. The registry data is refreshed about once a month, so monthly or weekly is enough.
3. With `openedFrom` set to the start of the month, each run brings the companies opened since then.
4. Optional: add an integration (Google Sheets, a CRM through Make or n8n, a webhook) so each run lands where your sales team works.

### FAQ

#### Where does the data come from?

From the Receita Federal open CNPJ data (Dados Abertos do CNPJ), published by the Brazilian government and refreshed about once a month. The actor reads it through public mirrors of that data: minhareceita.org for search and lookup, BrasilAPI as a second lookup source, and api.opencnpj.org for the registered email and as a third lookup source.

#### Do I need an account, cookies or an API key?

No account, no cookies and no API key. Nothing to set up and no proxy needed.

#### How fresh is the data?

As fresh as the latest monthly Receita Federal release. A company opened or closed in the last few weeks may not show the change yet.

#### How many companies can I get?

Up to 20,000 per run from the search and up to 10,000 CNPJ lookups. For more, split the search by state or city and run them in parallel.

#### Why did my search return fewer companies than I asked for?

Your filters left fewer matches than `maxItems`, or the search reached its scan limit (50 registry records read per company asked for). The summary row shows how many records were read and how many each filter removed in `filtered_out`.

#### What do the masked CPFs mean?

The Receita Federal publishes partner CPFs with the first three and last two digits hidden (`***258998**`). The actor returns them exactly as published, never unmasked.

#### Is it legal to scrape Brazilian CNPJ data?

The CNPJ registry is open government data that the Receita Federal publishes for anyone to download and reuse. Rows can still hold personal data, for example the email and phone of an MEI, which is often one person. Under the LGPD you need a lawful basis for how you use it, such as legitimate interest for B2B contact, and you must honour opt out requests. Use `excludeMei` to keep one person businesses out of a list. This is general information, not legal advice.

#### Which formats can I download?

JSON, CSV, Excel, XML, RSS and HTML from the run's Storage tab or through the API. In CSV and Excel, the `partners` list is flattened into columns; `partner_names` gives all names in one cell.

#### Can I use it from Claude, ChatGPT or Cursor (MCP)?

Yes, through Apify's MCP server. Connector URL: https://mcp.apify.com/?tools=themineworks/brazil-cnpj-scraper

- Claude: Settings > Connectors > Add custom connector, paste the URL, sign in with Apify.
- ChatGPT: turn on developer mode, add an MCP connector with the URL, sign in with Apify.
- Cursor or VS Code: add it as an HTTP MCP server with that URL.
- Claude Code: `claude mcp add -t http brazil-cnpj-scraper "https://mcp.apify.com/?tools=themineworks/brazil-cnpj-scraper"`

#### How long does a run take?

In our tests on Apify (12 Nov 2026): 3 seconds for the "Try it" input (20 companies), 5 seconds for 60 CNPJ lookups, 34 seconds for 400 dental clinics in three states and 73 seconds for 272 new food businesses in three cities, a search that read 4,011 registry records to find them, and 134 seconds for 1,000 bakeries in two states. The email lookups, one per company, set most of the time, and the email source sometimes asks callers to slow down, when the actor waits as asked; turn `includeEmail` off for the fastest runs.

### Integrations

- **Google Sheets**: send each run's companies to a sheet with Apify's Google Sheets integration; one row per company fits a sheet as is.
- **Make, Zapier and n8n**: start a run and read its dataset with the Apify apps and nodes, for example "new dental clinics in our cities every month into the CRM".
- **Clay and other enrichment tools**: call the actor with one CNPJ per record through the API; a single lookup returns in a few seconds.
- **Webhooks**: have Apify call your URL when a run succeeds, then fetch the dataset.
- **MCP clients**: Claude, ChatGPT, Cursor and VS Code can run it as a tool through the connector URL in the FAQ.

If this actor saved you time, a short rating on the Store helps other buyers find it.

### More from The Mine Works

**Company and business data**

- [Company Domain Finder](https://apify.com/themineworks/company-domain-finder?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [GST Taxpayer Lookup](https://apify.com/themineworks/gst-taxpayer-lookup?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Company KYB Resolver](https://apify.com/themineworks/company-identity-resolver?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [SEC EDGAR Filings Scraper](https://apify.com/themineworks/sec-edgar-filings?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [EU VAT Checker (VIES)](https://apify.com/themineworks/eu-vat-vies-validator?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Tech Stack Detector](https://apify.com/themineworks/tech-stack-detector?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Bundesanzeiger Scraper](https://apify.com/themineworks/germany-bundesanzeiger-monitor?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Domain to LinkedIn URL Resolver](https://apify.com/themineworks/domain-to-linkedin-resolver?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [World Bank Trade Scraper](https://apify.com/themineworks/global-trade-data?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [US Import Records](https://apify.com/themineworks/us-import-supplier-intelligence?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Y Combinator Scraper](https://apify.com/themineworks/y-combinator-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Norway Company Register](https://apify.com/themineworks/norway-brreg-entity-search?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Social media and video**

- [Threads Scraper](https://apify.com/themineworks/threads-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Reddit Scraper](https://apify.com/themineworks/reddit-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Threads Search Scraper](https://apify.com/themineworks/threads-search-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Instagram Profile Scraper](https://apify.com/themineworks/instagram-profile-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Leads and business directories**

- [B2B Leads Finder](https://apify.com/themineworks/b2b-leads-finder?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Skip Trace Lookup](https://apify.com/themineworks/skip-trace-lookup?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Google Maps Email Scraper](https://apify.com/themineworks/maps-leads?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [2GIS Places Scraper](https://apify.com/themineworks/2gis-places-search?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Marketing, SEO and reviews**

- [Facebook Ad Library Scraper](https://apify.com/themineworks/meta-ad-library-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Google Ads Transparency Scraper](https://apify.com/themineworks/google-ads-transparency?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Similarweb Scraper](https://apify.com/themineworks/similarweb-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Google News Scraper](https://apify.com/themineworks/google-news?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**LinkedIn**

- [LinkedIn Company Scraper](https://apify.com/themineworks/linkedin-company-details?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [LinkedIn Post Scraper](https://apify.com/themineworks/linkedin-post-search?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [LinkedIn Employees Scraper](https://apify.com/themineworks/linkedin-employees?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [LinkedIn Profile Scraper](https://apify.com/themineworks/linkedin-profile-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Real estate**

- [Zillow Rentals Scraper](https://apify.com/themineworks/zillow-rental-listings?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Zillow Sold Comps Scraper](https://apify.com/themineworks/zillow-recently-sold?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [India Real Estate MCP](https://apify.com/themineworks/india-real-estate-mcp?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Housing.com Scraper](https://apify.com/themineworks/housing-com-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Science, health and government data**

- [Academic Research MCP](https://apify.com/themineworks/academic-research-mcp?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [CourtListener Scraper](https://apify.com/themineworks/courtlistener-court-records?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Socrata Open Data Scraper](https://apify.com/themineworks/socrata-open-data?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [OpenAlex Scraper](https://apify.com/themineworks/openalex-scholarly-works?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Jobs and hiring**

- [Foundit Monster India Jobs](https://apify.com/themineworks/foundit-jobs-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Hirist Jobs Scraper](https://apify.com/themineworks/hirist-jobs-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [India Jobs MCP](https://apify.com/themineworks/india-jobs-mcp?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Naukri Jobs Scraper](https://apify.com/themineworks/naukri-jobs?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**E-commerce and marketplaces**

- [Ozon.ru Scraper](https://apify.com/themineworks/ozon-product-search?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [⭐ Amazon Reviews Scraper](https://apify.com/themineworks/amazon-reviews?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Amazon Product Scraper](https://apify.com/themineworks/amazon-products?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Etsy Listings Scraper](https://apify.com/themineworks/etsy-search-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Food and local services**

- [NoBroker Scraper](https://apify.com/themineworks/nobroker-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Swiggy Restaurant Scraper](https://apify.com/themineworks/swiggy-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Zomato Scraper](https://apify.com/themineworks/zomato-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**Developer and AI tools**

- [Website to Markdown Crawler](https://apify.com/themineworks/rag-crawler?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [GitHub Skill Finder](https://apify.com/themineworks/github-skill-discovery?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [GitHub Repo Scraper](https://apify.com/themineworks/github-repo-intelligence?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [GitHub Trending Scraper](https://apify.com/themineworks/github-trending-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

**More tools**

- [G2 Reviews Scraper](https://apify.com/themineworks/g2-reviews-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Naver Blog Scraper](https://apify.com/themineworks/naver-blog-posts-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [WeChat Article Scraper 微信公众号文章](https://apify.com/themineworks/wechat-article-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)
- [Taobao Products Scraper 淘宝 天猫](https://apify.com/themineworks/taobao-products-scraper?fpr=ymnoit\&utm_source=apify-readme\&utm_medium=referral)

### Support

Found a CNPJ that returns wrong data, or an activity word that finds the wrong CNAE? Open an issue in the Issues tab with the input and the run ID, and we will look at it. For a field you need or a new source, email dmineworks@gmail.com.

*Look up any Brazilian CNPJ or find companies by activity, state and city, and get every company back as one row with status, address, phone, email and partners, no login.*

# Actor input Schema

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

CNPJ numbers, one per line, with or without dots, slash and dash. Example: 00.000.000/0001-91. One row per CNPJ, whatever its status. Up to 10,000 per run.

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

7 digit CNAE subclasses, one per line, with or without the mask. Example: 6201501 (custom software) or 5611-2/01 (restaurants).

## `activityKeywords` (type: `array`):

Words matched against the official CNAE descriptions, which are in Portuguese. Every word on a line must appear. Example: "software", "restaurante", "contabilidade", "clinica odontologica". The codes found are listed in the summary row.

## `cnaeMatch` (type: `string`):

primary: the company's main activity only (tighter lead lists). any: the main or any secondary activity.

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

Two letter state codes or names, one per line. Example: SP, RJ, Minas Gerais. Empty with no city means the whole country.

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

City names with the state, or 7 digit IBGE codes, one per line. Example: Campinas, SP or 3509502. Accents are optional.

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

4 digit natureza juridica codes, one per line. Example: 2062 (Sociedade Empresaria Limitada), 2135 (Empresario Individual), 2305 (EIRELI).

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

Keep only companies with these statuses in search results. Default: active. Leave empty for every status. Not applied to CNPJ lookups.

## `companySizes` (type: `array`):

Keep only these sizes in search results. Empty means any size.

## `excludeMei` (type: `boolean`):

On: companies registered as MEI are skipped in search results. Useful for B2B lists, since most MEIs are one person businesses.

## `headOfficeOnly` (type: `boolean`):

On: branches (filiais) are skipped in search results, one row per company.

## `openedFrom` (type: `string`):

Keep companies whose activity start date is on or after this date, YYYY-MM-DD. Example: 2026-01-01 for companies opened this year.

## `openedTo` (type: `string`):

Keep companies whose activity start date is on or before this date, YYYY-MM-DD.

## `minShareCapital` (type: `integer`):

Keep companies with at least this declared share capital. Example: 100000.

## `requirePhone` (type: `boolean`):

On: search results without a registered phone are skipped and not charged.

## `requireEmail` (type: `boolean`):

On: search results without a registered email are skipped and not charged. Needs Include email on.

## `includeEmail` (type: `boolean`):

On: the email registered with the Receita Federal is added to each row from a second public source. Off is faster. Same price either way.

## `maxItems` (type: `integer`):

The most companies the search returns, 1 to 20,000. CNPJ lookups are not counted here. Example: 500.

## Actor input object example

```json
{
  "cnaes": [
    "6201501"
  ],
  "cnaeMatch": "primary",
  "states": [
    "SP"
  ],
  "statuses": [
    "active"
  ],
  "excludeMei": false,
  "headOfficeOnly": false,
  "requirePhone": false,
  "requireEmail": false,
  "includeEmail": true,
  "maxItems": 20
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "cnaes": [
        "6201501"
    ],
    "states": [
        "SP"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/brazil-cnpj-scraper").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 = {
    "cnaes": ["6201501"],
    "states": ["SP"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/brazil-cnpj-scraper").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 '{
  "cnaes": [
    "6201501"
  ],
  "states": [
    "SP"
  ],
  "maxItems": 20
}' |
apify call themineworks/brazil-cnpj-scraper --silent --output-dataset

```

## MCP server setup

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

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/zL2aYWqxLzdoGubAh/builds/2v2pIpaQh2ilgQVc9/openapi.json
