Brazil CNPJ Companies Scraper: Receita Federal Register Data avatar

Brazil CNPJ Companies Scraper: Receita Federal Register Data

Pricing

from $0.70 / 1,000 companies

Go to Apify Store
Brazil CNPJ Companies Scraper: Receita Federal Register Data

Brazil CNPJ Companies Scraper: Receita Federal Register Data

Company records from the Brazilian CNPJ register for a list of CNPJ numbers or a search by state, city and CNAE activity: legal name, trade name, status, legal nature, capital, address, opening date and size. Public data, no partner or personal fields, no API key.

Pricing

from $0.70 / 1,000 companies

Rating

0.0

(0)

Developer

Rowcraft

Rowcraft

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

25 minutes ago

Last modified

Share

Get Brazilian companies from the CNPJ register of the Receita Federal, the national company register of Brazil. This Brazil CNPJ scraper has two ways in: give it a list of CNPJ numbers and it returns one row per company, or give it a state, an activity code (CNAE) and a city and it finds the companies for you. Each company comes back as one flat row: legal name, trade name, registration status, main and secondary activities, legal nature, share capital, size, opening date, the Simples Nacional option and the full registered address, as JSON, CSV or Excel.

It reads the register through free community services built on the Receita's open data, with a second service as a fallback, so there is no key, no login, no CAPTCHA and no proxy. It never delivers the partners of a company, e-mail addresses or telephone numbers, and it leaves out sole traders and MEI registrations, whose name is the name of a person. You pay only for the companies delivered.

Results of Brazil CNPJ Companies Scraper: Receita Federal Register Data in the Apify dataset view

What you get

One row per company (one CNPJ is one establishment: a head office or a branch):

  • Identity: CNPJ (14 characters, without mask), legal name (razão social), trade name (nome fantasia), head office or branch
  • Status: registration status (ATIVA, BAIXADA, INAPTA, SUSPENSA, NULA), the date and the reason of the status
  • Activity: the main activity with its CNAE code and description, and every secondary activity as code and description
  • Legal nature and size: legal nature code and name (2062 limited company, 2054 closed corporation, 2038 mixed-economy company...), company size (micro, small or large), share capital in reais
  • Dates and tax: start of activity, Simples Nacional option with its dates, history flags of former MEI registrations
  • Address: street type, street, number, complement, district, postal code (CEP), city, IBGE city code and state (UF)
  • Traceability: which source answered (minhareceita or opencnpj), the update of the source data (the register is republished every month) and the time the record was read

Why this actor

  • Two modes in one run: a list of up to 10,000 CNPJ numbers, a search by state, activity and city, or both together. Duplicates are removed across the two.
  • Search where the demand is: most buyers of Brazilian company data want "all active software companies in São Paulo", not a list they already have. Search by one or several states, CNAE codes and cities, active companies only by default, head offices only if you wish, and a start-of-activity date for new companies.
  • Count before you pay: Count only reads the search without delivering anything and tells you how many companies match and what they would cost.
  • A report for every number: the COVERAGE record says for each CNPJ you gave whether it was found, not in the register, left out as a sole trader, mistyped (wrong check digits) or failed, so a result with fewer rows than numbers is never a mystery.
  • Check digits first: a mistyped CNPJ is reported without a single request, and a number that does not exist is never charged.
  • A fallback source: if the main service is down, slow or refuses, the lookup goes to a second public service and the row says which one answered.
  • No personal data by construction: rows are built from a fixed list of company fields; nothing else of the source answer is copied.
  • Polite and cheap to run: robots.txt is read before the first request to each host, requests are spaced 150 ms or more, four lookups run in parallel, and the run keeps within 256 MB of memory.

How to use it

  1. Open the Actor and fill in CNPJ numbers (the other fields are optional filters).
  2. Set Maximum companies to a small number for a first try (the default is a safe start).
  3. Optional: tick Count only and start once. You get the number of matching rows and the estimated cost, for free (only the start event is charged). Untick it to get the data.
  4. Click Start. The status line shows progress; the run stops cleanly at your limit or at the charge limit you set in the run options.
  5. Open the Dataset tab and download JSON, CSV, Excel, XML or HTML, or send the rows to Google Sheets, Slack, Make, n8n or Zapier with the Integrations tab.
  6. To run it on a schedule, use Schedules in Apify Console and turn on Only new rows since the last run below: every run then costs only the new rows, and a webhook URL tells you when something new came in.

