CNPJ Lead Scraper API - Find Brazilian Companies by Segment avatar

CNPJ Lead Scraper API - Find Brazilian Companies by Segment

Pricing

from $10.00 / 1,000 leads

Go to Apify Store
CNPJ Lead Scraper API - Find Brazilian Companies by Segment

CNPJ Lead Scraper API - Find Brazilian Companies by Segment

Search 55M+ Brazilian companies by CNAE segment, state and size. Get legal name, address, phone, email and QSA shareholders from the official CNPJ registry. Export to JSON, CSV or Excel, or call the Batch API. Pay only per result returned. CNAE list: https://brasildados.org/lista-cnaes/

Pricing

from $10.00 / 1,000 leads

Rating

5.0

(2)

Developer

Actor stats

3

Bookmarked

193

Total users

27

Monthly active users

5 days ago

Last modified

Share

🔎 Brazil Company Lead Search by CNAE and State

Build B2B lead lists of Brazilian companies straight from the official Receita Federal registry: pick an industry (CNAE code), one or more states, company size and status, and get each company's CNPJ (Tax ID), legal name, address, phone, email, activities and shareholders (QSA). Up to 500 companies per run, downloadable as Excel, CSV or JSON.

💡 What is a CNPJ? It is the Brazilian company Tax ID (like the EIN in the US or the VAT number in Europe). Every company and every branch in Brazil has one, written as 00.000.000/0000-00.

💡 What is a CNAE? It is the official Brazilian industry code (7 digits). 6201501 means custom software development, for example. The full list is at brasildados.org/lista-cnaes.

No coding needed. Choose the filters in the form, click Start, and export the table. Developers can call the same actor through the API (see the end of this page).

  • ⚡ Fast: searches for up to 49 companies come back in seconds.
  • 🎯 Targeted: combine industry, state, company size and registration status.
  • ✅ Forgiving input: CNAE with or without the IBGE mask (6201501 or 6201-5/01).
  • 💸 Fair billing: you pay only for companies delivered. A search with no match delivers nothing and bills no leads.

Already have a list of CNPJs (Tax IDs)? Use CNPJ Data Enrichment instead.


🚀 How to use it in 5 steps (no code)

  1. Open the Input tab of this actor.
  2. In Economic activity codes (CNAE), paste the CNAE codes of the industry you want, one per line (or leave it empty for any industry).
  3. Choose the states, the company size and the registration status (02 — Active is the default).
  4. Set Maximum results (1 to 500) and click Start.
  5. Open the Output tab (or Dataset) and click Export → Excel (XLSX), CSV or JSON.

📋 Copy and paste to try it now

Copy the 2 lines below and paste them into the Economic activity codes (CNAE) field, choose São Paulo (SP) in the states field and set Maximum results to 10:

6201501
6204000

⚠️ One CNAE per line. Do not separate them with commas on the same line: a line like 6201501, 6204000 is read as a single invalid code and skipped.

✅ Which CNAE values are accepted?

What you pasteWhat happens
6201501✅ Accepted
6201-5/01 (IBGE mask)✅ Accepted (punctuation is removed)
0111301 or 111301✅ Accepted (leading zero added)
6201501 twice✅ Searched once
62015 (5-digit class)⏭️ Skipped with a warning: use the 7-digit subclass
9999999 (code that does not exist)⏭️ Skipped with a warning
6201501, 6204000 (two on one line)⏭️ Skipped: one CNAE per line
Only invalid codes❌ Nothing is searched and no lead is billed (searching without the filter would bring any industry)

Invalid codes never stop the run when at least one valid code is left: the actor drops them at the start and searches with the valid ones. The CNAE filter matches the company's main activity.

🏬 Headquarters and branches: each branch has its own CNPJ (Tax ID), so results can include both. The matriz column tells them apart.


⚙️ Input

All fields are optional.

FieldWhat it isExample
Economic activity codes (CNAE) (cnaes)7-digit CNAE subclasses, one per line. Empty = any industry6201501
Brazilian state filters (UF) (uf)One or more states. Empty = all of BrazilSP
Company size (porte)01 micro (ME), 03 small (EPP), 05 medium or large. Empty = any size01
Registration status (situacaoCadastral)02 active (default), 01 voided, 03 suspended, 04 unfit, 08 closed, all every status02
Maximum results (maxResults)How many companies to return, from 1 to 500 (default 100)100

The same input in JSON (for the JSON view of the Input tab or for the API):

{
"cnaes": ["6201501", "6204000"],
"uf": ["SP"],
"porte": [],
"situacaoCadastral": "02",
"maxResults": 100
}

Need more than 500 companies? Split the search into several runs, for example one per state or one per CNAE.


📊 Output: what each column means

You get one row per company (establishment) found. In Excel, each item below becomes a column.

