Brazil CNPJ Lookup & Company Registry Scraper avatar

Brazil CNPJ Lookup & Company Registry Scraper

Pricing

from $0.79 / 1,000 companies

Go to Apify Store
Brazil CNPJ Lookup & Company Registry Scraper

Brazil CNPJ Lookup & Company Registry Scraper

Look up any Brazilian CNPJ or search the Receita Federal company registry by state, CNAE, city, legal form, or partner CPF. Get status, address, phones, CNAEs, capital, Simples/MEI, tax regime, and partners (QSA). Export JSON, CSV, Excel.

Pricing

from $0.79 / 1,000 companies

Rating

0.0

(0)

Developer

ParseBird

ParseBird

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Brazil CNPJ Lookup & Company Registry Scraper

Brazil CNPJ Lookup & Company Registry Scraper gets official Receita Federal company data for any Brazilian CNPJ, or searches the whole Brazilian company registry by state, CNAE activity code, municipality, legal form, or partner CPF.

Look up thousands of CNPJs in one run, or build B2B lead lists of Brazilian companies filtered by UF, CNAE, city, legal form, partner, status, and head office, with 45+ fields per company including address, phones, capital, Simples/MEI, tax regime, and the full partner list (QSA).

Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

Use Apify Actor parsebird/brazil-cnpj-scraper to get Brazilian company registry (Receita Federal CNPJ) data. Example with ApifyClient (Python): client.actor("parsebird/brazil-cnpj-scraper").call(run_input={"uf":"SP","cnae":"6209100","activeOnly":True,"maxItems":500}). Two modes. Lookup mode: cnpjs array of strings and/or cnpj string (14 digits; dots, slashes, dashes ignored; missing leading zeros added; check digits validated; search filters ignored). Search mode (needs at least one filter; each accepts comma-separated values): uf string (two-letter state codes, e.g. "SP, RJ"), cnae string (7-digit CNAE, matches primary and secondary activities), primaryCnaeOnly boolean default false, municipio string (IBGE 7-digit or SIAFI 4-digit code), naturezaJuridica string (4-digit legal-form code, e.g. 2135 Empresário Individual), partnerCpf string (full CPF, masked ***456789**, or a partner company CNPJ). Both modes: activeOnly boolean default false (status ATIVA only), headOfficeOnly boolean default false (MATRIZ only), maxItems integer default 100, pageSize integer default 500 (1-1024). Output: one row per company: cnpj, cnpj_formatado, cnpj_basico, razao_social, nome_fantasia, matriz_filial, situacao_cadastral, situacao_cadastral_motivo, data_situacao_cadastral, situacao_especial, data_situacao_especial, data_abertura, cnae_principal_codigo, cnae_principal_descricao, cnaes_secundarios [string "CODE — Description"], natureza_juridica_codigo, natureza_juridica, porte, capital_social (number, BRL), logradouro, numero, complemento, bairro, municipio, municipio_codigo_ibge, uf, cep, pais, cidade_exterior, telefone1, telefone2, fax, simples_nacional (bool or null), data_opcao_simples, data_exclusao_simples, mei (bool or null), data_opcao_mei, data_exclusao_mei, regime_tributario [string "LUCRO REAL (2021)"], ente_federativo, orgao_publico (bool), qsa [string "NAME — ROLE — id: ***123456** — entry: YYYY-MM-DD"], qsa_count, socios [{nome, cpf_cnpj, tipo, qualificacao, data_entrada, faixa_etaria, pais, representante_legal_nome, representante_legal_cpf, representante_legal_qualificacao}], ultima_atualizacao (Receita data release, YYYY-MM), source_url. API docs: https://docs.apify.com/api/client/python/ and https://docs.apify.com/api/client/js/. Token: https://console.apify.com/account/integrations.

What is Brazil CNPJ Lookup & Company Registry Scraper?

Brazil CNPJ Lookup & Company Registry Scraper is a CNPJ lookup tool and Brazil company data scraper built on the open CNPJ data that Receita Federal publishes every month. Every Brazilian company and branch has a CNPJ (Cadastro Nacional da Pessoa Jurídica), and this actor returns its registry record: legal name (razão social), trade name, registration status, opening date, CNAE activity codes, legal form, size, share capital, address, phones, Simples Nacional and MEI status, tax regime history, and the partner list (QSA).