Input

FieldWhat it does
cnpjsCNPJ numbers to look up, one per line, with or without the mask (33000167000101 or 33.000.167/0001-01). Up to 10,000 per run. Companies you look up are delivered with their status, active or not.
statesTwo-letter state codes (SP, RJ, MG...) for the search. Several states are searched together.
activityCodes, activityScope7-digit CNAE codes (6201501 software development). By default the code must be the company's main activity; choose "main or secondary" to include companies that list it among their secondary activities (many more).
cityCodes7-digit IBGE municipality codes (3550308 São Paulo, 3304557 Rio de Janeiro).
onlyActiveOn by default: skips closed, suspended and unfit companies (about four in ten records of a search).
headOfficesOnly, openedAfterSkip branches; keep only companies that started activity on or after a date (2025-01-01).
legalNatureCodes4-digit legal nature codes (2062 limited company, 2054 and 2046 corporations). Makes searches of common activities much faster, because sole traders are then not read. Codes of sole traders and other forms named after a person are ignored and said so in the run summary.
maxItemsStop after this many companies (default 500, 0 = no limit).
concurrencyParallel lookups, 1 to 8 (default 4). The delay between requests still applies.
countOnly, onlyNew, stateName, notifyUrl, notifyWhenEmptyCount only (deliver nothing); only new rows, the webhook: see Automation below.
requestIntervalMsDelay between requests to the same host, 150 ms or more (default 150).

A search needs at least one state, one activity code or one city: without one of them it would read the whole register of more than 70 million establishments, so the run stops with a clear message.

Example: look up three large companies.

{
"cnpjs": ["33000167000101", "00000000000191", "60701190000104"],
"maxItems": 50
}

Example: active software development companies in São Paulo opened since 2024, head offices only.

{
"states": ["SP"],
"activityCodes": ["6201501"],
"headOfficesOnly": true,
"openedAfter": "2024-01-01",
"maxItems": 1000
}

Example: restaurants in the city of Rio de Janeiro.

{
"states": ["RJ"],
"activityCodes": ["5611201"],
"cityCodes": ["3304557"],
"maxItems": 500
}

Output

35 fields per row. Empty values are null, never missing, so CSV and Excel columns are stable.

