# Brazil CNPJ Receita Federal Lookup Scraper (`pradio/brazil-cnpj-receita-federal`) Actor

Get a company's public Brazil CNPJ Receita Federal registry entry by its CNPJ number, one row per company, from the open mirror at minhareceita.org: registration status and its reason, legal and trade names, activity codes, address, share capital and tax flags. No key, no login, no browser.

- **URL**: https://apify.com/pradio/brazil-cnpj-receita-federal.md
- **Developed by:** [Pradio Actors](https://apify.com/pradio) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.96 / 1,000 company returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

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

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

## How to integrate an Actor?

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

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

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

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

# README

## Brazil CNPJ Receita Federal Lookup Scraper

### What does Brazil CNPJ Receita Federal Lookup Scraper do?

Brazil CNPJ Receita Federal Lookup Scraper turns a Brazilian CNPJ number into that company's public Receita Federal registry entry: legal and trade names, registration status and its reason, main and secondary activities, registered address, share capital and tax flags. Paste the numbers or the registry's own URLs and press Start; one row lands in your dataset per company found. A number that resolves to nothing costs nothing, and its row says why.

On 81 numbers this build had never seen, every lookup returned a row, at $0.0016 a row plus the platform's $0.00005 start.

### Who uses Brazil CNPJ Receita Federal Lookup Scraper

| Buyer | What they run it for |
|---|---|
| Compliance and onboarding teams | Confirm a Brazilian company's registration is active before signing or paying, with the status, its reason and its date on the row. |
| Procurement and supplier vetting | Turn a column of CNPJs into legal names, trade names, registered addresses and activity codes. |
| Data teams | Enrich a file of Brazilian companies with the registry fields below, one row per number. |
| Agents and scripts | Answer "which company is registered under this CNPJ" inside a run or a chat. |

### Features

- **Any spelling of a CNPJ.** Paste `33.683.111/0002-80`, the bare digits, or a URL carrying either. The fourteen digits are what the lookup reads.
- **The open JSON mirror, no browser.** Each number is one GET against the public endpoint at minhareceita.org. No key, no account, no page rendering.
- **Duplicates dropped before billing.** The same number in two spellings is one company: looked up once, billed once.
- **Every miss is a visible row.** A number the registry does not hold, an entry that is not CNPJ-shaped and a read that failed each land in the dataset with their reason. None is billed.
- **The partners list stays at the registry.** `qsa_count` says how many partners and officers the entry lists. The list itself, its names and its identifiers are not copied into the row.
- **A run summary on every run.** `RUN_SUMMARY` in the key-value store carries the fetched, pushed, charged and dropped counts, so a quiet run and a broken one are told apart.

### What you can count on

- You pay only for rows whose `status` is `ok`: a number the registry refused, or publishes no company under, is pushed as an uncharged ITEM\_STATUS row. The dataset still tells you what happened.
- Every billed row is charged only after it is written to your dataset. A row you cannot see is never billed.
- A run that finds nothing returns one PROFILE\_NOT\_FOUND row that says so, never an empty dataset.
- A spending limit stops the run cleanly, with a STOPPED\_EARLY row saying how many rows were returned and how many were not.
- Every run writes a RUN\_SUMMARY with rowsFetched, rowsPushed, rowsCharged and duplicatesDropped, so a short run and a broken one are told apart.
- If the source's answer changes shape, the run fails with the error in the log. It never returns rows full of nulls and calls it success.
- No value is invented: a field the entry does not carry is null, and the table below says where each one was read.

### Why this one

The most-used alternative on this platform, measured on 2026-09-15. The differences that held up:

- **A row costs $0.0016.** The alternative charges $0.002 per returned row.
- **A run costs $0.00005 to start.** That is the platform's own start charge; this Actor adds nothing on top of it. The alternative bills a $0.10 start event before the first row exists.
- **Two fields it left empty are filled here.** Its measured row came back with `telefone1` and `data_opcao_simples` empty, two fields this Actor returns: on the five-lookup example run `telefone1` filled four of the five and `data_opcao_simples` one of the five. Its own listing also promises `telefone2`, `fax`, `pais`, `regime_tributario`, `ente_federativo` and `ultima_atualizacao`; all six came back empty on the measured row.
- **A miss is free and explained.** `status` says why a number yielded nothing, and the row is never billed.
- **The fill is measured: 100% over 81 lookups on numbers this build had never seen.** No seller on this shelf publishes a hit rate.
- **Every row carries `source_url`.** The address each value was read from is on the row.

### What data does Brazil CNPJ Receita Federal Lookup Scraper return?

One company in, one registry entry out. This is a real row for CNPJ 00000000000191 (Banco do Brasil), trimmed for display:

```json
{
  "source_url": "https://minhareceita.org/00000000000191",
  "status": "ok",
  "cnpj": "00000000000191",
  "razao_social": "BANCO DO BRASIL SA",
  "nome_fantasia": "DIRECAO GERAL",
  "matriz_filial": "MATRIZ",
  "situacao_cadastral": "ATIVA",
  "situacao_cadastral_motivo": "SEM MOTIVO",
  "data_situacao_cadastral": "2005-11-03",
  "data_abertura": "1966-08-01",
  "cnae_principal_codigo": 6422100,
  "cnae_principal_descricao": "Bancos múltiplos, com carteira comercial",
  "porte": "DEMAIS",
  "capital_social": 120000000000,
  "logradouro": "SAUN QUADRA 5 BLOCO B TORRE I, II, III",
  "numero": "SN",
  "bairro": "ASA NORTE",
  "municipio": "BRASILIA",
  "uf": "DF",
  "cep": "70040912",
  "telefone1": "6134939002",
  "data_opcao_simples": "2007-07-01",
  "simples_nacional": false,
  "mei": false,
  "orgao_publico": "NÃO",
  "cnaes_secundarios": [
    { "codigo": 6499999, "descricao": "Outras atividades de serviços financeiros não especificadas anteriormente" }
  ],
  "qsa_count": 41,
  "row_type": "ROW"
}
```

Two more rows from the same run show the other advertised shapes. A branch, CNPJ 00776574000156, reads `matriz_filial` FILIAL. And note the legal name: the register's own text carries "EM RECUPERACAO JUDICIAL" beside a `situacao_cadastral` of ATIVA, and the row reproduces both as the register publishes them; the name is the register's text, the status is the register's status field:

```json
{
  "source_url": "https://minhareceita.org/00776574000156",
  "status": "ok",
  "cnpj": "00776574000156",
  "razao_social": "AMERICANAS S.A - EM RECUPERACAO JUDICIAL",
  "matriz_filial": "FILIAL",
  "situacao_cadastral": "ATIVA",
  "situacao_cadastral_motivo": "SEM MOTIVO",
  "data_situacao_cadastral": "2005-11-03",
  "data_abertura": "1995-08-22",
  "cnae_principal_codigo": 4789099,
  "cnae_principal_descricao": "Comércio varejista de outros produtos não especificados anteriormente",
  "porte": "DEMAIS",
  "capital_social": 39918280000,
  "municipio": "OSASCO",
  "uf": "SP",
  "telefone1": "1140034848",
  "qsa_count": 2,
  "row_type": "ROW"
}
```

And a closed company, CNPJ 11396633000187, reads `situacao_cadastral` BAIXADA with its reason on the row:

```json
{
  "source_url": "https://minhareceita.org/11396633000187",
  "status": "ok",
  "cnpj": "11396633000187",
  "razao_social": "3A CONSULTORIA FINANCEIRA LTDA",
  "matriz_filial": "MATRIZ",
  "situacao_cadastral": "BAIXADA",
  "situacao_cadastral_motivo": "EXTINCAO POR ENCERRAMENTO LIQUIDACAO VOLUNTARIA",
  "data_situacao_cadastral": "2024-11-27",
  "data_abertura": "2009-12-02",
  "cnae_principal_codigo": 7020400,
  "cnae_principal_descricao": "Atividades de consultoria em gestão empresarial, exceto consultoria técnica específica",
  "porte": "DEMAIS",
  "capital_social": 450000,
  "municipio": "RIO DE JANEIRO",
  "uf": "RJ",
  "telefone1": "2122527542",
  "qsa_count": 2,
  "row_type": "ROW"
}
```

Every field a row can carry:

| Field | What it holds | Where it is read |
|---|---|---|
| `cnpj` | The fourteen-digit registry number this row answers | the entry's `cnpj` key |
| `razao_social` | The company's registered legal name | `razao_social` |
| `nome_fantasia` | The trade name the company does business under, where it filed one | `nome_fantasia` |
| `matriz_filial` | Whether the entry is the head office (MATRIZ) or a branch (FILIAL) | `descricao_identificador_matriz_filial` |
| `situacao_cadastral` | The registration status, for example ATIVA or BAIXADA | `descricao_situacao_cadastral` |
| `situacao_cadastral_motivo` | The reason behind the registration status | `descricao_motivo_situacao_cadastral` |
| `situacao_cadastral_motivo_codigo` | The registry's code for that reason | `motivo_situacao_cadastral` |
| `data_situacao_cadastral` | The date the registration status last changed | `data_situacao_cadastral` |
| `data_abertura` | The date the company was registered | `data_inicio_atividade` |
| `cnae_principal_codigo` | The company's main economic-activity code | `cnae_fiscal` |
| `cnae_principal_descricao` | What the main activity code means, in words | `cnae_fiscal_descricao` |
| `cnaes_secundarios` | The secondary activities, each a `{codigo, descricao}` pair | `cnaes_secundarios` |
| `natureza_juridica_codigo` | The legal-nature code: a company type, a public body, and so on | `codigo_natureza_juridica` |
| `porte` | The size class the registry gives the company | `porte` |
| `porte_codigo` | The registry's code for that size class | `codigo_porte` |
| `capital_social` | The registered share capital, in BRL | `capital_social` |
| `logradouro` | The street of the registered address | `logradouro` |
| `numero` | The street number | `numero` |
| `complemento` | The address complement line, where the entry carries one | `complemento` |
| `bairro` | The district of the registered address | `bairro` |
| `municipio` | The city of the registered address | `municipio` |
| `municipio_codigo_ibge` | The city's IBGE code | `codigo_municipio_ibge` |
| `municipio_codigo_siafi` | The city's SIAFI code | `codigo_municipio` |
| `uf` | The state of the registered address | `uf` |
| `cep` | The postcode of the registered address | `cep` |
| `telefone1` | The first phone line on the entry, with its area code | `ddd_telefone_1` |
| `simples_nacional` | Whether the company opted into the Simples tax regime; false when the entry carries no option | `opcao_pelo_simples` |
| `data_opcao_simples` | The date the company opted into Simples, where it did. The registry keeps the date even after a company leaves the regime, so a row can carry it beside `simples_nacional: false` | `data_opcao_pelo_simples` |
| `mei` | Whether the company is registered as an individual micro-entrepreneur | `opcao_pelo_mei` |
| `orgao_publico` | SIM or NÃO: derived from the legal-nature code, whose public-body range starts with 1 | derived from `codigo_natureza_juridica` |
| `qsa_count` | How many partners and officers the entry lists; the list itself is not copied | the size of `qsa` |
| `source_url` | The exact address this row was read from | the request itself |
| `row_type` | ROW on a company row; ITEM\_STATUS on a per-number miss; PROFILE\_NOT\_FOUND when nothing came back; STOPPED\_EARLY when a limit ended the run | set by the run |
| `status` | The per-number verdict: `ok` on a company row, `not_found`, `bad_url` or `fetch_failed` on a miss | set by the run |
| `reason` | The detail behind a `status`, or why a run-level row exists | set by the run |
| `rowsFetched` | On run-level status rows: how many rows the run examined before de-duplication and the cap | set by the run |
| `rowsReturned` | On run-level status rows: how many rows made it to the dataset | set by the run |
| `rowsRemaining` | On run-level status rows: how many fetched rows were not returned | set by the run |

A field the registry leaves empty comes back null; nothing is invented. On the run over 81 numbers this build had never seen, the thinnest fields were `data_opcao_simples` at 35.8% (only Simples optants carry a date), `nome_fantasia` and `complemento` at 59.3%, `cnaes_secundarios` at 80.2%, `telefone1` at 82.7%, `logradouro` and `numero` at 88.9%, and `data_situacao_cadastral` at 97.5%. Every other company field filled every resolved lookup.

The Console preview opens on the Overview view, the columns read first. The All fields view shows every declared column, empty or not.

### How much does it cost?

A resolved lookup is one **`company-returned` event: $0.0016**, charged only after the row is written to your dataset. Apify also bills its standard `apify-actor-start` event once per run, $0.00005 at this Actor's size. Nothing else is billed.

Per resolved lookup (every measured lookup returned a row): 100 CNPJs come back as 100 rows for $0.16, and 1,000 CNPJs as 1,000 rows for $1.60, each plus the $0.00005 start. In a table:

| CNPJs in one run | Rows back | You pay |
|---|---|---|
| 100 | 100 | $0.16, plus $0.00005 to start |
| 1,000 | 1,000 | $1.60, plus $0.00005 to start |
| 10,000 | 10,000 | $16.00, plus $0.00005 to start |

On higher Apify plans the per-row price steps down, to $0.00096 on the top tier.

What is never charged:

- `ITEM_STATUS` miss rows (`not_found`, `bad_url`, `fetch_failed`), each pushed with its `reason`.
- The `PROFILE_NOT_FOUND` row on a zero result, and the `STOPPED_EARLY` row on a charge limit.
- Duplicates dropped before they reach the dataset, and the `RUN_SUMMARY` itself.

### How do I use Brazil CNPJ Receita Federal Lookup Scraper?

1. Open the Actor's Store page and press **Try for free** / **Start**.
2. The **Start Urls** list already carries five real CNPJs, so a first run needs nothing typed. To look up your own, replace it: one entry per company, a bare or punctuated number, or its minhareceita.org URL.
3. Optionally set **Maximum items** (default 100), the most rows the run returns.
4. Press **Start**. Rows land in the dataset as they are read; `RUN_SUMMARY` in the key-value store carries the counts when the run finishes.

Example input:

```json
{
  "startUrls": [
    { "url": "https://minhareceita.org/33.683.111/0002-80" },
    { "url": "https://minhareceita.org/00.000.000/0001-91" },
    { "url": "https://minhareceita.org/60.701.190/0001-04" },
    { "url": "https://minhareceita.org/33.000.167/0001-01" },
    { "url": "https://minhareceita.org/02.558.157/0001-62" }
  ],
  "maxItems": 100
}
```

Or over the Apify API:

```bash
curl "https://api.apify.com/v2/acts/Pradio~brazil-cnpj-receita-federal/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -X POST -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://minhareceita.org/33683111000280"}]}'
```

### Input

| Input | Type | Default | What it does |
|---|---|---|---|
| `startUrls` | array | five real CNPJs | The numbers to look up, one entry per company. |
| `maxItems` | integer | 100 | The most rows one run returns; the run stops there. Minimum 1. |

#### `startUrls`

Each entry is `{ "url": "…" }` or a bare string. The run reads the first CNPJ-shaped number it finds: `33.683.111/0002-80`, `33683111000280` and `https://minhareceita.org/33.683.111/0002-80` all name the same company. The same number in two spellings is looked up once and billed once. An entry carrying nothing CNPJ-shaped comes back as a `bad_url` row, unbilled.

#### `maxItems`

The run returns at most this many rows, whatever is left in the list. The form's minimum is 1; over the API, omit it or send 0 for no cap.

### Output

A run writes two kinds of things:

- **Data rows** in the default dataset, one per CNPJ that resolved, each carrying `row_type: "ROW"` and `status: "ok"`. A number that misses (nothing registered under it, an entry with no CNPJ-shaped number, a read that failed) is pushed as `row_type: "ITEM_STATUS"` with a `status` of `not_found`, `bad_url` or `fetch_failed` and a `reason` saying why. A miss row is never billed.
- **One run-level status row**, only when there is something to report. A run that pushes nothing ends with one `PROFILE_NOT_FOUND` row carrying `reason`, `rowsFetched`, `rowsReturned` and `rowsRemaining`. A run your charge limit cut short ends with `STOPPED_EARLY` carrying the same counts. Neither is billed.

The key-value store's `RUN_SUMMARY` carries `rowsFetched`, `rowsPushed`, `rowsCharged`, `rowsUncharged`, `duplicatesDropped` and `stoppedEarly` for every run, alongside the input and the start and finish timestamps. That is how a short run and a broken one are told apart.

A zero result is an answer, not silence: one `PROFILE_NOT_FOUND` row, uncharged, with `rowsFetched` telling you whether anything was looked up at all.

### What can you do with the data?

- **Check a company before you sign or pay it.** `situacao_cadastral`, its reason and its date say whether the registration is active; `data_abertura`, `porte` and `capital_social` say how established it is.
- **Turn a column of CNPJs into registry entries.** A supplier or lead list becomes legal names, trade names, addresses and activity codes you can join back on `cnpj`.
- **Map a market.** Group rows by `cnae_principal_codigo` and `uf`, or filter on `porte` and `simples_nacional` for size and tax regime.
- **Feed the tools you already use.** Rows land in an Apify dataset, so integrations, schedules and webhooks can carry each run into a sheet or a CRM.

### Use Brazil CNPJ Receita Federal Lookup Scraper with AI agents

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=Pradio/brazil-cnpj-receita-federal"
```

Paste that line to give an MCP-capable agent this Actor as a tool. It can then answer "which company is registered under this CNPJ" inside a chat.

### Personal data

**Transparency and source.** Each row reproduces one entry of the public Receita Federal CNPJ registry as mirrored at minhareceita.org, and the purpose is company registration lookup. A registry entry can name natural persons appearing in it in a business capacity, such as partners and officers.

Field minimisation is kept. The row stays the company-registry entry itself: names, counts, dates and description lines, carried only as the entry carries them. The partners list arrives only as `qsa_count`, its size; a person's name, identifier or representative is not copied, and no enrichment adds anything about a person beyond the entry. `telefone1` carries the company's listed phone line.

The publisher of this Actor answers for the product it lists; you answer for the runs you make and the rows you keep. Deletion is honoured: a person named in an entry can object through the Issues tab on this page and have themselves removed from output rows. The same place takes a request to correct or delete what a run produced. The run keeps its stop condition: a refused or failed read fails it, and nothing retries past a block or an objection.

### Release notes

- **0.1** (2026-09-15): the first build. One row per CNPJ from the public Receita Federal registry mirror, miss rows unbilled, a run summary on every run.

### Limits

- **It looks up CNPJs you already have; it does not find companies.** There is no discovery by state or UF, municipality, CNAE activity, registration status, legal nature or partner, and no company-name search: the open mirror serves one CNPJ at a time, so there is no list to filter. Bring the numbers.
- **A row is the registry's current entry, not its history.** What the entry does not carry, the row does not have.
- **The mirror is a secondary source.** Its own documentation says the data can be outdated, incorrect or inconsistent, that there is no SLA, and that updates land some days after Receita Federal's releases. A value you would act on twice is worth confirming on the entry itself; `source_url` is on the row.
- **Thin fields are the registry's choice, and they stay thin.** `data_opcao_simples` exists only where the company opted into Simples (35.8% of the 81 lookups on numbers the build had never seen), `nome_fantasia` and `complemento` appear on 59.3% of them, `telefone1` on 82.7%.
- **A number's check digits are not verified first.** The registry answers a bad one itself as `not_found`, and an entry with nothing CNPJ-shaped lands as `bad_url`. Both are unbilled.
- **No proxy, no browser, no login.** If the endpoint refuses every read, the run fails rather than working around the refusal.
- **The endpoint publishes no usage cap and no SLA.** The run still paces itself with a pause between requests, so a very long list takes a while.

### Troubleshooting

**I pasted more entries than rows I got back.**
Two spellings of the same number are one lookup and one row, and a `maxItems` cap ends the list early. `RUN_SUMMARY` shows `rowsFetched` beside `rowsPushed` and `duplicatesDropped`: for example, 50 entries can mean 47 lookups once the duplicates are out.

**A CNPJ came back `not_found`.**
The registry answered and holds no company under that number, or it rejected the number as invalid. The row carries its `reason` and is unbilled.

**The run failed instead of returning partial results.**
When every lookup fails, the endpoint itself was unreachable, and the run fails with the error in the log rather than push an empty dataset. One failed lookup alone lands as a `fetch_failed` row.

**The rows stopped before my list ended.**
Either `maxItems` capped the run or your charge limit did. The `STOPPED_EARLY` row says how many rows were returned and how many were not. Raise the limit and re-run.

### FAQ

**Can I use integrations with Brazil CNPJ Receita Federal Lookup Scraper?**
Yes. Like every Apify Actor it plugs into Apify's integrations: Zapier, Make, Google Sheets, webhooks. It can also run on a schedule, so a list re-check can refresh itself.

**Can I use Brazil CNPJ Receita Federal Lookup Scraper with the Apify API?**
Yes. The curl line under "How do I use" is the whole call: POST the input to `acts/Pradio~brazil-cnpj-receita-federal/run-sync-get-dataset-items` with your token and the rows come back in the response. The `apify-client` libraries for JavaScript and Python wrap the same call.

**Can I use it through an MCP server?**
Yes. The line in "Use with AI agents" registers it with an MCP-capable agent through Apify's hosted MCP server, no local install needed.

**Is it legal to look up CNPJ data?**
Brazilian company registrations are public data, read here from an open mirror that asks for no key, account or login. The mirror's own documentation says it serves the entries as Receita Federal published them. That is not legal advice: a row can name a person in a business capacity, and the Personal data section above says what is kept and how a named person objects.

### See also

- [German Impressum Contact Scraper](https://apify.com/pradio/imprint-contact): our own Actor for the same job on German companies. It reads the legally required company imprint (Impressum) on each site you give it.

### Report a problem

Something off, a number that parses wrong, a field that should be there? Open an issue on this Actor's Issues tab in the Apify Console. Attaching the run's log and `RUN_SUMMARY` gets it fixed fastest.

### Not affiliated

This Actor is not affiliated with, endorsed by or sponsored by Receita Federal, the Brazilian government or Minha Receita. It reads the same public registry mirror anyone can open at minhareceita.org. Company names and marks belong to their owners.

# Actor input Schema

## `startUrls` (type: `array`):

One company per entry: a CNPJ with or without punctuation, or a minhareceita.org URL carrying one. The first CNPJ-shaped number in each entry is what gets looked up; an entry without one comes back as an unbilled bad\_url row.

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

The most rows one run returns. The run stops there; omit it (or send 0 over the API) for no cap.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://minhareceita.org/33.683.111/0002-80"
    },
    {
      "url": "https://minhareceita.org/00.000.000/0001-91"
    },
    {
      "url": "https://minhareceita.org/60.701.190/0001-04"
    },
    {
      "url": "https://minhareceita.org/33.000.167/0001-01"
    },
    {
      "url": "https://minhareceita.org/02.558.157/0001-62"
    },
    {
      "url": "https://minhareceita.org/00.776.574/0001-56"
    },
    {
      "url": "https://minhareceita.org/11.396.633/0001-87"
    }
  ],
  "maxItems": 100
}
```

# Actor output Schema

## `rows` (type: `string`):

The lookup rows for this run: one company row per resolved CNPJ, plus unbilled status rows for misses and run-level stops.

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

The run's counts: rows fetched, pushed, charged and uncharged, duplicates dropped, whether it stopped early, with the input and timestamps.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("pradio/brazil-cnpj-receita-federal").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("pradio/brazil-cnpj-receita-federal").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 '{}' |
apify call pradio/brazil-cnpj-receita-federal --silent --output-dataset

```

## MCP server setup

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

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/8poNhc8QzbMFxVsw4/builds/1bWNOtcM29m4AiTY6/openapi.json