Use it as a CNPJ API alternative: you don't need to solve the Receita Federal CAPTCHA or download and join the monthly CSV dumps yourself. The data comes from Minha Receita, an open-source project that serves the Receita Federal files through a public API.

The easiest way to try it is to open the actor, keep the prefilled search (IT support companies in the Federal District), and click Start. The prefilled run saves 20 companies in a few seconds.

What can Brazil CNPJ Lookup & Company Registry Scraper do?

  • 🔎 Look up CNPJs in bulk: paste up to 10,000 CNPJs in any format (00.000.000/0001-91, 00000000000191, or 191). Check digits are validated and duplicates removed before any request.
  • 🏢 Search the Brazilian company registry by state (UF), CNAE code, municipality (IBGE or SIAFI code), legal form (natureza jurídica), and partner CPF or CNPJ. Combine filters, and give several values per filter (SP, RJ, MG).
  • 👥 Find every company a person or company owns a stake in: enter a full CPF and the actor converts it to the masked format Receita uses, or enter a partner company's CNPJ.
  • ✅ Keep only active companies and only head offices to build clean B2B lead lists without closed companies or duplicate branches.
  • 📋 Get partner data two ways: qsa as readable strings, and socios as structured objects with role, entry date, age range, and legal representative.
  • ⏱️ Automate with Apify schedules, the Apify API, webhooks, and integrations such as Google Sheets, Make, Zapier, and Slack.
  • 📁 Export results as JSON, CSV, Excel, HTML, or XML.

What data can you extract from the Receita Federal CNPJ registry?

FieldDescription
cnpj, cnpj_formatado, cnpj_basico14-digit CNPJ, the formatted version, and the 8-digit root shared by a company's head office and branches
razao_social, nome_fantasiaLegal name and trade name
matriz_filialMATRIZ (head office) or FILIAL (branch)
situacao_cadastral, situacao_cadastral_motivo, data_situacao_cadastralStatus (ATIVA, SUSPENSA, INAPTA, BAIXADA, NULA), reason, and date
data_aberturaDate the company started operating
cnae_principal_codigo, cnae_principal_descricao, cnaes_secundariosPrimary and secondary CNAE activity codes with descriptions
natureza_juridica_codigo, natureza_juridicaLegal form code and description
porte, capital_socialSize class (MICRO EMPRESA, EMPRESA DE PEQUENO PORTE, DEMAIS) and declared share capital in BRL
logradouro, numero, complemento, bairro, cep, municipio, municipio_codigo_ibge, ufFull registered address
telefone1, telefone2, faxPhone and fax numbers with area code (DDD)
simples_nacional, mei and their datesSimples Nacional and MEI opt-in and opt-out
regime_tributarioTax regime by year, e.g. LUCRO PRESUMIDO (2022)
orgao_publico, ente_federativoPublic-administration flag and the responsible federative entity
qsa, qsa_count, sociosPartners and directors (quadro de sócios e administradores)
ultima_atualizacao, source_urlReceita Federal data release (YYYY-MM) and the record's API link

How to look up a CNPJ or search Brazilian companies

  1. Open Brazil CNPJ Lookup & Company Registry Scraper and click Try for free or Start.
  2. To look up specific companies, paste CNPJs into CNPJs to look up, one per line.
  3. To search the registry instead, leave the CNPJ fields empty and set at least one filter: State (UF), CNAE activity code, Municipality code, Legal form code, or Partner CPF or CNPJ.
  4. Optionally turn on Active companies only or Head offices only, and set Max companies.
  5. Click Start, then open the Output tab or export the results as JSON, CSV, or Excel.

Input parameters

ParameterTypeRequiredDefaultDescription
cnpjsarray of stringsNo—CNPJs to look up, up to 10,000. Turns on lookup mode
cnpjstringNo—One CNPJ to look up
ufstringNo*—State codes, comma-separated (SP, RJ); EX for companies registered abroad. Prefilled with DF
cnaestringNo*—7-digit CNAE codes, comma-separated. Prefilled with 6209100
primaryCnaeOnlybooleanNofalseMatch cnae against the primary activity only
municipiostringNo*—IBGE (7-digit) or SIAFI (4-digit) municipality codes
naturezaJuridicastringNo*—4-digit legal-form codes, e.g. 2135, 2062
partnerCpfstringNo*—Partner CPF (full or masked ***456789**) or partner company CNPJ
activeOnlybooleanNofalseSave only companies with status ATIVA
headOfficeOnlybooleanNofalseSave only head offices (MATRIZ)
maxItemsintegerNo100Maximum companies to save. Prefilled with 20
pageSizeintegerNo500Records per API page (1 to 1,024)