🏷️ Identity and status

ColumnWhat it meansExample
cnpjCNPJ (Tax ID), digits only53113791000122
cnpjFormatadoCNPJ (Tax ID) with punctuation, easier to read53.113.791/0001-22
matriztrue = headquarters, false = branchtrue
razaoSocialLegal (registered) nameTOTVS S.A.
nomeFantasiaTrade nameTOTVS
situacaoCadastral / situacaoCadastralDescricaoRegistration status code and name (Ativa = active)02 / Ativa
dataSituacaoCadastralDate the current status started2005-11-03
dataInicioAtividadeOpening date1983-12-13
consultadoEmWhen this search ran2026-10-24T15:14:42.210Z

🏛️ Company profile

ColumnWhat it meansExample
naturezaJuridica / naturezaJuridicaDescricaoLegal nature code and name (LTDA, S.A., MEI...)2046 / Sociedade Anônima Aberta
porte / porteDescricaoCompany size code and name (ME = micro, EPP = small, Demais = other)05 / Demais
capitalSocialShare capital in BRL, as text2962584687.27
capitalSocialNumericoShare capital in BRL, as a number (for formulas)2962584687.27
enteFederativoGovernment entity, for public companiesnull

📈 Activity (CNAE)

ColumnWhat it meansExample
cnaePrincipalMain activity: code and description6201-5/01 · Desenvolvimento de programas de computador sob encomenda
cnaesSecundariosList of secondary activities (code and description)6204-0/00 · Consultoria em tecnologia da informação
totalCnaesSecundariosHow many secondary activities9

📍 Address and contact

ColumnWhat it meansExample
logradouroStreetAvenida Braz Leme
numeroStreet number (hidden as *** for privacy)***
complementoAddress complement (floor, suite)Andar 2
bairroNeighborhoodCasa Verde
cepZIP code (CEP)02511000
municipioNome / municipioCodigoCity name and IBGE city codeSão Paulo / 3550308
ufStateSP
paisDescricao / paisCountry name and codeBrasil / 76
enderecoCompletoFull address in one line, ready to useAvenida Braz Leme, ***, Casa Verde, São Paulo/SP, CEP 02511-000
telefone1 / telefone2Phones declared in the registry (area code + number)1140040015
emailEmail declared in the registrycontato@empresa.com.br

☎️ Phone and email are filled in by the company itself at the registry, so they are not always present.

👥 Shareholders (QSA) and ready-made indicators

ColumnWhat it meansExample
sociosList of shareholders and administrators (see below)—
totalSociosHow many shareholders8
tempoMedioSociosDiasAverage time shareholders have been in the company, in days3306
idadeEmpresaAnos / idadeEmpresaDiasCompany age in years and days42 / 15593
tempoSituacaoAtualDiasDays in the current registration status7597

Each shareholder in socios has:

FieldWhat it meansExample
nomeName (individuals show only the first name)Carlos ******
tipo / tipoDescricao1 = company, 2 = individual2 / Pessoa Física
documentoCPF as published by Receita Federal (already masked), or the partner's CNPJ (Tax ID)***123456**
qualificacao / qualificacaoDescricaoRole code and name10 / Diretor
dataEntradaDate joined the company2009-05-28
faixaEtariaDescricaoAge range41-50

🧾 Full example of one record

[
{
"cnpj": "53113791000122",
"cnpjFormatado": "53.113.791/0001-22",
"matriz": true,
"consultadoEm": "2026-10-24T15:14:42.210Z",
"razaoSocial": "TOTVS S.A.",
"nomeFantasia": null,
"naturezaJuridica": "2046",
"naturezaJuridicaDescricao": "Sociedade Anônima Aberta",
"capitalSocial": "2962584687.27",
"capitalSocialNumerico": 2962584687.27,
"porte": "05",
"porteDescricao": "Demais",
"enteFederativo": null,
"situacaoCadastral": "02",
"situacaoCadastralDescricao": "Ativa",
"dataSituacaoCadastral": "2005-11-03",
"dataInicioAtividade": "1983-12-13",
"cnaePrincipal": {
"codigo": "6201-5/01",
"descricao": "Desenvolvimento de programas de computador sob encomenda"
},
"cnaesSecundarios": [
{
"codigo": "6204-0/00",
"descricao": "Consultoria em tecnologia da informação"
},
{
"codigo": "6203-1/00",
"descricao": "Desenvolvimento e licenciamento de programas de computador não-customizáveis"
}
],
"logradouro": "Avenida Braz Leme",
"numero": "***",
"complemento": null,
"bairro": "Casa Verde",
"cep": "02511000",
"uf": "SP",
"municipioCodigo": "3550308",
"municipioNome": "São Paulo",
"pais": "76",
"paisDescricao": "Brasil",
"telefone1": "1140040015",
"telefone2": null,
"email": "contato@empresa.com.br",
"enderecoCompleto": "Avenida Braz Leme, ***, Casa Verde, São Paulo/SP, CEP 02511-000",
"idadeEmpresaAnos": 42,
"idadeEmpresaDias": 15593,
"tempoSituacaoAtualDias": 7597,
"totalSocios": 8,
"totalCnaesSecundarios": 9,
"tempoMedioSociosDias": 3306,
"socios": [
{
"nome": "Carlos ******",
"tipo": "2",
"tipoDescricao": "Pessoa Física",
"documento": "***123456**",
"qualificacao": "10",
"qualificacaoDescricao": "Diretor",
"dataEntrada": "2009-05-28",
"faixaEtariaDescricao": "41-50"
}
]
}
]

