Brazil CNPJ Data Scraper
Pricing
from $7.00 / 1,000 results
Brazil CNPJ Data Scraper
Collect public Brazilian company registration data by CNPJ, including legal name, registration status, CNAE activities, address, email and partners. The Actor queries BrasilAPI first and can use publica.cnpj.ws as a fallback when BrasilAPI is unavailable.
Pricing
from $7.00 / 1,000 results
Rating
0.0
(0)
Developer
Axiom Works
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Returns: one row per Brazilian company (CNPJ) with cnpj, legalName, status, openingDate, mainActivityDescription, city, email, partners.
Input: {"cnpjs": ["33.000.167/0001-01", "00000000000191"], "maxItems": 50}
Best for: KYC and supplier checks, enriching lead lists of Brazilian companies, monitoring whether a company is still active.
{"cnpj": "33000167000101","legalName": "PETROLEO BRASILEIRO S A PETROBRAS","tradeName": "PETROBRAS - EDISE","status": "ATIVA","openingDate": "1966-09-28","mainActivityDescription": "Extração de petróleo e gás natural","city": "RIO DE JANEIRO","email": "cc-rfisc@petrobras.com.br"}
What does Brazil CNPJ Company Scraper do?
Brazil CNPJ Company Scraper looks up Brazilian companies by their CNPJ number (Cadastro Nacional da Pessoa Jurídica) and returns the public registration data that Receita Federal, Brazil's federal tax authority, publishes as open data. Give it a list of CNPJs in any format and you get back one clean, structured record per company: legal name (razão social), trade name (nome fantasia), registration status, opening date, main and secondary CNAE activities, legal nature, company size, share capital, Simples Nacional and MEI options, full address, phone numbers, email and the partners and directors (QSA).
It works as a Brazil CNPJ API without an API key: the Actor reads two free public CNPJ APIs, BrasilAPI first and publica.cnpj.ws as a fallback when BrasilAPI's upstream is down. BrasilAPI does not publish the email registered at Receita Federal, so by default the Actor also asks publica.cnpj.ws for each company's email (turn completeEmail off for a faster run without emails). No login and no account on either service is needed. Every CNPJ is checked locally first (length and the two mod-11 check digits), so typos never cost a request or a charge.
Use this Brazil CNPJ scraper for supplier onboarding, CRM enrichment, partner lookup and recurring registration-status monitoring.
What data can you get from a Brazil CNPJ lookup?
| Field | Description | Example |
|---|---|---|
id | Record id: the 14-digit CNPJ | 33000167000101 |
cnpj | 14-digit CNPJ as the source returns it | 33000167000101 |
cnpjFormatted | CNPJ as NN.NNN.NNN/NNNN-NN | 33.000.167/0001-01 |
legalName | Registered legal name (razão social) | PETROLEO BRASILEIRO S A PETROBRAS |
tradeName | Trade name (nome fantasia), null when none | PETROBRAS - EDISE |
status | Registration status: ATIVA, BAIXADA, INAPTA, SUSPENSA or NULA | ATIVA |
statusDate | Date the current status took effect | 2005-11-03 |
statusReason | Reason for the status, when given | SEM MOTIVO |
openingDate | Date the company started activity | 1966-09-28 |
headOrBranch | MATRIZ (head office) or FILIAL (branch) | MATRIZ |
mainActivityCode | Main CNAE code, 7 digits | 0600001 |
mainActivityDescription | Main CNAE activity | Extração de petróleo e gás natural |
secondaryActivities | Secondary CNAE activities as code + description | [{"code": "1921700", ...}] |
legalNatureCode | Legal nature code | 2038 |
legalNature | Legal nature (natureza jurídica) | Sociedade de Economia Mista |
companySize | Size class (porte): MICRO EMPRESA, EMPRESA DE PEQUENO PORTE, DEMAIS | DEMAIS |
shareCapital | Share capital in BRL | 205431960000 |
simplesNacional | In the Simples Nacional tax regime: true, false, or null when unknown | false |
mei | Registered as MEI (microempreendedor individual): true, false, or null when unknown | false |
simplesOptInDate | Source-reported Simples enrollment date | 2010-08-07 |
simplesExclusionDate | Source-reported Simples exclusion date | 2013-06-17 |
meiOptInDate | Source-reported MEI enrollment date | 2010-08-07 |
meiExclusionDate | Source-reported MEI exclusion date | 2013-06-17 |
streetType | Street type | AVENIDA |
street | Street name | REPUBLICA DO CHILE |
number | Street number as registered (may be S/N) | 65 |
complement | Address complement | ANDAR 10 |
neighborhood | Neighborhood (bairro) | CENTRO |
city | City | RIO DE JANEIRO |
state | Two-letter state code (UF) | RJ |
zipCode | CEP, 8 digits | 20031170 |
cityIbgeCode | IBGE city code | 3304557 |
phone1 | First phone with area code | 2121660000 |
phone2 | Second phone with area code | null |
email | Email registered at Receita Federal, null when none | cc-rfisc@petrobras.com.br |
partners | Partners and directors (QSA): name, qualification, entry date, age range, masked document | [{"name": "...", ...}] |
partnersCount | Number of partners listed | 8 |
dataSource | Which API answered: brasilapi or cnpj.ws | brasilapi |
sourceUrl | The API endpoint the record came from | https://brasilapi.com.br/api/cnpj/v1/33000167000101 |
scrapedAt | Time of the lookup (ISO 8601) | 2026-10-14T19:10:34.856Z |
simplesNacional and mei come from the register's Simples Nacional record when the company has one. When it has none, they are false if the company cannot be in the regime by law (Simples Nacional is open only to micro and small companies, so size class DEMAIS rules it out, and a MEI is always an "Empresário (Individual)", legal nature 2135) and null otherwise. Free-text values (names, addresses, activity descriptions) are copied exactly as the answering source writes them. BrasilAPI writes cities in upper case without accents (SAO PAULO), cnpj.ws writes them with accents (São Paulo); dataSource tells you which one you got. Status, head office or branch, and company size are always upper case so you can filter on them directly.
How to use Brazil CNPJ Company Scraper
- Open Brazil CNPJ Company Scraper in Apify Console and go to the Input tab.
- Paste your CNPJs into the CNPJs field, one per line. Any format works:
33.000.167/0001-01,33000167000101or33 000 167 0001 01. Short numbers are left-padded with zeros, so191becomes00000000000191. - Set Maximum results if you want to cap the run. The limit counts records across the whole list.
- Click Start. Records appear on the Output tab as they arrive. Export them as JSON, CSV, Excel, XML or HTML, or read them through the API.
Duplicates in the list are looked up once. Numbers with wrong check digits are skipped with a warning in the log and are never requested or charged. If every supplied number is invalid, the run finishes successfully with zero records and a status message asking you to check the CNPJs. A missing or empty target list still fails input validation. A CNPJ that is valid but not registered (or was never issued) returns no record; the run still finishes successfully and its status message lists the CNPJs that were not found.
Speed depends on the sources. BrasilAPI answers in well under a second. publica.cnpj.ws allows 3 lookups per minute, and it is used in two cases: for every company's email while completeEmail is on (the default), and for the whole record when BrasilAPI's upstream is down. So a default run of 30 CNPJs takes about 10 minutes, and the log tells you when the Actor is waiting for the limit. If you do not need emails, set completeEmail to false and a list of 30 CNPJs finishes in seconds whenever BrasilAPI is up.
You can schedule the Actor (for example weekly) with the same list and compare status between runs to catch companies that closed or became irregular.
Input
The cnpjs list also accepts endpoint URLs, for example https://brasilapi.com.br/api/cnpj/v1/12345678000195/ or https://publica.cnpj.ws/cnpj/19131243000197. The Actor extracts the CNPJ locally, validates its check digits, and uses the same primary and fallback sources. It does not fetch arbitrary pasted URLs. URL and numeric forms of the same CNPJ are deduplicated together. Historical Simples and MEI dates are nullable and do not establish current enrollment; use the existing boolean fields for that.
| Field | Type | Required | Description |
|---|---|---|---|
cnpjs | array of strings | Yes | CNPJ numbers to look up, in any format. Invalid check digits are skipped without a request. |
maxItems | integer | No | Maximum number of company records to return across all CNPJs, 1-10000, default 50. |
useFallbackSource | boolean | No | Default true. Look a CNPJ up on publica.cnpj.ws when BrasilAPI cannot answer. Slower: 3 lookups per minute. |
completeEmail | boolean | No | Default true. Fill email from publica.cnpj.ws for every company, since BrasilAPI does not publish it. 3 lookups per minute; set false for a fast run without emails. |
proxyConfiguration | object | No | Proxy settings. Default: no proxy. Both sources are public APIs; use a proxy only if lookups get blocked. |
{"cnpjs": ["33.000.167/0001-01","00000000000191","60.746.948/0001-12"],"maxItems": 50,"useFallbackSource": true,"completeEmail": true,"proxyConfiguration": { "useApifyProxy": false }}
Output
Each company is one item in the run's dataset. These two records come from a real run (partner and activity lists shortened):
[{"id": "33000167000101","cnpj": "33000167000101","cnpjFormatted": "33.000.167/0001-01","legalName": "PETROLEO BRASILEIRO S A PETROBRAS","tradeName": "PETROBRAS - EDISE","status": "ATIVA","statusDate": "2005-11-03","statusReason": "SEM MOTIVO","openingDate": "1966-09-28","headOrBranch": "MATRIZ","mainActivityCode": "0600001","mainActivityDescription": "Extração de petróleo e gás natural","secondaryActivities": [{ "code": "1921700", "description": "Fabricação de produtos do refino de petróleo" }],"legalNatureCode": "2038","legalNature": "Sociedade de Economia Mista","companySize": "DEMAIS","shareCapital": 205431960000,"simplesNacional": false,"mei": false,"streetType": "AVENIDA","street": "REPUBLICA DO CHILE","number": "65","complement": null,"neighborhood": "CENTRO","city": "RIO DE JANEIRO","state": "RJ","zipCode": "20031170","cityIbgeCode": "3304557","phone1": "2121660000","phone2": null,"email": "cc-rfisc@petrobras.com.br","partners": [{"name": "ANGELICA GARCIA COBAS LAUREANO","qualification": "Diretor","entryDate": "2025-07-29","ageRange": "Entre 71 a 80 anos","document": "***912137**"}],"partnersCount": 8,"dataSource": "brasilapi","sourceUrl": "https://brasilapi.com.br/api/cnpj/v1/33000167000101","scrapedAt": "2026-10-14T19:10:34.856Z"},{"id": "00000000000191","cnpj": "00000000000191","cnpjFormatted": "00.000.000/0001-91","legalName": "BANCO DO BRASIL SA","tradeName": "DIRECAO GERAL","status": "ATIVA","statusDate": "2005-11-03","openingDate": "1966-08-01","headOrBranch": "MATRIZ","mainActivityCode": "6422100","mainActivityDescription": "Bancos múltiplos, com carteira comercial","legalNature": "Sociedade de Economia Mista","companySize": "DEMAIS","shareCapital": 120000000000,"simplesNacional": false,"mei": false,"streetType": "QUADRA","street": "SAUN QUADRA 5 BLOCO B TORRE I, II, III","number": "SN","neighborhood": "ASA NORTE","city": "BRASILIA","state": "DF","zipCode": "70040912","cityIbgeCode": "5300108","phone1": "6134939002","email": "secex@bb.com.br","partnersCount": 41,"dataSource": "brasilapi","sourceUrl": "https://brasilapi.com.br/api/cnpj/v1/00000000000191"}]
How much does it cost to look up Brazilian CNPJs?
Brazil CNPJ Company Scraper is charged per result: one company record returned is one result. CNPJs that are invalid, not found or that fail are not charged. maxItems caps how many records a run can return, and so caps what a run can cost. You can also set a maximum cost per run in the run options; the Actor then stops cleanly when that limit is reached and keeps everything it already saved. See the Pricing tab for the current price.
Use with AI agents (MCP)
Connect Brazil CNPJ Company Scraper to Claude, Cursor or any MCP client through the Apify MCP server:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?tools=axiomworks/brazil-cnpj-company-scraper"}}}
Example prompts:
- "Look up CNPJ 33.000.167/0001-01 and tell me the company's status, opening date and who its directors are."
- "Here are 20 CNPJs from our supplier list. Which of them are not ATIVA, and since when?"
- "Get the main CNAE activity, company size and city for these CNPJs and put them in a table."
The agent sees the input fields and their descriptions, so it can pass CNPJs in any format.
Integrations and API
Run Brazil CNPJ Company Scraper from your own code with the Apify API. Set APIFY_TOKEN to your Apify API token (send it in the Authorization header, never in the URL).
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("axiomworks/brazil-cnpj-company-scraper").call(run_input={"cnpjs": ["33.000.167/0001-01", "00000000000191"], "maxItems": 50})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["cnpjFormatted"], item["legalName"], item["status"])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });const run = await client.actor('axiomworks/brazil-cnpj-company-scraper').call({cnpjs: ['33.000.167/0001-01', '00000000000191'],maxItems: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();
cURL
curl -X POST "https://api.apify.com/v2/acts/axiomworks~brazil-cnpj-company-scraper/run-sync-get-dataset-items" \-H "Authorization: Bearer $APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"cnpjs": ["33.000.167/0001-01", "00000000000191"], "maxItems": 50}'
The Integrations tab connects the Actor to Make, Zapier, n8n, Google Sheets, Slack and webhooks, so records flow straight into a spreadsheet or CRM after each run.
FAQ
Which CNPJ formats are accepted?
Any format with the 14 digits: with dots, slash and dash (33.000.167/0001-01), digits only (33000167000101) or with spaces. Non-digit characters are removed and short numbers are padded with leading zeros.
Why was one of my CNPJs skipped? Either its check digits are wrong (the log says "not a valid CNPJ", and no request was made), or the number is valid but not registered at Receita Federal (the log says "not found"). Neither is charged. The final status message lists the CNPJs that were not found or invalid.
Can I look up branches (filiais)?
Yes. Every establishment has its own CNPJ: the head office ends in 0001, branches in 0002, 0003 and so on. Look up the branch CNPJ and headOrBranch is FILIAL, with the branch's own address and phone.
How fresh is the data? Both sources republish Receita Federal's open CNPJ data, which Receita Federal updates about once a month. A change filed this week may not appear yet.
Why are some runs slower than others?
publica.cnpj.ws allows 3 lookups per minute, and the default run asks it for every company's email. Set completeEmail to false for a fast run without emails, and useFallbackSource to false to skip CNPJs that BrasilAPI cannot answer instead of waiting.
Are partners' CPF numbers included?
Only in the masked form the sources publish (***912137**). The Actor never tries to unmask them.
Why is email null?
Receita Federal has no email on file for that company, or completeEmail was off and the record came from BrasilAPI, which does not publish emails.
How are simplesNacional and mei decided?
From the register's Simples Nacional record when the company has one. Without a record they are false when the law rules the regime out (size class DEMAIS, or a legal nature other than Empresário Individual for MEI) and null when the company could be in it but the register does not say.
Can I get a whole list of companies by city or activity? No. This Actor looks up CNPJs you already have. It does not search the register by name, city or CNAE.
Is it legal to scrape Brazil CNPJ data?
The Actor reads only public data: Receita Federal publishes the CNPJ register as open data, and BrasilAPI and publica.cnpj.ws serve it through free public APIs without a login. Partner names, age ranges and masked CPFs are part of that public register. Some sole-proprietor company names contain the owner's name, because that is how they are registered. Brazil's data protection law (LGPD) applies to how you use personal data, so use the records for legitimate purposes such as due diligence and keep only what you need. This is not legal advice.
Brazil CNPJ Company Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by Receita Federal, BrasilAPI or CNPJ.ws.
Feedback
Found a bug or need a field that isn't here? Open an issue on the Issues tab and we'll look at it.