* Search mode needs at least one of uf, cnae, municipio, naturezaJuridica, or partnerCpf. The actor stops right away with a clear message if none is set, so you don't pay for an empty run.

Input / Output

Example input: active IT support head offices in São Paulo and Rio de Janeiro

{
"uf": "SP, RJ",
"cnae": "6209100",
"activeOnly": true,
"headOfficeOnly": true,
"maxItems": 1000
}

Example input: CNPJ lookup

{
"cnpjs": ["00.000.000/0001-91", "33.683.111/0002-80"]
}

Example input: every Empresário Individual (the legal form MEIs use) in Brasília

{
"municipio": "5300108",
"naturezaJuridica": "2135",
"maxItems": 1000
}

Example output (a real row; qsa, socios, and cnaes_secundarios shortened)

{
"cnpj": "33683111000280",
"cnpj_formatado": "33.683.111/0002-80",
"cnpj_basico": "33683111",
"razao_social": "SERVICO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO)",
"nome_fantasia": "REGIONAL BRASILIA-DF",
"matriz_filial": "FILIAL",
"situacao_cadastral": "ATIVA",
"situacao_cadastral_motivo": "SEM MOTIVO",
"data_situacao_cadastral": "2004-05-22",
"situacao_especial": "",
"data_situacao_especial": "",
"data_abertura": "1967-06-30",
"cnae_principal_codigo": "6204000",
"cnae_principal_descricao": "Consultoria em tecnologia da informação",
"cnaes_secundarios": [
"6201501 — Desenvolvimento de programas de computador sob encomenda",
"6202300 — Desenvolvimento e licenciamento de programas de computador customizáveis"
],
"natureza_juridica_codigo": "2011",
"natureza_juridica": "Empresa Pública",
"porte": "DEMAIS",
"capital_social": 1786196100,
"logradouro": "AVENIDA L2 SGAN",
"numero": "601",
"complemento": "MODULO G",
"bairro": "ASA NORTE",
"municipio": "BRASILIA",
"municipio_codigo_ibge": "5300108",
"uf": "DF",
"cep": "70836900",
"pais": "",
"cidade_exterior": "",
"telefone1": "",
"telefone2": "",
"fax": "",
"simples_nacional": null,
"data_opcao_simples": "",
"data_exclusao_simples": "",
"mei": null,
"data_opcao_mei": "",
"data_exclusao_mei": "",
"regime_tributario": [],
"ente_federativo": "",
"orgao_publico": false,
"qsa": [
"ALEXANDRE BRANDAO HENRIQUES MAIMONI — Diretor — id: ***641988** — entry: 2023-05-22",
"ANDRE PICOLI AGATTE — Diretor — id: ***035378** — entry: 2025-03-13"
],
"qsa_count": 7,
"socios": [
{
"nome": "ALEXANDRE BRANDAO HENRIQUES MAIMONI",
"cpf_cnpj": "***641988**",
"tipo": "PESSOA FISICA",
"qualificacao": "Diretor",
"data_entrada": "2023-05-22",
"faixa_etaria": "Entre 51 a 60 anos",
"pais": "",
"representante_legal_nome": "",
"representante_legal_cpf": "",
"representante_legal_qualificacao": ""
}
],
"ultima_atualizacao": "2026-09",
"source_url": "https://minhareceita.org/33683111000280"
}

Download results from the Output tab in JSON, CSV, Excel, HTML, or XML. The Console also has Address & contact and Partners (QSA) table views.

Python API example

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("parsebird/brazil-cnpj-scraper").call(
run_input={
"uf": "SP",
"cnae": "6209100",
"activeOnly": True,
"headOfficeOnly": True,
"maxItems": 500,
}
)
for company in client.dataset(run["defaultDatasetId"]).iterate_items():
print(company["cnpj_formatado"], company["razao_social"], company["municipio"], company["telefone1"])

