# CNPJ & CEP Bulk Lookup Brazil — Consulta CNPJ e CEP em Lote (`brasil_utils/brazil-cnpj-cep-bulk-lookup`) Actor

Bulk CNPJ and CEP lookup for Brazil. Validates check digits (incl. new alphanumeric CNPJ) and returns Receita Federal open data: razão social, situação cadastral, CNAE, Simples/MEI, address. CEP to full address. Pay only for results found.

- **URL**: https://apify.com/brasil\_utils/brazil-cnpj-cep-bulk-lookup.md
- **Developed by:** [Eduardo Yuji Matheus](https://apify.com/brasil_utils) (community)
- **Categories:** Business, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 successful lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Brazil CNPJ & CEP Bulk Lookup — Consulta CNPJ e CEP em Lote

**Bulk CNPJ lookup and CEP lookup for Brazil in one run.** Paste a list or a spreadsheet column of CNPJs (company tax IDs) and CEPs (postal codes). You get one clean row per input: company registry data from Receita Federal open data (razão social, nome fantasia, situação cadastral, CNAE, porte, Simples Nacional/MEI, address) and full addresses for CEPs (street, neighborhood, city, UF, IBGE code, and coordinates when the source has them).

Every CNPJ and CEP is validated locally first (check digits, length, repeated digits), so typos are flagged for free instead of being sent to a data source. You pay only for lookups that return data.

> 🇧🇷 **Português:** consulta CNPJ em lote e consulta CEP em lote com dados abertos da Receita Federal. Veja a seção **Em português** no final desta página.

### What does it do?

- **CNPJ + CEP in one Actor**: mix both in the same run, or paste a mixed column (`bulkText`)
- **CNPJ validation**: check digits (dígitos verificadores), including the **new alphanumeric CNPJ** format (IN RFB 2.229/2024)
- **Fixes spreadsheet damage**: restores leading zeros lost in Excel (`191` → `00.000.000/0001-91`, `1001000` → `01001-000`)
- **Automatic fallbacks**: BrasilAPI → Minha Receita for CNPJ; BrasilAPI → ViaCEP → OpenCEP for CEP
- **Polite to the free public APIs**: at most 90 BrasilAPI requests per minute per run (extra lookups go to the fallback source), no retry loops on BrasilAPI rate limits, and exponential backoff on other 429/5xx errors, honoring `Retry-After`
- **One output row per input** with a `status` field, so results line up with your original spreadsheet
- **Privacy-friendly (LGPD)**: no partner (QSA/sócios) personal data; the CPF digits that the registry appends to MEI/individual-entrepreneur names are removed; contact details are opt-in
- **Pay only for successful lookups**: invalid, duplicate, not-found and failed inputs are free

### Use cases

- **Accounting and bookkeeping**: check that the CNPJs of clients and suppliers exist, are `ATIVA`, and whether they opted for Simples Nacional or MEI, before issuing or booking invoices
- **Supplier onboarding and KYB (know your business)**: verify registration status, opening date, legal nature, main CNAE and registered address of a new supplier or B2B customer
- **E-commerce address validation and checkout**: turn a CEP into street, neighborhood, city and UF to autofill checkout forms, validate shipping addresses and reduce failed deliveries
- **CRM and ERP data cleaning**: normalize and validate CNPJ/CEP columns before an import, and flag invalid or duplicate values
- **B2B segmentation**: group companies you already have by CNAE, size (porte), state or tax regime

### Input

| Field | Type | Description |
|---|---|---|
| `cnpjs` | array of strings | CNPJs in any format (`33.000.167/0001-01`, `33000167000101`, `191`) |
| `ceps` | array of strings | CEPs in any format (`01001-000`, `01001000`, `1001000`) |
| `bulkText` | string | Mixed list pasted from a spreadsheet (new lines, tabs, spaces, commas or semicolons). Rule: letters or 9-14 digits = CNPJ; 7-8 digits = CEP (`1001000` → `01001-000`); 1-6 digits = CNPJ that lost its leading zeros (`191` → `00.000.000/0001-91`, no CEP is that short) |
| `bulkTextType` | string (default `auto`) | How to read `bulkText`: `auto` (rule above), `cnpj` (every value is a CNPJ, zero-padded to 14 digits) or `cep` (every value is a CEP, zero-padded to 8). Use it for the rare CNPJ that lost 6+ leading zeros and would otherwise be read as a CEP |
| `includeContactInfo` | boolean (default `false`) | Adds the establishment's phone/fax/e-mail as published in the registry |
| `padLeadingZeros` | boolean (default `true`) | Restores leading zeros lost in Excel |
| `deduplicate` | boolean (default `true`) | Each unique value is looked up (and charged) once |
| `maxConcurrency` | integer (default `3`, max `10`) | Parallel requests; kept low to respect the free public APIs |
| `maxRetries` | integer (default `4`, max `8`) | Retries per source on 429/5xx before falling back to the next source |
| `requestTimeoutSecs` | integer (default `15`, max `60`) | Timeout per HTTP request |

#### Input example

This is the input of a real test run (one valid CNPJ, one CNPJ with a wrong check digit, one CEP):

```json
{
  "cnpjs": ["33.000.167/0001-01", "33000167000102"],
  "ceps": ["01001000"]
}
```

### Output

One dataset item per input. Export as **JSON, CSV, Excel, XML or HTML**, or read it through the API. The dataset has three views: **Overview**, **CNPJ companies** and **CEP addresses**. A `SUMMARY` record in the key-value store holds the counts per status.

`status` is one of `success`, `not_found`, `invalid_input`, `duplicate` or `error`. Only `success` is charged, and each row tells you whether it was charged (`charged`).

#### Output example: CNPJ

From the test run above (`secondaryCnaes` shortened from 5 to 2 entries):

```json
{
  "inputType": "cnpj",
  "input": "33.000.167/0001-01",
  "normalized": "33000167000101",
  "formatted": "33.000.167/0001-01",
  "status": "success",
  "errorMessage": null,
  "source": "brasilapi",
  "legalName": "PETROLEO BRASILEIRO S A PETROBRAS",
  "tradeName": "PETROBRAS - EDISE",
  "registrationStatus": "ATIVA",
  "registrationStatusDate": "2005-11-03",
  "registrationStatusReason": "SEM MOTIVO",
  "specialSituation": null,
  "openingDate": "1966-09-28",
  "establishmentType": "MATRIZ",
  "legalNature": "Sociedade de Economia Mista",
  "legalNatureCode": "2038",
  "companySize": "DEMAIS",
  "shareCapital": 205431960000,
  "mainCnae": "0600001",
  "mainCnaeDescription": "Extração de petróleo e gás natural",
  "secondaryCnaes": [
    { "code": "1921700", "description": "Fabricação de produtos do refino de petróleo" },
    { "code": "3520401", "description": "Produção de gás; processamento de gás natural" }
  ],
  "simplesNacional": null,
  "mei": null,
  "latestTaxRegime": "LUCRO REAL",
  "address": {
    "streetType": "AVENIDA",
    "street": "REPUBLICA DO CHILE",
    "number": "65",
    "complement": null,
    "neighborhood": "CENTRO",
    "city": "RIO DE JANEIRO",
    "state": "RJ",
    "cep": "20031170",
    "ibgeCityCode": "3304557"
  },
  "partnersCount": 8,
  "charged": true,
  "fetchedAt": "2026-09-28T17:22:09.145Z"
}
```

#### Output example: CEP

```json
{
  "inputType": "cep",
  "input": "01001000",
  "normalized": "01001000",
  "formatted": "01001-000",
  "status": "success",
  "errorMessage": null,
  "source": "brasilapi",
  "street": "Praça da Sé",
  "complement": null,
  "neighborhood": "Sé",
  "city": "São Paulo",
  "state": "SP",
  "ibgeCityCode": "3550308",
  "latitude": -23.5503898,
  "longitude": -46.633081,
  "ddd": null,
  "charged": true,
  "fetchedAt": "2026-09-28T17:22:09.368Z"
}
```

`ddd` (area code) is filled when the address comes from ViaCEP or OpenCEP; `latitude`/`longitude` when it comes from BrasilAPI and the coordinates are known.

#### Output example: invalid input (free)

```json
{
  "inputType": "cnpj",
  "input": "33000167000102",
  "normalized": null,
  "formatted": null,
  "status": "invalid_input",
  "errorMessage": "Invalid check digits (dígitos verificadores)",
  "source": null,
  "charged": false,
  "fetchedAt": "2026-09-28T17:22:08.796Z"
}
```

### Pricing

This Actor uses **pay per event** pricing:

| | |
|---|---|
| **Charged** | `result` event: **US$0.002 per successful lookup** (US$2 per 1,000), i.e. each CNPJ or CEP that returns data (`status: "success"`) |
| **Free** | Invalid inputs, duplicates (with `deduplicate` on), not found, and errors after all retries and fallbacks |
| **No** | Start fee or monthly rental |

The test run above had 3 inputs and 2 successful lookups, so it cost US$0.004 in events. The current price is always shown on the Actor's **Pricing** tab.

To cap your spend, set **"Max cost per run"** in the run options (or `maxTotalChargeUsd` in the API). The Actor checks the remaining budget before every lookup, stops when the budget is reached, and reports in `SUMMARY` how many inputs were not processed. It never charges beyond your limit.

### Integrations and API

You can run the Actor from Apify Console, on a schedule, or from your own code, and send the results to other tools.

- **Apify API**: start a run and read the dataset over HTTP. For small lists, the `run-sync-get-dataset-items` endpoint returns the rows in the same request:

```bash
curl -X POST "https://api.apify.com/v2/acts/brasil_utils~brazil-cnpj-cep-bulk-lookup/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"cnpjs": ["33.000.167/0001-01"], "ceps": ["01001-000"]}'
```

- **Make, Zapier and n8n**: use Apify's integrations for these platforms ("Run an Actor" / "Get dataset items" steps) to look up a CNPJ or CEP whenever a new row, form submission or CRM record arrives.
- **Webhooks, Google Sheets, Slack and more**: available in the Actor's **Integrations** tab in Apify Console.

**JavaScript / TypeScript** (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('brasil_utils/brazil-cnpj-cep-bulk-lookup').call({
    cnpjs: ['33.000.167/0001-01'],
    ceps: ['01001-000'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((i) => [i.formatted, i.status, i.legalName ?? i.city]));
```

**Python** (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("brasil_utils/brazil-cnpj-cep-bulk-lookup").call(
    run_input={"cnpjs": ["33.000.167/0001-01"], "ceps": ["01001-000"]}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["formatted"], item["status"], item.get("legalName") or item.get("city"))
```

### Data sources and limits

- **CNPJ data** comes from the official open data (dados abertos) published by Receita Federal, served by the free, open-source APIs [BrasilAPI](https://brasilapi.com.br) (primary) and [Minha Receita](https://minhareceita.org) (fallback).
- **CEP data** comes from [BrasilAPI](https://brasilapi.com.br), [ViaCEP](https://viacep.com.br) and [OpenCEP](https://opencep.com), in that order.
- The Actor does not scrape the Receita Federal website, does not solve captchas and is not affiliated with Receita Federal, Correios or the API providers.
- **Freshness**: Receita Federal publishes the CNPJ dataset monthly, so changes from the last few weeks may be missing.
- **Speed**: about 2–5 lookups per second with the default concurrency of 3 (roughly 1,000 inputs in 5–8 minutes). 256 MB of memory is enough.
- **Public API limits**: the sources are free community services without an SLA, and none of them is meant for heavy bulk traffic. BrasilAPI has no published limit, but its maintainers apply ad-hoc rules of about 100 requests per 60 seconds to bulk traffic ([BrasilAPI issue #684](https://github.com/BrasilAPI/BrasilAPI/issues/684)). So the Actor:
  - sends **at most 90 requests per minute to BrasilAPI** in each run; lookups above that go straight to the fallback (Minha Receita for CNPJ, ViaCEP then OpenCEP for CEP) instead of waiting;
  - on a BrasilAPI **429 or 403** (edge rate limit / bot protection, sent without `Retry-After`), does not retry: it uses the fallback and pauses BrasilAPI for 60 seconds;
  - retries the other sources with exponential backoff on 429/5xx/timeouts, honoring `Retry-After`, and uses low concurrency (default 3);
  - uses BrasilAPI again at the end of the chain if the fallbacks fail, waiting for a free slot.
    If every source fails for an input, that row gets `status: "error"` and is not charged, so you can re-run just those inputs. The `source` field of each row tells you which API answered.
- **Not included**: partner names (QSA), state registration (inscrição estadual), search by CNAE/city (this Actor looks up CNPJs you already have).

### FAQ

**How do I look up a list of CNPJs from Excel?** Copy the column and paste it into `cnpjs` (or paste a mixed CNPJ/CEP column into `bulkText`), run the Actor, then export the dataset as Excel or CSV.

**Does it return partners (sócios / QSA)?** No. Only `partnersCount` is returned. Names of individuals are personal data under LGPD and are intentionally excluded. For individual entrepreneurs (natureza jurídica 213-5, which includes MEI), the CPF digits that the registry appends to the company name are removed.

**Does it return phone and e-mail?** Only if you enable `includeContactInfo`, and only what the company published in the registry. You are responsible for having a legal basis under LGPD to use it.

**Does it support the new alphanumeric CNPJ?** Yes for validation (check digits). Lookups will work as soon as the public data sources publish those CNPJs.

**Can I check if a CNPJ is active (situação cadastral)?** Yes. `registrationStatus` is `ATIVA`, `BAIXADA`, `INAPTA`, `SUSPENSA` or `NULA`, with the date and reason.

**What happens with an invalid or non-existent CNPJ or CEP?** You still get a row, with `status` set to `invalid_input` or `not_found` and an `errorMessage`. These rows are free.

**Is this an official Receita Federal API?** No. It uses Receita Federal's public open data through community APIs, which is the same data the official CNPJ files contain.

***

### 🇧🇷 Em português

**Consulta CNPJ em lote e consulta CEP em lote**, com dados abertos da Receita Federal. Cole uma lista ou uma coluna da sua planilha e receba uma linha por item com **razão social, nome fantasia, situação cadastral, data de abertura, CNAE principal e secundários, natureza jurídica, porte, opção pelo Simples Nacional e MEI, capital social e endereço completo**. Para CEP: **logradouro, bairro, cidade, UF, código IBGE e, quando a fonte informa, DDD e coordenadas**.

#### O que o Actor faz

- Valida localmente os **dígitos verificadores** do CNPJ, inclusive o **novo CNPJ alfanumérico**, e o formato do CEP
- Corrige zeros à esquerda perdidos no Excel
- Usa fontes com redundância: BrasilAPI e Minha Receita (CNPJ); BrasilAPI, ViaCEP e OpenCEP (CEP)
- Respeita os limites das APIs públicas gratuitas: no máximo 90 consultas por minuto à BrasilAPI em cada execução (o excedente vai para a fonte reserva) e sem repetir consultas quando a BrasilAPI responde 429
- Retorna uma linha por item de entrada, com o campo `status`, para a planilha continuar alinhada
- Não retorna dados pessoais de sócios (QSA) e remove o CPF que aparece no nome de empresários individuais e MEI (LGPD)

#### Casos de uso

- **Contabilidade e escritórios contábeis**: conferir se o CNPJ de clientes e fornecedores está ativo e se é optante do Simples Nacional ou MEI
- **Cadastro e homologação de fornecedores (KYB)**: validar situação cadastral, data de abertura, natureza jurídica, CNAE e endereço
- **E-commerce e checkout**: preencher o endereço automaticamente a partir do CEP e validar o endereço de entrega
- **Higienização de CRM e ERP**: padronizar e validar colunas de CNPJ e CEP antes de importar

#### Preço

**US$0,002 por consulta com sucesso** (US$2 por 1.000). CNPJ ou CEP inválido, duplicado, não encontrado ou com erro **não é cobrado**. Sem taxa de início e sem mensalidade. Use o limite **"Max cost per run"** para definir o valor máximo por execução.

#### Integração

Rode pelo Apify Console, agende execuções ou chame pela API do Apify (exemplos em JavaScript, Python e curl acima). Também dá para conectar ao **Make, Zapier e n8n** pelas integrações do Apify e exportar os resultados em **Excel, CSV ou JSON**.

#### Perguntas frequentes

**De onde vêm os dados?** Dos dados abertos do CNPJ publicados pela Receita Federal, via [BrasilAPI](https://brasilapi.com.br) (principal) e [Minha Receita](https://minhareceita.org) (reserva). Os CEPs vêm de [BrasilAPI](https://brasilapi.com.br), [ViaCEP](https://viacep.com.br) e [OpenCEP](https://opencep.com), nessa ordem. O campo `source` de cada linha mostra qual API respondeu. O Actor não faz scraping do site da Receita e não é um serviço oficial.

**Tem limite de consultas?** As fontes são serviços comunitários gratuitos, sem SLA, e não foram feitas para uso pesado em lote. A BrasilAPI não publica um limite, mas os mantenedores aplicam regras pontuais de cerca de 100 requisições a cada 60 segundos para tráfego em lote ([issue #684](https://github.com/BrasilAPI/BrasilAPI/issues/684)). Por isso o Actor envia no máximo 90 requisições por minuto à BrasilAPI em cada execução e manda o excedente para a fonte reserva (Minha Receita para CNPJ; ViaCEP e OpenCEP para CEP). Se a BrasilAPI responder 429 ou 403, o Actor não insiste: usa a reserva e pausa a BrasilAPI por 60 segundos. As outras fontes recebem novas tentativas com espera exponencial. Se todas as fontes falharem, a linha sai com `status: "error"` e não é cobrada.

**Os dados são atualizados?** A Receita Federal publica a base mensalmente; alterações muito recentes podem ainda não aparecer.

**Retorna sócios, telefone e e-mail?** Sócios não (apenas a quantidade). Telefone e e-mail só com a opção `includeContactInfo` ativada.

# Actor input Schema

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

List of CNPJs (Brazilian company tax IDs). Any format is accepted: 33.000.167/0001-01, 33000167000101, or with leading zeros lost by Excel (191). New alphanumeric CNPJs (e.g. 12.ABC.345/01DE-35) are validated too.

## `ceps` (type: `array`):

List of CEPs (Brazilian postal codes). Accepts 01001-000, 01001000 or 1001000.

## `bulkText` (type: `string`):

Paste CNPJs and/or CEPs separated by new lines, commas, semicolons, tabs or spaces (e.g. a column copied from a spreadsheet). Auto-detection: letters or '/' = CNPJ; 9-14 digits = CNPJ; 7-8 digits = CEP; up to 6 digits = CNPJ that lost its leading zeros in Excel (191 = 00.000.000/0001-91). Use "How to read the pasted list" to force one type.

## `bulkTextType` (type: `string`):

"auto" detects each value (rule above). Choose "cnpj" or "cep" when the pasted list has only one type, e.g. a column of CNPJs with 7-8 digits left after Excel removed the zeros. The separate CNPJs and CEPs fields are never auto-detected.

## `includeContactInfo` (type: `boolean`):

Adds the registry phone/fax/e-mail of the establishment (as published by Receita Federal). Off by default. Partner (QSA / sócios) personal data is never returned — only the number of partners.

## `padLeadingZeros` (type: `boolean`):

Pad numeric CNPJs (<14 digits) and 7-digit CEPs with leading zeros, fixing values mangled by spreadsheets.

## `deduplicate` (type: `boolean`):

Look up each unique CNPJ/CEP only once (you are charged only once).

## `maxConcurrency` (type: `integer`):

Parallel requests to the public APIs. Keep low to be polite to free public services and avoid rate limiting.

## `maxRetries` (type: `integer`):

Retries with exponential backoff on HTTP 429/5xx/network errors before falling back to the next source.

## `requestTimeoutSecs` (type: `integer`):

Timeout for each HTTP request to a data source.

## Actor input object example

```json
{
  "cnpjs": [
    "00.000.000/0001-91",
    "33000167000101"
  ],
  "ceps": [
    "01001-000",
    "20040020"
  ],
  "bulkTextType": "auto",
  "includeContactInfo": false,
  "padLeadingZeros": true,
  "deduplicate": true,
  "maxConcurrency": 3,
  "maxRetries": 4,
  "requestTimeoutSecs": 15
}
```

# Actor output Schema

## `overview` (type: `string`):

Every input with its status (success, not\_found, invalid\_input, duplicate, error).

## `cnpj` (type: `string`):

Company registry data (Receita Federal open data) for CNPJ inputs.

## `cep` (type: `string`):

Address data for CEP inputs.

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

JSON with counts per status and inputs not processed due to the budget limit.

# 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 = {
    "cnpjs": [
        "00.000.000/0001-91",
        "33000167000101"
    ],
    "ceps": [
        "01001-000",
        "20040020"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasil_utils/brazil-cnpj-cep-bulk-lookup").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 = {
    "cnpjs": [
        "00.000.000/0001-91",
        "33000167000101",
    ],
    "ceps": [
        "01001-000",
        "20040020",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("brasil_utils/brazil-cnpj-cep-bulk-lookup").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 '{
  "cnpjs": [
    "00.000.000/0001-91",
    "33000167000101"
  ],
  "ceps": [
    "01001-000",
    "20040020"
  ]
}' |
apify call brasil_utils/brazil-cnpj-cep-bulk-lookup --silent --output-dataset

```

## MCP server setup

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

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/X4QvPxP2AQNOBACb7/builds/RzxP9WG4rXDAQeBPi/openapi.json
