# Lista de empresas por CNAE em qualquer cidade ou estado

**Use case:** 

Escolha um CNAE (atividade econômica) e uma cidade ou estado e receba a lista de empresas: CNPJ, razão social, situação, endereço, telefones e porte. Exemplo: restaurantes (5611-2/01) em São Paulo. Combine vários CNAEs, inclua atividades secundárias, filtre por natureza jurídica, só ativas, só matriz ou só com telefone.

## Input

```json
{
  "cnpjs": [],
  "cities": [
    "São Paulo/SP"
  ],
  "cnaes": [
    "5611-2/01"
  ],
  "includeSecondaryCnaes": false,
  "legalNatures": [
    "2062"
  ],
  "activeOnly": true,
  "headOfficeOnly": false,
  "withPhoneOnly": true,
  "applyFiltersToLookups": false,
  "includeNotFound": false,
  "includePartners": false,
  "includeTaxRegime": false,
  "maxItems": 100
}
```

## Output

```json
{
  "cnpjFormatted": {
    "label": "CNPJ",
    "format": "string"
  },
  "companyName": {
    "label": "Company name",
    "format": "string"
  },
  "tradeName": {
    "label": "Trade name",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "mainCnaeFormatted": {
    "label": "Main cnae formatted",
    "format": "string"
  },
  "mainCnaeDescription": {
    "label": "Main cnae description",
    "format": "string"
  },
  "city": {
    "label": "City",
    "format": "string"
  },
  "state": {
    "label": "State",
    "format": "string"
  },
  "phones": {
    "label": "Phones",
    "format": "array"
  },
  "companySize": {
    "label": "Company size",
    "format": "string"
  },
  "openingDate": {
    "label": "Opening date",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The CNPJ Lookup - Consulta CNPJ em Lote & Brazil Company Leads Actor is ready to run with the inputs already set for "Lista de empresas por CNAE em qualquer cidade ou estado". [Sign up or log in](https://console.apify.com/create-task-from-example/WqwYiWvPndfDpQ2ee) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Lista de empresas por CNAE em qualquer cidade ou estado" task

The CNPJ Lookup - Consulta CNPJ em Lote & Brazil Company Leads Actor will start running based on the input automatically. You can also change all the input fields, like CNPJs to look up, cities, and more, to match your specific use case.

### 3. Receive the "Lista de empresas por CNAE em qualquer cidade ou estado" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as CNPJ, company name, trade name, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Lista de empresas por CNAE em qualquer cidade ou estado" task via API](https://apify.com/kalilfagundes.w/cnpj-enrichment.md).

## About this Actor

This example demonstrates how to use [CNPJ Lookup - Consulta CNPJ em Lote & Brazil Company Leads](https://apify.com/kalilfagundes.w/cnpj-enrichment.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/kalilfagundes.w/cnpj-enrichment.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/kalilfagundes.w/cnpj-enrichment.md

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`).