JavaScript API example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('parsebird/brazil-cnpj-scraper').call({
cnpjs: ['00.000.000/0001-91', '33.683.111/0002-80'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const c of items) {
console.log(c.cnpj_formatado, c.razao_social, c.situacao_cadastral, `${c.qsa_count} partners`);
}

See the Python client docs and JavaScript client docs for more options.

Use cases

  • B2B lead generation in Brazil: list active companies by CNAE and state, with address and phone, for sales prospecting.
  • KYC and supplier checks: confirm a supplier's CNPJ is ATIVA, check its legal form, capital, and who the partners are.
  • CRM enrichment: add legal name, CNAE, size, and address to the CNPJs already in your database.
  • Ownership research: find every company where a person or holding company is a partner.
  • Market research: count companies by activity, city, size, or Simples Nacional status.
  • Monitoring: schedule weekly runs on your client or supplier CNPJs to catch status changes such as INAPTA or BAIXADA.

How it works

  1. In lookup mode, the actor cleans and validates each CNPJ, then fetches the registry record for each one.
  2. In search mode, it sends your filters to the registry search and follows its pages until it reaches Max companies or there are no more matches.
  3. Each record is flattened into one row: nested activity codes, tax regimes, and partners become readable strings, and partners are also kept as structured objects.
  4. Rows are saved to the dataset as each page arrives, so you can stop a run at any time and keep what was collected.

How much does it cost to look up a CNPJ?

What is the price per Brazilian company record?

The actor uses pay-per-event pricing: you pay per company saved, and platform usage is included.

EventFree planBronzeSilverGold
company-scraped$0.00099 ($0.99 / 1,000)$0.00089 ($0.89 / 1,000)$0.00079 ($0.79 / 1,000)$0.00079 ($0.79 / 1,000)

One company-scraped event is one company row in the dataset. CNPJs that are invalid or not found, and companies skipped by Active companies only or Head offices only, are not charged. The prefilled 20-company run costs about $0.02 on the Free plan, and 10,000 companies cost $9.90. Apify's free plan includes monthly platform credits you can use to try the actor.

Is CNPJ data public?

Yes. Receita Federal publishes the CNPJ registry as open data under Brazil's Access to Information Law (Lei de Acesso à Informação), and partner CPFs are already masked in the source. Partner names are still personal data protected by Brazil's LGPD, so have a legitimate purpose for collecting them and handle them accordingly. Consult your lawyer if unsure. Read more in Apify's guide: Is web scraping legal?

ActorBest for
UK Companies House ScraperUK company registry data
Zefix.ch ScraperSwiss commercial register
FirmenABC.at ScraperAustrian company directory
Owler Company ScraperCompany profiles, revenue, and competitors
BBB ScraperUS business profiles and ratings

FAQ

Where does the data come from, and how fresh is it? From the open CNPJ files Receita Federal publishes monthly, served by Minha Receita. Every row's ultima_atualizacao shows which release it comes from (for example 2026-09).

Can I search the whole registry with no filter? No. The registry search needs at least one filter, so the actor asks for one before starting. Add a state or a CNAE code to any search.

How do I search by partner CPF? Enter a full CPF such as 123.456.789-01 and the actor converts it to Receita's masked format ***456789**, or enter the masked value directly. Because only six digits are kept, different people can share the same masked CPF; check the partner name in qsa. For a partner company, enter its CNPJ. Adding a state makes partner searches faster.

Does it return email addresses? No. The public registry data this actor reads does not include email addresses, so there's no email field.

Why are simples_nacional and mei sometimes null? null means the registry has no Simples Nacional or MEI record for the company, which is common for large companies and branches.

Does it support the new alphanumeric CNPJ? Yes. Letters are accepted in the first 12 characters and the check digits are validated with Receita's alphanumeric rule.

How fast is it? Search results come in pages of up to 1,024 companies. In our tests a 5,000-company search finished in under 30 seconds.

Can I run it on a schedule or from my app? Yes. Use Apify schedules, call it from the API tab, or connect it to Make, Zapier, Google Sheets, or Slack through integrations.

Where can I report issues? Open the Issues tab on the actor page with your input and run ID.