# Newly Opened Brazilian Companies — by CNAE & State (`gangary/new-brazilian-companies`) Actor

Find Brazilian companies opened recently, filtered by CNAE activity, state, city and size — straight from the official Receita Federal registry index. The hottest B2B lead: a brand-new company buying its first accountant, bank, software and marketing. Empresas abertas recentemente por CNAE e estado.

- **URL**: https://apify.com/gangary/new-brazilian-companies.md
- **Developed by:** [Gangary](https://apify.com/gangary) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Newly Opened Brazilian Companies — by CNAE & State

Find Brazilian companies **opened recently**, filtered by economic activity (CNAE), state, city and size — straight from the official Receita Federal registry index. A brand-new company is the hottest B2B lead there is: it's about to buy its first accountant, bank account, software, insurance and marketing. No scraping, no login, no API key.

![Cover](https://empresas-por-cnae.vercel.app/covers/new-brazilian-companies.png)

Em português: *empresas abertas recentemente por CNAE e estado, empresas novas por segmento, lista de empresas recém-abertas da Receita Federal*.

### Input example

Micro companies in accounting (CNAE 69) opened in São Paulo in the last 60 days:

```json
{
  "cnae": "69",
  "ufs": ["SP"],
  "dias": 60,
  "porte": "micro"
}
````

- `cnae` accepts a full code (`6920-6/01`), digits only (`6920601`) or a **prefix** (`69` = all accounting/legal, `86` = all healthcare).
- `dias` = opened in the last N days (relative window). `desde` (`YYYY-MM-DD`) = opened on/after an explicit date and **takes priority** over `dias`.
- `municipio`, `porte`, `offset` + `limit` work exactly like the [CNPJ Discovery](https://apify.com/gangary/cnpj-discovery).

### Output example

```json
{
  "cnpj": "12345678000195",
  "cnpj_formatado": "12.345.678/0001-95",
  "razao_social": "NOVA CONTABILIDADE EXEMPLO LTDA",
  "nome_fantasia": "Exemplo Contabil",
  "cnae_principal": "6920601",
  "cnae_formatado": "6920-6/01",
  "municipio": "SAO PAULO",
  "uf": "SP",
  "porte": "MICRO EMPRESA",
  "data_abertura": "2026-06-30",
  "tem_email": true,
  "tem_telefone": true
}
```

Every row is guaranteed to have `data_abertura` on or after your cutoff — that's the whole point.

### Output fields

| Field | Description |
|---|---|
| `data_abertura` | Opening date (YYYY-MM-DD) — always ≥ your cutoff. |
| `cnpj` / `cnpj_formatado` | Tax ID, digits-only and formatted. |
| `razao_social` / `nome_fantasia` | Legal and trade name from the registry. |
| `cnae_principal` | Primary economic activity code. |
| `municipio` / `uf` / `porte` | City, state, declared size. |
| `tem_email` / `tem_telefone` | Whether the registry has contact on file — pair with [CNPJ Lookup](https://apify.com/gangary/cnpj-lookup) to pull it. |

### Use cases

- **Accountants & bookkeepers** — every new MEI/micro company in your city needs a contador this month
- **Banks, fintechs, insurers** — reach a company while it's choosing its first providers
- **Agencies & SaaS** — a new business is the most open it will ever be to a new tool or a first campaign
- **Franchise & B2B sales** — territory lists of fresh companies by activity and size

### Pricing (Pay per event)

| Event | When | Price |
|---|---|---|
| `actor-start` | once per run | $0.005 |
| `company-found` | per company returned | $0.003 |

A list of 300 fresh companies costs $0.005 + 300 × $0.003 = **$0.905**. Runs that find nothing only pay the start fee. New Apify accounts get free monthly credit.

### Where the data comes from

The official **CNPJ open dataset published by Receita Federal**, rebuilt into a fast index **every month**. Only **active** companies are included.

### Is this compliant?

Yes — the CNPJ registry is **public open data** published by Receita Federal for public consultation. No scraping, no logins, no private data.

### Limitations

- The index is a **monthly snapshot**. "Recently opened" is bounded by the last rebuild — a company opened this week appears after the next monthly update, not the day it registers. If you ask for a cutoff newer than the current base, the run warns you.
- A **CNAE is required** (the index is partitioned by activity + state). To list new companies across every activity, run a couple of broad prefixes (`0`–`9`) — a v2 will make CNAE optional.
- Filters use the **primary** CNAE only.

### From the same maker

- **[Brazilian Companies Finder (CNPJ Discovery)](https://apify.com/gangary/cnpj-discovery)** — same index, no date filter: every active company by CNAE + state.
- **[CNPJ Lookup — Brazilian Company Registry Data](https://apify.com/gangary/cnpj-lookup)** — full official record per CNPJ: address, partners, capital, phone and email.
- **[Lead Enricher & ICP Scorer](https://apify.com/gangary/lead-enricher-icp)** — verify, dedupe and score any lead list 0–100 against your ideal customer profile.
- **[CNPJ Validator & Formatter (free)](https://apify.com/gangary/cnpj-validator)** — clean a CNPJ list for free before you spend on lookups.

**Full pipeline:** find fresh companies here → Lookup pulls the contacts → Enricher scores who's worth calling first.

# Actor input Schema

## `cnae` (type: `string`):

Codigo completo (8630-5/04), so digitos (8630504) ou prefixo (8630 = todas as clinicas, 86 = saude inteira).

## `ufs` (type: `array`):

Siglas de 2 letras (ex: SP, MG). Pelo menos 1 obrigatoria.

## `dias` (type: `integer`):

Janela relativa: empresas abertas nos ultimos N dias. Ignorado se 'desde' for informado. Padrao 90.

## `desde` (type: `string`):

Corte explicito: so empresas abertas nesta data ou depois. Tem prioridade sobre 'dias'.

## `municipio` (type: `string`):

Nome do municipio (com ou sem acento). Filtra dentro das UFs escolhidas.

## `porte` (type: `string`):

Restringe pelo porte: micro, pequena ou demais.

## `limit` (type: `integer`):

Maximo de empresas retornadas nessa execucao.

## `offset` (type: `integer`):

Pula os N primeiros resultados.

## Actor input object example

```json
{
  "cnae": "86",
  "ufs": [
    "SP"
  ],
  "dias": 90,
  "limit": 100,
  "offset": 0
}
```

# 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": "86",
    "ufs": [
        "SP"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gangary/new-brazilian-companies").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": "86",
    "ufs": ["SP"],
}

# Run the Actor and wait for it to finish
run = client.actor("gangary/new-brazilian-companies").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 '{
  "cnae": "86",
  "ufs": [
    "SP"
  ]
}' |
apify call gangary/new-brazilian-companies --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gangary/new-brazilian-companies",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Newly Opened Brazilian Companies — by CNAE & State",
        "description": "Find Brazilian companies opened recently, filtered by CNAE activity, state, city and size — straight from the official Receita Federal registry index. The hottest B2B lead: a brand-new company buying its first accountant, bank, software and marketing. Empresas abertas recentemente por CNAE e estado.",
        "version": "0.1",
        "x-build-id": "yeUik4Csw8Ytw7JbT"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gangary~new-brazilian-companies/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gangary-new-brazilian-companies",
                "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/gangary~new-brazilian-companies/runs": {
            "post": {
                "operationId": "runs-sync-gangary-new-brazilian-companies",
                "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/gangary~new-brazilian-companies/run-sync": {
            "post": {
                "operationId": "run-sync-gangary-new-brazilian-companies",
                "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": [
                    "ufs"
                ],
                "properties": {
                    "cnae": {
                        "title": "CNAE (economic activity)",
                        "type": "string",
                        "description": "Codigo completo (8630-5/04), so digitos (8630504) ou prefixo (8630 = todas as clinicas, 86 = saude inteira)."
                    },
                    "ufs": {
                        "title": "States (UF)",
                        "type": "array",
                        "description": "Siglas de 2 letras (ex: SP, MG). Pelo menos 1 obrigatoria.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dias": {
                        "title": "Opened in the last N days",
                        "minimum": 1,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "Janela relativa: empresas abertas nos ultimos N dias. Ignorado se 'desde' for informado. Padrao 90.",
                        "default": 90
                    },
                    "desde": {
                        "title": "Opened since (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Corte explicito: so empresas abertas nesta data ou depois. Tem prioridade sobre 'dias'."
                    },
                    "municipio": {
                        "title": "City (optional)",
                        "type": "string",
                        "description": "Nome do municipio (com ou sem acento). Filtra dentro das UFs escolhidas."
                    },
                    "porte": {
                        "title": "Company size (optional)",
                        "enum": [
                            "micro",
                            "pequena",
                            "demais"
                        ],
                        "type": "string",
                        "description": "Restringe pelo porte: micro, pequena ou demais."
                    },
                    "limit": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximo de empresas retornadas nessa execucao.",
                        "default": 100
                    },
                    "offset": {
                        "title": "Offset (pagination)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Pula os N primeiros resultados.",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