The lists cnaesSecundarios and socios were shortened in this example. The Dataset schema tab lists every field with its type and description.

📑 Tip for Excel: the Output tab opens on an overview with the main columns. Choose the All fields view to see every column.

📗 Ready-made spreadsheets

In the normal export, each company is one row and its shareholders and secondary activities are squeezed into extra columns. If you need one clean table of partners or one table of activities, pick a ready-made view before exporting:

ViewOne row perColumns
OverviewcompanyCNPJ (Tax ID), legal name, status, age, size, capital, city, state, partners, email, phone
All fieldscompanyall 40 columns
Shareholders (one row per partner)partnerCNPJ (Tax ID), legal name, partner, type, document, role, since, age range
Secondary CNAEs (one row per activity)secondary activityCNPJ (Tax ID), legal name, CNAE code, activity

How to download: open the Output tab of the run → choose the view at the top of the table → Export → Excel (XLSX) or CSV.

Via API, add view to the dataset items URL, for example &view=socios&format=xlsx (or view=cnaes).


🎯 What people use it for

  • 🎯 B2B prospecting: a list of companies in one industry and region, ready for the sales team.
  • 🗺️ Market mapping: see which companies operate in a CNAE segment, state by state.
  • 🤝 Supplier and partner discovery: find distributors, service providers or technology partners.
  • 🧩 CRM loading: import the spreadsheet into HubSpot, Salesforce or Pipedrive.
  • 🔁 New companies: repeat the same search on a schedule to catch newly opened companies.

💰 Pricing

Pay per result: you are charged per company (lead) delivered in the Dataset, plus a small fee per run. A search with no match delivers nothing and bills no leads. The current rates are on the Pricing tab.


❓ FAQ

Where do I find the CNAE code of an industry?

At brasildados.org/lista-cnaes you can search all 1,332 subclasses by name and copy the code.

Can I search without a CNAE?

Yes. Leave the field empty and the search uses only the other filters (state, size, status). Keep Maximum results at a sensible value, since a broad search matches many companies.

How do I get more than 500 companies?

Run the search several times, splitting it by state or by CNAE. Each run returns up to 500.

Do I get only active companies?

By default, yes (status 02 — Active). Choose another status, or all, if you also need suspended, unfit or closed companies.

Are phone and email always present?

No. They are filled in by the company itself at the registry, and many companies leave them blank or outdated.

How recent is the data?

Records come from the Receita Federal registry, kept up to date by the data provider. The consultadoEm column shows when the search ran.

Yes. CNPJ registry data is public in Brazil (Lei 12.527/2011, the Access to Information Act). Personal data of partners comes masked; use it only with a legitimate business purpose and in line with LGPD/GDPR, including the rules for contacting leads.

📧 Need help?

Questions, a custom filter or a bigger volume: write to contato@brasildados.org.


🔌 For developers: API

The same run in a single HTTP call. It waits for the run to finish and returns the records:

curl -X POST "https://api.apify.com/v2/acts/brasildados~cnpj-lead-scraper-search/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"cnaes":["6201501","6204000"],"uf":["SP"],"situacaoCadastral":"02","maxResults":10}'

The response is a JSON array with one object per company found, with the same fields described above.


Docs and API guides: brasildados.org · Full catalog: apify.com/brasildados

ActorWhen to use
CNPJ Data EnrichmentYou already have a list of CNPJs (Tax IDs) and need the company data
CNPJ KYC & PEP CheckerPEP, sanctions and electoral donations
CNPJ Lawsuits CheckLitigation history (5 years, defendant side)

Suggested pipeline: Lead Search (this actor) → Lawsuits + KYC on the shortlisted companies


🇧🇷 Guia em português: busca de empresas por CNAE e estado

