Brazil CNPJ Data Scraper avatar

Brazil CNPJ Data Scraper

Pricing

from $7.00 / 1,000 results

Go to Apify Store
Brazil CNPJ Data Scraper

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

Axiom Works

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

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?

FieldDescriptionExample
idRecord id: the 14-digit CNPJ33000167000101
cnpj14-digit CNPJ as the source returns it33000167000101
cnpjFormattedCNPJ as NN.NNN.NNN/NNNN-NN33.000.167/0001-01
legalNameRegistered legal name (razão social)PETROLEO BRASILEIRO S A PETROBRAS
tradeNameTrade name (nome fantasia), null when nonePETROBRAS - EDISE
statusRegistration status: ATIVA, BAIXADA, INAPTA, SUSPENSA or NULAATIVA
statusDateDate the current status took effect2005-11-03
statusReasonReason for the status, when givenSEM MOTIVO
openingDateDate the company started activity1966-09-28
headOrBranchMATRIZ (head office) or FILIAL (branch)MATRIZ
mainActivityCodeMain CNAE code, 7 digits0600001
mainActivityDescriptionMain CNAE activityExtração de petróleo e gás natural
secondaryActivitiesSecondary CNAE activities as code + description[{"code": "1921700", ...}]
legalNatureCodeLegal nature code2038
legalNatureLegal nature (natureza jurídica)Sociedade de Economia Mista
companySizeSize class (porte): MICRO EMPRESA, EMPRESA DE PEQUENO PORTE, DEMAISDEMAIS
shareCapitalShare capital in BRL205431960000
simplesNacionalIn the Simples Nacional tax regime: true, false, or null when unknownfalse
meiRegistered as MEI (microempreendedor individual): true, false, or null when unknownfalse
simplesOptInDateSource-reported Simples enrollment date2010-08-07
simplesExclusionDateSource-reported Simples exclusion date2013-06-17
meiOptInDateSource-reported MEI enrollment date2010-08-07
meiExclusionDateSource-reported MEI exclusion date2013-06-17
streetTypeStreet typeAVENIDA
streetStreet nameREPUBLICA DO CHILE
numberStreet number as registered (may be S/N)65
complementAddress complementANDAR 10
neighborhoodNeighborhood (bairro)CENTRO
cityCityRIO DE JANEIRO
stateTwo-letter state code (UF)RJ
zipCodeCEP, 8 digits20031170
cityIbgeCodeIBGE city code3304557
phone1First phone with area code2121660000
phone2Second phone with area codenull
emailEmail registered at Receita Federal, null when nonecc-rfisc@petrobras.com.br
partnersPartners and directors (QSA): name, qualification, entry date, age range, masked document[{"name": "...", ...}]
partnersCountNumber of partners listed8
dataSourceWhich API answered: brasilapi or cnpj.wsbrasilapi
sourceUrlThe API endpoint the record came fromhttps://brasilapi.com.br/api/cnpj/v1/33000167000101
scrapedAtTime 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

  1. Open Brazil CNPJ Company Scraper in Apify Console and go to the Input tab.
  2. Paste your CNPJs into the CNPJs field, one per line. Any format works: 33.000.167/0001-01, 33000167000101 or 33 000 167 0001 01. Short numbers are left-padded with zeros, so 191 becomes 00000000000191.
  3. Set Maximum results if you want to cap the run. The limit counts records across the whole list.
  4. 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.

FieldTypeRequiredDescription
cnpjsarray of stringsYesCNPJ numbers to look up, in any format. Invalid check digits are skipped without a request.
maxItemsintegerNoMaximum number of company records to return across all CNPJs, 1-10000, default 50.
useFallbackSourcebooleanNoDefault true. Look a CNPJ up on publica.cnpj.ws when BrasilAPI cannot answer. Slower: 3 lookups per minute.
completeEmailbooleanNoDefault 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.
proxyConfigurationobjectNoProxy 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:

  1. "Look up CNPJ 33.000.167/0001-01 and tell me the company's status, opening date and who its directors are."
  2. "Here are 20 CNPJs from our supplier list. Which of them are not ATIVA, and since when?"
  3. "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 ApifyClient
client = 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.

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.