# CNPJ Lead Scraper - Search Companies by CNAE (segment) Brazil (`brasildados/cnpj-lead-scraper-search`) Actor

Search 55M+ Brazilian companies by segment (CNAE), state and size. Name, address, shareholders and contacts. Pay only per result returned. | Busque 55M+ empresas por setor (CNAE), estado e porte. Pay per result.

- **URL**: https://apify.com/brasildados/cnpj-lead-scraper-search.md
- **Developed by:** [BrasilDados.org](https://apify.com/brasildados) (community)
- **Categories:** Lead generation, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

#### 🔍 What is CNPJ Lead Scraper?

**CNPJ Lead Scraper** finds Brazilian companies by **CNAE industry code** on the official **Receita Federal CNPJ registry**. Filter by state (UF), company size (ME, EPP) and registration status. Export **JSON, CSV or Excel** with razão social, CNPJ, address, phone, email and shareholders (QSA).

> **Discover companies by sector, not by CNPJ list.** Search **55+ million establishments** by primary CNAE (7-digit IBGE subclass). Default: **active companies only**. Each result is a full establishment record ready for CRM or outbound.

**Need to find companies by CNAE?** Use this actor. **Already have CNPJs?** Use [CNPJ Enrichment](https://apify.com/brasildados/brazil-enrich-data-lead-by-cnpj?fpr=t5lwzq) instead.

##### What data can CNPJ Lead Scraper extract?

| | |
|---|---|
| 🏷️ **Identity** | `razaoSocial`, `nomeFantasia`, `cnpj`, `cnpjFormatado`, `matriz` |
| ✅ **Status** | `situacaoCadastralDescricao`, dates, company age |
| 📊 **Activity** | `cnaePrincipal`, `cnaesSecundarios` |
| 📍 **Address** | Full address fields + `enderecoCompleto` |
| ☎️ **Contact** | `telefone1`, `telefone2`, `email` (when in registry) |
| 👥 **Corporate** | `capitalSocial`, `porteDescricao`, `naturezaJuridicaDescricao` |
| 🤝 **QSA** | `socios[]` with masked documents |
| 🕐 **Metadata** | `consultadoEm`, derived fields |

Same output schema as the Enrichment actor. Use `matriz: true` downstream to keep headquarters only.

##### What can this Actor do?

- 🎯 **CNAE search:** filter by primary activity code (7-digit IBGE subclass)
- 🗺️ **Regional targeting:** optional UF filter (SP, RJ, MG, etc.)
- 📏 **Size filter:** ME (`01`), EPP (`03`), Demais (`05`) or all
- 📤 **Bulk export:** up to 5,000 companies per run to JSON, CSV or Excel
- ⚡ **Standby REST API:** `POST /search` for real-time integration
- 📋 **CNAE helper:** browse 1,332 codes at [brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/)

**Apify platform bonus:** schedule recurring lead lists, monitor runs, webhooks, API access and MCP integration.

---

### Why search Brazilian companies by CNAE?

- **B2B lead generation:** build prospect lists by industry and region
- **Market mapping:** estimate TAM and competitor density in a niche
- **CRM import:** feed HubSpot, Salesforce or Pipedrive with verified CNPJ data
- **Partner discovery:** find ME/EPP companies in a specific vertical
- **Compliance-ready prospecting:** start from official registry data, then enrich with KYC

Official public data under **Lei 12.527/2011**. Registry updated monthly, **55+ million establishments**.

---

### How do I search companies by CNAE in Brazil?

1. Pick a **7-digit CNAE subclass** from the [complete CNAE list](https://brasildados.org/lista-cnaes/) (search + copy button).
2. Open the actor on [Apify Console](https://console.apify.com/) > **Input** tab.
3. Paste codes in **`cnaes`** (string list). Optional: set **UF**, **porte**, **maxResults**.
4. Click **Start**, then export Dataset as **XLSX**, CSV or JSON.

**Example input:**

```json
{
  "cnaes": ["6201501", "6204000"],
  "uf": "SP",
  "porte": ["01", "03"],
  "situacaoCadastral": "02",
  "maxResults": 100
}
````

##### Popular searches

| Goal | CNAE | Extra filters |
|---|---|---|
| 💻 Software in SP | `6201501` | `uf: "SP"` |
| 🖥️ IT consulting | `6204000` | - |
| 🏥 Hospitals | `8610101` | - |
| 🛒 Supermarkets | `4711302` | - |
| 🏪 ME + EPP only | any | `porte: ["01","03"]` |

More codes: [brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/) (1,332 subclasses).

***

#### 📐 CNAE format

Only **7-digit IBGE subclasses** work. The actor normalizes automatically:

| You send | Becomes |
|---|---|
| `6201501` | `6201501` |
| `6201-5/01` | `6201501` |
| `111301` | `0111301` |

**Not accepted:** section letters (`A`, `J`), empty values, more than 7 digits.

> **Tip:** filter by **primary CNAE** (`cnaePrincipal` in output), not secondary activities. In Console, paste one code per line in the string list.

***

#### ⬇️ Input

Click the **Input** tab for the full schema with defaults and prefill.

| Field | Required | Default | Description |
|---|---|---|---|
| `cnaes` | ✅ Yes | `["6201501"]` | 7-digit CNAE subclasses (string list) |
| `uf` | No | all states | SP, RJ, MG, etc. |
| `porte` | No | all | `01` ME, `03` EPP, `05` Demais, `00` N/I |
| `situacaoCadastral` | No | `"02"` | `02` Active, `08` Closed, `all` = all |
| `maxResults` | No | `100` | 1-5,000 (charged per result) |

***

#### ⬆️ Output

Download from **Dataset** tab in JSON, CSV, Excel or XML. One record per establishment.

> **Abbreviated sample only.** Same schema as the Enrichment actor: **39 top-level fields** and **50+ fields total** (including nested QSA). The JSON below is shortened; `"..."` means more data is returned.

**Also returned (not shown in sample):** `naturezaJuridicaDescricao`, `capitalSocial`, `porteDescricao`, `dataInicioAtividade`, `cnaesSecundarios[]`, full address (`logradouro`, `cep`, `enderecoCompleto`, ...), `telefone2`, derived metrics (`idadeEmpresaAnos`, `totalSocios`, ...), and full `socios[]` (`tipo`, `qualificacao`, `dataEntrada`, `faixaEtariaDescricao`, ...).

```json
{
  "cnpj": "33000167000101",
  "cnpjFormatado": "33.000.167/0001-01",
  "matriz": true,
  "razaoSocial": "PETROLEO BRASILEIRO S A PETROBRAS",
  "situacaoCadastralDescricao": "Ativa",
  "cnaePrincipal": { "codigo": "6201-5/01", "descricao": "..." },
  "uf": "SP",
  "municipioNome": "Sao Paulo",
  "telefone1": "...",
  "email": "...",
  "socios": [{ "nome": "...", "documento": "***123456**" }],
  "consultadoEm": "2026-06-01T00:00:00.000Z"
}
```

**Complete field list:** **Dataset schema** tab on Apify Console (all fields, types and descriptions).

***

### How much does CNAE lead scraping cost?

**$0.01 per company returned** (event `lead-found`). Pay per result only, no platform usage fee on top.

| Results | Cost |
|---|---|
| 100 | $1.00 |
| 500 | $5.00 |
| 1,000 | $10.00 |
| 5,000 | $50.00 |

Free Apify plan users can start with `maxResults: 10` to test before scaling.

***

#### 🔌 API integration

**Batch run:**

```bash
curl -X POST "https://api.apify.com/v2/acts/brasildados~cnpj-lead-scraper-search/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cnaes":["6201501","6204000"],"uf":"SP","maxResults":100}'
```

**Standby (`POST /search`):**

```bash
curl -X POST "https://brasildados--cnpj-lead-scraper-search.apify.actor/search" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --compressed \
  -d '{"cnaes":["6201501"],"uf":"SP","maxResults":50}'
```

***

### Related Actors

| Actor | When to use |
|---|---|
| [CNPJ Enrichment](https://apify.com/brasildados/brazil-enrich-data-lead-by-cnpj?fpr=t5lwzq) | You already have CNPJs to enrich |
| [CNPJ KYC & PEP Checker](https://apify.com/brasildados/cnpj-kyc-compliance-pep-checker?fpr=t5lwzq) | PEP, sanctions, electoral donations |
| [CNPJ Lawsuits Check](https://apify.com/brasildados/cnpj-lawsuits-check?fpr=t5lwzq) | Litigation history |
| [Government Contracts](https://apify.com/brasildados/government-contracts-check?fpr=t5lwzq) | Federal procurement history |

**Suggested pipeline:** **Lead Scraper (this)** → Enrichment → Lawsuits + KYC

***

### FAQ

#### Where do I find CNAE codes?

Use the [complete list at brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/) with search, section filter and one-click copy.

#### Can I export to Excel?

Yes. Dataset tab > Export > XLSX, CSV or JSON. One row per establishment.

#### Active companies only in São Paulo?

Set `"uf": "SP"` and keep `"situacaoCadastral": "02"` (default).

#### Does it return phone, email and QSA?

Yes when declared in the registry. Phone/email coverage varies (often 40-70%). QSA includes masked documents.

#### Headquarters vs branches?

Both can appear. Filter `matriz: true` downstream for HQ only.

#### Maximum results per run?

5,000. Split by UF or CNAE for larger coverage.

#### How recent is the data?

Monthly update. Typical 30-45 day lag for recent changes.

#### Is it legal to use Receita Federal CNPJ data?

Yes. Public registry under Lei 12.527/2011. Use personal data only with legitimate purpose and LGPD/GDPR compliance.

***

### 🇧🇷 Versão em português (Brasil)

#### 🔍 O que é o Lead Scraper por CNAE?

**Lead Scraper por CNAE** encontra empresas brasileiras por **código CNAE** na base oficial da **Receita Federal**. Filtre por UF, porte e situação cadastral. Exporte **JSON, CSV ou Excel** com razão social, CNPJ, endereço, telefone, e-mail e QSA.

> **Descubra empresas por setor, não por lista de CNPJs.** Busca em **55+ milhões de estabelecimentos** pelo CNAE principal (subclasse IBGE de 7 dígitos). Padrão: **somente ativas**.

**Precisa achar empresas por CNAE?** Use este actor. **Já tem CNPJs?** Use [Enriquecimento por CNPJ](https://apify.com/brasildados/brazil-enrich-data-lead-by-cnpj?fpr=t5lwzq).

##### Quais dados o lead scraper por CNAE retorna?

| | |
|---|---|
| 🏷️ **Identificação** | `razaoSocial`, `nomeFantasia`, `cnpj`, `cnpjFormatado`, `matriz` |
| ✅ **Situação** | `situacaoCadastralDescricao`, datas, idade |
| 📊 **Atividade** | `cnaePrincipal`, `cnaesSecundarios` |
| 📍 **Endereço** | Campos completos + `enderecoCompleto` |
| ☎️ **Contato** | `telefone1`, `telefone2`, `email` (quando no cadastro) |
| 👥 **Societário** | `capitalSocial`, `porteDescricao`, `naturezaJuridicaDescricao` |
| 🤝 **QSA** | `socios[]` com documentos mascarados |
| 🕐 **Metadados** | `consultadoEm`, campos derivados |

Mesmo schema do actor de Enriquecimento. Filtre `matriz: true` para manter só matrizes.

##### O que este Actor faz?

- 🎯 **Busca por CNAE:** filtro por atividade principal (subclasse IBGE 7 dígitos)
- 🗺️ **Segmentação regional:** filtro opcional por UF (SP, RJ, MG, etc.)
- 📏 **Filtro de porte:** ME (`01`), EPP (`03`), Demais (`05`) ou todos
- 📤 **Exportação em lote:** até 5.000 empresas por execução
- ⚡ **API REST Standby:** `POST /search` em tempo real
- 📋 **Lista CNAE:** 1.332 códigos em [brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/)

**Bônus Apify:** agende listas recorrentes, monitore execuções, webhooks, API e MCP.

***

### Por que buscar empresas brasileiras por CNAE?

- **Geração de leads B2B:** monte listas de prospecção por setor e região
- **Mapeamento de mercado:** estime TAM e densidade de concorrentes
- **Importação para CRM:** alimente HubSpot, Salesforce ou Pipedrive com CNPJs verificados
- **Descoberta de parceiros:** encontre ME/EPP em um vertical específico
- **Prospecção compliance-ready:** parta do cadastro oficial, depois enriqueça com KYC

Dados públicos oficiais sob **Lei 12.527/2011**. Cadastro atualizado mensalmente, **55+ milhões de estabelecimentos**.

***

### Como buscar empresas por CNAE no Brasil?

1. Escolha uma **subclasse CNAE de 7 dígitos** na [lista completa](https://brasildados.org/lista-cnaes/).
2. Abra o actor no [Console Apify](https://console.apify.com/) > aba **Input**.
3. Cole os códigos em **`cnaes`**. Opcional: **UF**, **porte**, **maxResults**.
4. Clique em **Start** e exporte o Dataset em **XLSX**, CSV ou JSON.

##### Buscas comuns

| Objetivo | CNAE | Filtro extra |
|---|---|---|
| 💻 Software em SP | `6201501` | `uf: "SP"` |
| 🖥️ Consultoria TI | `6204000` | - |
| 🏥 Hospitais | `8610101` | - |
| 🛒 Supermercados | `4711302` | - |
| 🏪 Só ME e EPP | qualquer | `porte: ["01","03"]` |

Mais códigos: [brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/) (1.332 subclasses).

***

#### 📐 Formato CNAE

Somente **subclasses IBGE de 7 dígitos**. O actor normaliza automaticamente:

| Você envia | Vira |
|---|---|
| `6201501` | `6201501` |
| `6201-5/01` | `6201501` |
| `111301` | `0111301` |

**Não aceito:** letras de seção (`A`, `J`), valores vazios, mais de 7 dígitos.

> **Dica:** filtre pelo **CNAE principal** (`cnaePrincipal` na saída), não secundários.

***

#### ⬇️ Entrada

Clique na aba **Input** para o schema completo.

| Campo | Obrigatório | Padrão | Descrição |
|---|---|---|---|
| `cnaes` | ✅ Sim | `["6201501"]` | Subclasses CNAE de 7 dígitos (lista) |
| `uf` | Não | todos | SP, RJ, MG, etc. |
| `porte` | Não | todos | `01` ME, `03` EPP, `05` Demais, `00` N/I |
| `situacaoCadastral` | Não | `"02"` | `02` Ativa, `08` Baixada, `all` = todas |
| `maxResults` | Não | `100` | 1-5.000 (cobrado por resultado) |

***

#### ⬆️ Saída

Baixe na aba **Dataset**. Um registro por estabelecimento.

> **Amostra resumida.** Mesmo schema do Enriquecimento: **39 campos de topo** e **50+ no total**. Veja **Dataset schema** para a lista completa.

***

### Quanto custa buscar leads por CNAE?

**$0,01 por empresa retornada** (evento `lead-found`). Pague só pelo resultado.

| Resultados | Custo |
|---|---|
| 100 | $1,00 |
| 500 | $5,00 |
| 1.000 | $10,00 |
| 5.000 | $50,00 |

***

#### 🔌 Integração via API

Mesmos endpoints da seção em inglês acima. Substitua o token Apify.

***

### Actors relacionados

| Actor | Quando usar |
|---|---|
| [Enriquecimento CNPJ](https://apify.com/brasildados/brazil-enrich-data-lead-by-cnpj?fpr=t5lwzq) | Você já tem CNPJs para enriquecer |
| [KYC & PEP Checker](https://apify.com/brasildados/cnpj-kyc-compliance-pep-checker?fpr=t5lwzq) | PEP, sanções, doações eleitorais |
| [Consulta Processos](https://apify.com/brasildados/cnpj-lawsuits-check?fpr=t5lwzq) | Histórico processual |
| [Consulta Contratos](https://apify.com/brasildados/government-contracts-check?fpr=t5lwzq) | Histórico de compras federais |

**Pipeline sugerido:** **Lead Scraper (este)** → Enriquecimento → Processos + KYC

***

### Perguntas frequentes

#### Onde encontro códigos CNAE?

Use a [lista completa em brasildados.org/lista-cnaes](https://brasildados.org/lista-cnaes/) com busca, filtro por seção e cópia com um clique.

#### Exporto para Excel?

Sim. Dataset > Export > XLSX, CSV ou JSON. Uma linha por estabelecimento.

#### Só empresas ativas em São Paulo?

Defina `"uf": "SP"` e mantenha `"situacaoCadastral": "02"` (padrão).

#### Retorna telefone, e-mail e QSA?

Sim quando declarados. Cobertura de telefone/e-mail varia (40-70%). QSA com documentos mascarados.

#### Matriz vs filial?

Ambas podem aparecer. Filtre `matriz: true` downstream para só matrizes.

#### Máximo por execução?

5.000. Divida por UF ou CNAE para mais cobertura.

#### Quão recentes são os dados?

Atualização mensal. Defasagem típica de 30-45 dias.

#### É legal usar dados da Receita Federal?

Sim. Cadastro público sob Lei 12.527/2011. Use dados pessoais com finalidade legítima e LGPD/GDPR.

#### O JSON de exemplo mostra tudo?

Não. É amostra resumida (**39 campos de topo**, **50+ no total**). Lista completa na aba **Dataset schema**.

# Actor input Schema

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

One or more IBGE CNAE subclasses (7 digits). Accepts plain (`6201501`), IBGE mask (`6201-5/01`) or leading zeros (`0111301`). **Full list (search + copy):** https://brasildados.org/lista-cnaes/ | Subclasses CNAE de 7 dígitos. **Lista completa:** https://brasildados.org/lista-cnaes/

## `uf` (type: `string`):

Brazilian state to filter results. Leave empty for all states. | UF para filtrar. Deixe vazio para todos os estados.

## `porte` (type: `array`):

Filter by company size. Leave empty for all sizes. | Filtro por porte. Deixe vazio para todos os portes.

## `situacaoCadastral` (type: `string`):

Filter by registration status. Default: Active only. | Filtro por situação. Padrão: somente ativas.

## `maxResults` (type: `integer`):

Maximum companies to return (1-5,000). Charged at $0.01 per company returned. | Máximo de empresas (1-5.000). Cobrado $0,01 por empresa retornada.

## Actor input object example

```json
{
  "cnaes": [
    "6201501",
    "6204000"
  ],
  "uf": "SP",
  "situacaoCadastral": "02",
  "maxResults": 100
}
```

# Actor output Schema

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

Dataset with one row per establishment. Export to CSV, Excel or JSON for CRM import.

# 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",
        "6204000"
    ],
    "uf": "SP",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/cnpj-lead-scraper-search").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",
        "6204000",
    ],
    "uf": "SP",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("brasildados/cnpj-lead-scraper-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "6204000"
  ],
  "uf": "SP",
  "maxResults": 100
}' |
apify call brasildados/cnpj-lead-scraper-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=brasildados/cnpj-lead-scraper-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CNPJ Lead Scraper - Search Companies by CNAE (segment) Brazil",
        "description": "Search 55M+ Brazilian companies by segment (CNAE), state and size. Name, address, shareholders and contacts. Pay only per result returned. | Busque 55M+ empresas por setor (CNAE), estado e porte. Pay per result.",
        "version": "1.0",
        "x-build-id": "V4y2c1cIzesg5ecdP"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/brasildados~cnpj-lead-scraper-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-brasildados-cnpj-lead-scraper-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/brasildados~cnpj-lead-scraper-search/runs": {
            "post": {
                "operationId": "runs-sync-brasildados-cnpj-lead-scraper-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/brasildados~cnpj-lead-scraper-search/run-sync": {
            "post": {
                "operationId": "run-sync-brasildados-cnpj-lead-scraper-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "cnaes"
                ],
                "properties": {
                    "cnaes": {
                        "title": "CNAE subclass codes (7 digits) / Subclasses CNAE (7 dígitos)",
                        "type": "array",
                        "description": "One or more IBGE CNAE subclasses (7 digits). Accepts plain (`6201501`), IBGE mask (`6201-5/01`) or leading zeros (`0111301`). **Full list (search + copy):** https://brasildados.org/lista-cnaes/ | Subclasses CNAE de 7 dígitos. **Lista completa:** https://brasildados.org/lista-cnaes/",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "6201501"
                        ]
                    },
                    "uf": {
                        "title": "State filter / Filtro por UF",
                        "enum": [
                            "AC",
                            "AL",
                            "AP",
                            "AM",
                            "BA",
                            "CE",
                            "DF",
                            "ES",
                            "GO",
                            "MA",
                            "MT",
                            "MS",
                            "MG",
                            "PA",
                            "PB",
                            "PR",
                            "PE",
                            "PI",
                            "RJ",
                            "RN",
                            "RS",
                            "RO",
                            "RR",
                            "SC",
                            "SP",
                            "SE",
                            "TO"
                        ],
                        "type": "string",
                        "description": "Brazilian state to filter results. Leave empty for all states. | UF para filtrar. Deixe vazio para todos os estados."
                    },
                    "porte": {
                        "title": "Company size / Porte da empresa",
                        "type": "array",
                        "description": "Filter by company size. Leave empty for all sizes. | Filtro por porte. Deixe vazio para todos os portes.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "01",
                                "03",
                                "05",
                                "00"
                            ],
                            "enumTitles": [
                                "Microempresa (ME)",
                                "Empresa de Pequeno Porte (EPP)",
                                "Demais (Médio/Grande)",
                                "Não informado"
                            ]
                        }
                    },
                    "situacaoCadastral": {
                        "title": "Registration status / Situação cadastral",
                        "enum": [
                            "02",
                            "01",
                            "03",
                            "04",
                            "08",
                            "all"
                        ],
                        "type": "string",
                        "description": "Filter by registration status. Default: Active only. | Filtro por situação. Padrão: somente ativas.",
                        "default": "02"
                    },
                    "maxResults": {
                        "title": "Max results / Máximo de resultados",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum companies to return (1-5,000). Charged at $0.01 per company returned. | Máximo de empresas (1-5.000). Cobrado $0,01 por empresa retornada.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