Monte listas de leads B2B com dados da Receita Federal: escolha a atividade (CNAE), os estados, o porte e a situação cadastral e receba CNPJ, razão social, endereço, telefone, e-mail, CNAEs e quadro de sócios (QSA) de cada empresa. Até 500 empresas por execução, em Excel, CSV ou JSON. Não precisa saber programar.

  • ⚡ Rápido: buscas de até 49 empresas voltam em segundos.
  • 🎯 Filtros combinados: atividade, estado, porte e situação cadastral.
  • ✅ CNAE em qualquer formato: 6201501 ou 6201-5/01.
  • 💸 Cobrança justa: só paga pelas empresas entregues. Busca sem resultado não cobra lead.

🚀 Como usar em 5 passos

  1. Abra a aba Input deste actor.
  2. Em Códigos de atividade econômica (CNAE), cole os CNAEs do segmento, um por linha (ou deixe vazio para qualquer atividade).
  3. Escolha os estados, o porte e a situação cadastral (02 — Ativa é o padrão).
  4. Defina o Máximo de resultados (1 a 500) e clique em Start.
  5. Abra a aba Output (ou Dataset) e clique em Export → Excel (XLSX), CSV ou JSON.

📋 Copie e cole para testar agora

Cole as 2 linhas abaixo no campo de CNAE, escolha São Paulo (SP) e coloque 10 no máximo de resultados:

6201501
6204000

⚠️ Um CNAE por linha. 6201501, 6204000 na mesma linha vira um código só, inválido, e é ignorado. A lista completa de CNAEs está em brasildados.org/lista-cnaes.

✅ O que é aceito

O que você colaO que acontece
6201501 ou 6201-5/01✅ Aceito
111301✅ Aceito (vira 0111301)
O mesmo CNAE duas vezes✅ Buscado uma vez
62015 (classe de 5 dígitos)⏭️ Ignorado com aviso: use a subclasse de 7 dígitos
Código que não existe⏭️ Ignorado com aviso
Só códigos inválidos❌ Nada é buscado e nenhum lead é cobrado

O filtro de CNAE considera a atividade principal da empresa. O resultado pode trazer matriz e filiais (coluna matriz).

📊 Principais colunas do resultado

ColunaO que éExemplo
cnpjFormatadoCNPJ com pontuação53.113.791/0001-22
razaoSocial / nomeFantasiaRazão social e nome fantasiaTOTVS S.A.
situacaoCadastralDescricaoSituação na ReceitaAtiva
dataInicioAtividadeData de abertura1983-12-13
porteDescricaoPorte (ME, EPP, Demais)Demais
cnaePrincipalAtividade principal (código e descrição)6201-5/01
enderecoCompletoEndereço em uma linha (número oculto por privacidade)Avenida Braz Leme, ***, Casa Verde, São Paulo/SP
telefone1 / emailContatos declarados na Receita (nem sempre preenchidos)1140040015
sociosQuadro de sócios: nome (pessoa física só com o primeiro nome), cargo, CPF como a Receita publica (mascarado)Carlos ****** · Diretor
idadeEmpresaAnosIdade da empresa em anos42

A lista completa, com as 40 colunas, está na tabela em inglês acima e na aba Dataset schema.

📗 Planilhas prontas

Na exportação normal, cada empresa é uma linha e os sócios e CNAEs ficam espremidos em colunas extras. Para ter uma tabela limpa de sócios ou de atividades, escolha uma visão pronta antes de exportar:

VisãoUma linha porColunas
OverviewempresaCNPJ, razão social, situação, idade, porte, capital, cidade, UF, sócios, e-mail, telefone
All fieldsempresatodas as 40 colunas
Shareholders (one row per partner)sócioCNPJ, razão social, sócio, tipo, documento, cargo, data de entrada, faixa etária
Secondary CNAEs (one row per activity)CNAE secundárioCNPJ, razão social, código do CNAE, atividade

Como baixar: abra a aba Output da execução → escolha a visão no topo da tabela → Export → Excel (XLSX) ou CSV.

💰 Preço

Cobrança por empresa (lead) entregue no Dataset, mais uma pequena taxa por execução. Busca sem resultado não cobra lead. O valor atualizado fica na aba Pricing.

❓ Perguntas frequentes

Onde acho o código CNAE? Em brasildados.org/lista-cnaes, com busca pelo nome da atividade.

Posso buscar sem CNAE? Sim. A busca usa só os outros filtros; mantenha um máximo de resultados razoável.

Como pego mais de 500 empresas? Faça várias execuções, dividindo por estado ou por CNAE.

Vêm só empresas ativas? Por padrão, sim (02 — Ativa). Escolha outra situação, ou all, se precisar das demais.

Telefone e e-mail sempre vêm? Não. É a própria empresa que informa na Receita, e muitas deixam em branco.

Precisa de ajuda? Dúvidas, um filtro a mais ou volume maior: escreva para contato@brasildados.org.


📧 contato@brasildados.org · 🌐 brasildados.org · 🛒 BrasilDados na Apify Store