FieldTypeExample
idstring33000167000101
cnpjstring33000167000101
legalNamestringPETROLEO BRASILEIRO S A PETROBRAS
tradeNamestringPETROBRAS - EDISE
headOfficebooleanTrue
statusstringATIVA
statusDatestring2005-11-03
statusReasonstringSEM MOTIVO
mainActivityCodestring0600001
mainActivitystringExtração de petróleo e gás natural
secondaryActivitiesarray[{"code": "1921700", "description": "Fabricação de produtos do refi…
legalNatureCodestring2038
legalNaturestringSociedade de Economia Mista
sizestringDEMAIS
sizeCodenumber5
shareCapitalnumber205431960000
openedAtstring1966-09-28
simplesOptantbooleanOpted for the Simples Nacional tax regime (null = no record)
simplesOptedAtstringDate of the Simples Nacional option
simplesExcludedAtstringDate of exclusion from the Simples Nacional
meiOptantbooleanFalse
meiOptedAtstringDate a former MEI registration started
meiExcludedAtstringDate a former MEI registration ended
streetTypestringAVENIDA
streetstringREPUBLICA DO CHILE
numberstring65
complementstringAddress complement
districtstringCENTRO
zipstring20031170
citystringRIO DE JANEIRO
cityIbgeCodestring3304557
statestringRJ
sourcestringminhareceita
sourceUpdatedAtstring2026-10
fetchedAtstring2026-10-22T10:54:26.143Z

Example rows

Two real rows from a run (long texts shortened here, complete in the dataset):

[
{
"id": "33000167000101",
"cnpj": "33000167000101",
"legalName": "PETROLEO BRASILEIRO S A PETROBRAS",
"tradeName": "PETROBRAS - EDISE",
"headOffice": true,
"status": "ATIVA",
"statusDate": "2005-11-03",
"statusReason": "SEM MOTIVO",
"mainActivityCode": "0600001",
"mainActivity": "Extração de petróleo e gás natural",
"secondaryActivities": [
{
"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"
},
{
"code": "3520402",
"description": "Distribuição de combustíveis gasosos por redes urbanas"
},
"… 2 more"
],
"legalNatureCode": "2038",
"legalNature": "Sociedade de Economia Mista",
"size": "DEMAIS",
"sizeCode": 5,
"shareCapital": 205431960000,
"openedAt": "1966-09-28",
"simplesOptant": null,
"simplesOptedAt": null,
"simplesExcludedAt": null,
"meiOptant": false,
"meiOptedAt": null,
"meiExcludedAt": null,
"streetType": "AVENIDA",
"street": "REPUBLICA DO CHILE",
"number": "65",
"complement": null,
"district": "CENTRO",
"zip": "20031170",
"city": "RIO DE JANEIRO",
"cityIbgeCode": "3304557",
"state": "RJ",
"source": "minhareceita",
"sourceUpdatedAt": "2026-10",
"fetchedAt": "2026-10-22T11:02:44.861Z"
},
{
"id": "60701190000104",
"cnpj": "60701190000104",
"legalName": "ITAU UNIBANCO S.A.",
"tradeName": "ITAU UNIBANCO",
"headOffice": true,
"status": "ATIVA",
"statusDate": "2005-11-03",
"statusReason": "SEM MOTIVO",
"mainActivityCode": "6421200",
"mainActivity": "Bancos comerciais",
"secondaryActivities": [],
"legalNatureCode": "2054",
"legalNature": "Sociedade Anônima Fechada",
"size": "DEMAIS",
"sizeCode": 5,
"shareCapital": 76200000000,
"openedAt": "1944-08-22",
"simplesOptant": null,
"simplesOptedAt": null,
"simplesExcludedAt": null,
"meiOptant": false,
"meiOptedAt": null,
"meiExcludedAt": null,
"streetType": "PRACA",
"street": "ALFREDO EGYDIO DE SOUZA ARANHA",
"number": "100",
"complement": "BLOCO TORRE OLAVO SETUBAL",
"district": "PARQUE JABAQUARA",
"zip": "04344902",
"city": "SAO PAULO",
"cityIbgeCode": "3550308",
"state": "SP",
"source": "minhareceita",
"sourceUpdatedAt": "2026-10",
"fetchedAt": "2026-10-22T11:02:44.866Z"
}
]

Results can be downloaded as JSON, CSV, Excel, XML or HTML from the Dataset tab, or read through the Apify API.

Input form of Brazil CNPJ Companies Scraper: Receita Federal Register Data

Besides the dataset, every run writes two records to the key-value store. RUN_SUMMARY has the counts: delivered, found, not found, left out as sole traders (with the reason), mistyped numbers, pages read, rate-limit waits, which source answered, and why the run stopped. COVERAGE has one entry per CNPJ you gave and one for the search.

Pricing

Pay per result. You pay for each company delivered to your dataset, nothing else: no subscription, no minimum, no charge for rows your filters drop or for the requests behind them.

Your Apify planPrice per 1,000 rowsPrice per row
Free plan$1.00$0.001
Starter plan$0.95$0.00095
Scale plan$0.85$0.00085
Business plan and above$0.70$0.0007

Example: 1,000 companies cost $1.00 on the Free plan and $0.70 on the Business plan. Platform usage of the run (compute, storage) is included in that price and is not billed to you separately (pay per event: the actor covers it). A start event of $0.00005 is charged once per run (Apify default). Cap your spend: set Maximum total charge in the run options. The actor stops cleanly when the cap is reached and you keep everything delivered until then. The run summary (RUN_SUMMARY in the key-value store) says why a run stopped. Check before you pay: turn on Count only to see how many rows match and what they would cost at your tier. That run delivers nothing and costs only the start event.

Not charged: a CNPJ that is not in the register, a mistyped number, a sole trader or MEI left out, a duplicate, a company already delivered in an earlier run when Only new rows is on, a count-only run, and a failed lookup.

Automation: only new rows, notifications, schedules

Only new rows since the last run. Turn on onlyNew and the actor remembers every company it delivered to you (in a key-value store named rowcraft-brazil-cnpj-companies-scraper-state in your Apify account). The next run with the same stateName skips what you already have and you pay only for new rows. The first run delivers everything that matches. Use a different stateName for each schedule or search so they keep separate memories.

Notification when the run ends. Put a webhook address in notifyUrl and the actor sends one JSON POST with the number of new rows, links to the dataset (JSON and CSV) and the run. It works out of the box with Slack and Discord incoming webhooks (the message is in text and content), with Make, n8n and Zapier catch hooks, and with your own endpoint. By default it is sent only when there is at least one new row; notifyWhenEmpty sends it every time.

Schedules. Create a schedule in Apify Console (hourly, daily, weekly or cron) with onlyNew on. A daily schedule gives you a feed of new companies for the price of the new rows only.

Integrations. Send the results to Make, n8n, Zapier, Google Sheets, Slack, Google Drive, Airtable or any webhooks from the Integrations tab of the Actor, with no code. Apify also offers native actions for Make, n8n and Zapier.

API, SDKs and AI agents. Every run is available through the Apify API and the official JavaScript and Python clients; the Actor can also be called by AI agents through the Apify MCP server. The example input in the API tab is a working call.

Count only. countOnly returns the number of matching companies and the estimated cost without delivering anything, so you can size a job before paying for it.

For this actor, Only new rows is useful for a standing search: schedule "software companies in São Paulo opened after 2025-01-01" every week and you receive only the companies that appeared since the last run.

Use cases

  • Lead lists by activity and place: every active restaurant, clinic, accountant or software house of a city, with its legal name, address, size and opening date, ready for a CRM or a Google Sheet.
  • New company monitoring: a weekly search with openedAfter and Only new rows gives the companies opened in your region and industry, for the price of the new rows.
  • Enriching a list of CNPJs: you have numbers from invoices, tenders or a customer list; get the current legal name, status, activity, size and address of each, and the numbers that are mistyped or closed are flagged.
  • Supplier and counterparty checks: is this CNPJ active, since when, with what main activity and which capital? One lookup answers in a fraction of a second.
  • Market sizing: how many active companies of an activity, in a state or a city, with a free count before you buy the rows.
  • Prospecting by size and legal nature: limited companies with large size flags, head offices only, in the states you sell to.

Ready-made examples, each with the input filled in (open one and press Start, or save it as your own task):

What this actor does not do

  • Search by company name. The free sources only filter by state, city, activity and legal nature, and the sites that search by name sit behind CAPTCHAs, which this actor does not solve. Give CNPJ numbers, or search by activity and place.
  • Deliver partners and administrators (the QSA list), representatives or any person: they are never read into a row, never logged and never searched by.
  • Deliver e-mail addresses or telephone numbers. Contact data is left out on purpose; an e-mail address typed into a trade name is removed as well.
  • Deliver sole traders, MEI, EIRELI and the other forms named after a person. Their name is the name of a person (and for MEI sometimes carries the CPF). They are skipped and counted, never delivered, never charged.
  • Give real-time data. The register is republished once a month by the Receita Federal and the services here follow it; the sourceUpdatedAt field tells which month you are reading.
  • Deliver financial statements, tax regime history, establishments of a company in one row, or debts. One row is one CNPJ with the registration data.
  • Use proxies or solve CAPTCHAs. The sources are open and need neither.

Limits and fair use

  • The search is rationed by the source. The paged search of the main service is marked "in testing" by its author and is limited per server, not per user: heavy searches (a big state with a very common activity) can be answered with HTTP 429 and "try again in 1 minute". The actor waits the time the service asks for, up to three times per page, then stops and says so: searchIncomplete: true in the run summary. What was delivered before stays; run again later or narrow the search (a state plus an activity code is the lightest).
  • Common activities are slow unless you name the legal nature. Most records of a mass-market activity are sole traders and MEI registrations, which are read and left out. In a test on 22 October 2026, a state-wide search for clothing retail in São Paulo without legal nature codes delivered about 85 companies per minute (eight of ten records skipped, a one-minute wait after most pages); the same search with legalNatureCodes set to 2062 delivered 3,000 companies in 22 seconds. The run log says so when more than six in ten records are skipped.
  • A page holds up to 1,024 records and the actor reads page by page. In a test on 22 October 2026, one page of software developers in São Paulo held 130 sole traders or MEI and 418 closed companies out of 1,024 records; the rest were delivered. Narrow searches therefore read many pages for few rows, which costs time, not money.
  • Lookups: about 0.15 to 0.25 seconds each, four in parallel, at least 150 ms between requests to the same host. A list of 10,000 numbers takes roughly half an hour.
  • Count only reads at most 100 pages (about 100,000 records) and says when the count stopped early.
  • Up to 10,000 CNPJs per run. Split longer lists.
  • The order of a search is the order of the source, not by size or date, and the same search can be repeated and resumed with Only new rows.
  • Simples and MEI dates are history fields of the register and can look odd for large companies; they are shown as published.
  • Data is as old as the last monthly update of the register. A company opened this week is not there yet.
  • The main service has no service level. It is run by one volunteer; when it is down, lookups go to the second service (the search has no second service).
  • The run stops 90 seconds before its timeout with the summary saved; for very large searches raise the timeout and use Only new rows.

Data source

The records come from the Cadastro Nacional da Pessoa Jurídica (CNPJ) of the Receita Federal do Brasil, published as open data in the national open-data portal under the Creative Commons Attribution (CC BY) licence: dados.gov.br, with the files on the Receita Federal data site. The actor does not read those files (7.8 GB a month); it reads two free public services that republish them: Minha Receita (lookup by CNPJ and the paged search; open-source, no key and no registration) and, as a fallback for lookups only, OpenCNPJ (free, commercial use allowed, no key). The documentation of the first one describes the search parameters used here: state, city, activity (main or any), legal nature, page size and cursor.

Attribution: contains data of the Receita Federal do Brasil (CNPJ open data, CC BY), served through Minha Receita or OpenCNPJ; the row says which one, and the month of the data.

This actor is independent and not affiliated with Receita Federal, minhareceita.org or OpenCNPJ, and none of them provides, endorses or guarantees it. The data is shown as published; names belong to their owners.

Privacy: no personal data

Rowcraft actors are built not to collect personal data. For the CNPJ register that needs care, because the register is full of people:

  • Partners and administrators (QSA) are never read into a row. Rows are built field by field from a fixed list of company fields; the partner list, the representatives and their CPF numbers, the e-mail address and the tax regime history of the source answer are not on the list, so they cannot reach the dataset, the logs or the run summary.
  • Sole traders and MEI are left out. For these registrations the company name is the name of a person (for MEI, sometimes with the CPF at the end). The legal natures 2135 (sole trader), 2305 and 2313 (EIRELI), 4014 (individual real-estate company), 4090 (candidate for political office) and 4120 (rural producer, individual), every MEI registration, and any answer that does not state a legal nature, are skipped before delivery, counted as excludedIndividual in the run summary, and never charged. A name that ends in a CPF-like number is skipped as well.
  • No e-mail addresses and no telephone numbers. An e-mail address or a telephone typed by an owner into a trade name or an address complement is redacted.
  • The search never filters by person. The source can search by the CPF of a partner; this actor does not offer it and never sends it.

What remains is the registered company name, which can contain a family name ("Silva Comércio Ltda"). That is the name of a legal entity as registered, but it can read like a person; judge your use of it under the law that applies to you.

Other Rowcraft actors

All Rowcraft actors read official or public sources, deliver flat rows without personal data and support only-new runs and notifications:

FAQ

Is it legal to use this data? The CNPJ register is public by law in Brazil (the Access to Information Law) and the Receita publishes it as open data under the CC BY licence, which allows copying and commercial use with attribution. The actor leaves out the records and fields that concern people. How you use the companies you receive (marketing, contact, profiling) is your responsibility under the law that applies to you, including consent and anti-spam rules; this is not legal advice.

Why are there no partners, e-mails or telephone numbers, and why no sole traders or MEI? Because they are personal data. The partner list and the contact data identify people, and for sole traders and MEI the company name is the owner's name. Rowcraft delivers company data only. If you need those fields, the rows contain the CNPJ, which you can use with sources you are entitled to.

Why is my result empty or smaller than the list I gave? Open COVERAGE and RUN_SUMMARY. Each CNPJ is found, notFound (not in the register), excludedIndividual (a sole trader or MEI), invalidInput (wrong length or check digits, no request made), error (both sources failed) or notChecked (the run stopped at your maximum or charge limit). With a search, the summary shows the records read, how many were closed (onlyActive), how many sole traders were left out, and whether the search was complete.

Why do I get HTTP 429, "incomplete search" or a long wait? The paged search of the main service is rationed per server and answers "busca muito custosa" with a wait of one minute when it is busy. The actor waits as asked, three times per page; if the service keeps refusing it stops with searchIncomplete: true and charges only the rows already delivered. Run again later, or narrow the search to a state and an activity code, and add legal nature codes such as 2062 so that sole traders are not read at all. Lookups by CNPJ have no such limit.

Can I search by company name? No. Free sources do not filter by name, and the sites that do are protected by CAPTCHAs. If you have a name, find its CNPJ first and look it up here; to find many companies, search by activity and place.

How do I find the activity code (CNAE) of a business? CNAE codes have seven digits and are listed by the national statistics institute (IBGE). 6201501 is custom software development, 5611201 restaurants, 4120400 building construction, 8630504 dental clinics, 6920601 accounting. Look at the mainActivityCode and secondaryActivities of a company you know and reuse its code.

What is the difference between "main activity" and "main or secondary"? Each company has one main CNAE and often many secondary ones. Searching the main activity finds companies whose business is that activity. Searching "main or secondary" also finds companies that merely list it, which can be many times more rows and less relevant ones.

Why are there rows with status BAIXADA or INAPTA? onlyActive is on by default for searches. If you turn it off, closed (BAIXADA), unfit (INAPTA) and suspended companies are delivered with their status and date. Companies you look up by CNPJ are always delivered with their status, because you asked for that number.

What does a CNPJ with letters mean? From July 2026 new CNPJs can contain letters. The actor accepts 14 letters and digits, but it checks the check digits only for numbers made of digits; a CNPJ with letters is validated by length only, and COVERAGE says so (validationMode: length-only).

How current is the data? It follows the monthly publication of the Receita Federal. The sourceUpdatedAt field shows the month (or the timestamp when the fallback answered).

Why does cityIbgeCode sometimes come empty? The fallback source gives the city name and its SIAFI code but not the IBGE code. Rows from the main source always have it.

How many companies can I get in one run? Without a limit, as many as the search matches, but a very broad search (a whole large state) is long and rationed by the source; split it by activity code or city and use Only new rows.

How much does it cost? $1.00 per 1,000 companies on the Free plan, less on paid plans (see Pricing). You pay only for rows delivered to your dataset; set a maximum total charge in the run options to cap a run.

How do I get the results into Slack, Google Sheets, Make, n8n or Zapier? Use the Integrations tab of the Actor for the data, and the notifyUrl field for a message when a run ends (Slack and Discord webhooks work directly; catch hooks of Make, n8n and Zapier too).

Can I call it from code or from an AI agent? Yes: through the Apify API, the JavaScript and Python clients, and the Apify MCP server. The API tab shows a working example with the input of this Actor.

Is it legal to use this data? The actor reads the official API described in the Data source section and delivers company and job data without personal data. The licence of the source is described above. How you use the data is your responsibility under the law that applies to you.

Does it collect personal data? No. Contact persons, e-mails and phone numbers are removed and fields about people are never requested. See the Privacy section.

The run finished with 0 rows. Did I pay? No: with no rows delivered nothing is charged apart from the start event. Check the run summary (RUN_SUMMARY) for warnings, widen the filters, or run with Only new rows off if everything matching was already delivered to you.

Support and reviews

Problems, missing fields, questions: open an issue on the Issues tab of this Actor. We answer within one working day and fix confirmed bugs in the next release; the changelog lists every change.

If this Actor saved you time, a short review on its page helps other users find it and helps us keep improving it.