Brazil CNPJ Scraper & API: Bulk Lookup, Companies by CNAE avatar

Brazil CNPJ Scraper & API: Bulk Lookup, Companies by CNAE

Pricing

from $0.90 / 1,000 results

Go to Apify Store
Brazil CNPJ Scraper & API: Bulk Lookup, Companies by CNAE

Brazil CNPJ Scraper & API: Bulk Lookup, Companies by CNAE

Bulk CNPJ lookup on the Receita Federal open registry. Get company lists by CNAE, state, município or partner CPF with razão social, situação cadastral, address, phone, partners (QSA), porte, Simples Nacional and MEI. No proxy or login. Export CSV, Excel or JSON, or use the API.

Pricing

from $0.90 / 1,000 results

Rating

5.0

(1)

Developer

Epic Scrapers

Epic Scrapers

Maintained by Community

Actor stats

3

Bookmarked

213

Total users

26

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Consulta CNPJ em lote: 36% of 1,000 real CNPJs in a CNAE list are not active

Brazil CNPJ Scraper & API: bulk CNPJ lookup, company lists by CNAE, partners (QSA)

Look up Brazilian companies in bulk from the open CNPJ registry of the Receita Federal. Pull every company with a given CNAE in a state or city, find all companies of a partner (by CPF, or by CNPJ for company partners), or look up a single CNPJ. Each row has the razão social, nome fantasia, situação cadastral, address, phone, partners (QSA), porte, capital social, Simples Nacional and MEI flags and the tax regime per year.

  • Company lists, not one card at a time. Filter by CNAE, state (UF), município code, natureza jurídica or partner CPF, and get up to 100,000 companies per run.
  • Check status before you call. In a real sample of 1,000 IT companies in São Paulo, 364 were not active (284 BAIXADA, 71 INAPTA). Every row has situacao_cadastral, so you can drop them.
  • Partners and tax flags in the same row. QSA, Simples Nacional, MEI and regime tributário come with the company, no second lookup.
  • No proxy, browser, CAPTCHA or gov.br login. The data comes from the public API of minhareceita.org, an open mirror of the official Receita Federal CNPJ dumps.
  • CSV, Excel, JSON or API. Export from the Output tab or call the Actor from your code, Make, Zapier or n8n.

Português: Consulta CNPJ em lote e API CNPJ (versão em português)

Who uses it

You are...You run...You use...
Sales / B2B prospecting teamA CNAE in a state or cityrazao_social, telefone1, porte, municipio, only ATIVA rows
Accounting or tax firmA CNAE or município, then filter on simples_nacional and meiCompanies to offer Simples, MEI or Lucro Presumido services to
KYC, compliance, credit analystA list of CNPJs, one lookup eachsituacao_cadastral, data_abertura, capital_social, qsa
Journalist or investigatorA partner's CPF (full or masked)Every company where that partner appears, with role and entry date
Data / market research teamA CNAE nationwideCounts by UF, porte, opening year, Simples and MEI

For AI agents

Call epicscrapers/brazil-cnpj-scraper. Minimal input for a list (set uf to "" to search all of Brazil, because it defaults to "DF"):

{ "uf": "SP", "cnae": "6209100", "maxItems": 100 }

Single company: { "cnpj": "00.000.000/0001-91" }. Key output fields per row: cnpj, razao_social, nome_fantasia, situacao_cadastral, data_abertura, cnae_principal_codigo, municipio, uf, telefone1, porte, capital_social, simples_nacional, mei, qsa, qsa_count.

Quick start

  1. Click Try for free on the Actor page.
  2. Enter a CNAE code (for example 6209100) and a state, or one CNPJ.
  3. Keep Máximo de registros (maxItems) at 50 for the first run.
  4. Click Start and open the Output tab.

Input

Two modes:

  • Single CNPJ lookup. When cnpj is set, all filters are ignored and the Actor returns that one company.
  • Bulk search. Otherwise it pages through every company that matches all your filters (AND). It needs at least one filter; with none, the run finishes without results and its status message says which filters to fill in.
FieldDefaultWhat it does
cnpjemptyOne CNPJ, 14 digits. Dots, slash and dash are ignored, so 00.000.000/0001-91 works.
uf"DF"Two-letter state code (SP, RJ, MG...). Pre-filled with DF. Set "" to search every state.
cnaeemptyCNAE code, 7 digits. Matches the primary and secondary activities. Example: 6209100.
municipioemptyMunicípio code (IBGE or SIAFI), digits only. Example: 5300108 (Brasília). A code, not a city name.
naturezaJuridicaemptyLegal-form code. Example: 2135 (Empresário Individual), 2062 (Sociedade Empresária Limitada).
partnerCpfemptyA partner's CPF (123.456.789-01 or masked ***456789**), or the CNPJ of a company partner (14 or 8 digits).
pageSize100Records per request to the source, 1 to 1000. Raise it for large lists.
maxItems50Maximum companies saved, 1 to 100000. Free accounts: 10,000 per month (see Limits).

The registry only publishes digits 4 to 9 of a partner's CPF, so the Actor turns a full CPF into that form for you: 123.456.789-01 is searched as ***456789**. Six digits are not unique, so other people can match too. Check the names in qsa. A company partner is stored by its 8-digit CNPJ base, so a full CNPJ such as 02.316.471/0001-91 is searched as 02316471 (all companies of that group). Any other value ends the run with a status message explaining the format.

Examples

One CNPJ (cartão CNPJ data):

{ "cnpj": "00.000.000/0001-91" }

Software companies in São Paulo state:

{ "uf": "SP", "cnae": "6209100", "maxItems": 10000, "pageSize": 1000 }

A CNAE in all of Brazil:

{ "uf": "", "cnae": "8630504", "maxItems": 50000, "pageSize": 1000 }

Empresários individuais in Brasília:

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

Every company of a partner:

{ "uf": "", "partnerCpf": "123.456.789-01", "maxItems": 200 }

Output

One row per company (establishment). Missing text fields are "", not null.

GroupFields
Identitycnpj, razao_social, nome_fantasia, matriz_filial
Statussituacao_cadastral, situacao_cadastral_motivo, data_situacao_cadastral, data_abertura
Activitycnae_principal_codigo, cnae_principal_descricao, cnaes_secundarios
Legal and sizenatureza_juridica_codigo, natureza_juridica, porte, capital_social
Addresslogradouro, numero, complemento, bairro, municipio, uf, cep, pais
Contacttelefone1, telefone2, fax, email
Taxsimples_nacional, data_opcao_simples, data_exclusao_simples, mei, data_opcao_mei, data_exclusao_mei, regime_tributario
Public sectorente_federativo, orgao_publico
Partnersqsa, qsa_count
Metadataultima_atualizacao (reserved, always ""), source_url

What to expect from real data (1,000 companies with CNAE 6209100 in SP, fetched 2026-11-17):

FieldFilled inNote
situacao_cadastral1,000636 ATIVA, 284 BAIXADA, 71 INAPTA, 6 SUSPENSA, 3 NULA. Lists include closed companies.
telefone1766DDD and number joined, for example 1134567890.
simples_nacional518 trueCurrent option.
email0The source no longer publishes company emails. The field stays in the schema but is empty.

The Actor has no status filter. Filter situacao_cadastral = ATIVA in your spreadsheet or code after the run.

Sample row (Banco do Brasil, arrays shortened):

{
"cnpj": "00000000000191",
"razao_social": "BANCO DO BRASIL SA",
"nome_fantasia": "DIRECAO GERAL",
"matriz_filial": "MATRIZ",
"situacao_cadastral": "ATIVA",
"situacao_cadastral_motivo": "SEM MOTIVO",
"data_situacao_cadastral": "2005-11-03",
"data_abertura": "1966-08-01",
"cnae_principal_codigo": "6422100",
"cnae_principal_descricao": "Bancos múltiplos, com carteira comercial",
"cnaes_secundarios": ["6499999 — Outras atividades de serviços financeiros não especificadas anteriormente"],
"natureza_juridica_codigo": "2038",
"natureza_juridica": "Sociedade de Economia Mista",
"porte": "DEMAIS",
"capital_social": 120000000000,
"logradouro": "SAUN QUADRA 5 BLOCO B TORRE I, II, III",
"numero": "SN",
"bairro": "ASA NORTE",
"municipio": "BRASILIA",
"uf": "DF",
"cep": "70040912",
"telefone1": "6134939002",
"fax": "6134931040",
"email": "",
"simples_nacional": false,
"mei": false,
"regime_tributario": [{ "ano": 2016, "cnpj_da_scp": null, "forma_de_tributacao": "LUCRO REAL", "quantidade_de_escrituracoes": 1 }],
"orgao_publico": false,
"qsa": ["ALAN CARLOS GUEDES DE OLIVEIRA — Diretor — id: ***550179** — entry: 2023-05-17"],
"qsa_count": 41,
"source_url": "https://minhareceita.org/00000000000191"
}

Field notes

  • cnpj: 14 digits, no punctuation. cnaes_secundarios: strings as CODE — Description.
  • situacao_cadastral: ATIVA, SUSPENSA, INAPTA, BAIXADA or NULA. data_situacao_cadastral is when it took effect.
  • porte: MICRO EMPRESA, EMPRESA DE PEQUENO PORTE or DEMAIS. capital_social in BRL, 0 when missing.
  • municipio in the output is the city name. The input filter takes a code.
  • qsa: each partner as NAME — ROLE — id: ***123456** — entry: YYYY-MM-DD. Partner CPFs are masked at the source.
  • Simples and MEI dates can be filled while the flag is false: they are historical dates.
  • regime_tributario: one object per year (ano, forma_de_tributacao, quantidade_de_escrituracoes, cnpj_da_scp), passed through as published.
  • orgao_publico: true when the legal-form code starts with 1.

Use it through the API

curl -X POST "https://api.apify.com/v2/acts/epicscrapers~brazil-cnpj-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"uf": "SP", "cnae": "6209100", "maxItems": 100}'

Python, looking up a list of CNPJs:

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
for cnpj in ["00.000.000/0001-91", "33.000.167/0001-01"]:
run = client.actor("epicscrapers/brazil-cnpj-scraper").call(run_input={"cnpj": cnpj})
for company in client.dataset(run["defaultDatasetId"]).iterate_items():
print(company["cnpj"], company["razao_social"], company["situacao_cadastral"])

JavaScript, a CNAE list with only active companies:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('epicscrapers/brazil-cnpj-scraper').call({ uf: 'RJ', cnae: '5611201', maxItems: 2000 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
const active = items.filter((c) => c.situacao_cadastral === 'ATIVA');

Keep a list up to date with schedules

The source reloads the Receita Federal dump about once a month. Save your input as a task (Save as a new task), then add it to a schedule in Schedules (monthly, for example cron 0 6 5 * *). Send each run to Google Sheets from the task's Integrations tab. Join runs on cnpj to spot new companies (data_abertura), status changes (situacao_cadastral), partner changes (qsa, qsa_count) and Simples/MEI moves.

Running more often than weekly rarely finds changes.

Limits and pricing

  • Price: pay per company saved. See the Pricing tab of the Actor page.
  • Free plan: up to 10,000 companies per calendar month (UTC), across all runs. When the allowance runs out, the Actor saves one notice row (razao_social and message explain it) and stops.
  • Paid plans: no monthly cap, up to 100,000 companies per run.
  • Freshness: monthly, following the official dump. A record can be a few weeks old.

FAQ

Why do I only get companies from Distrito Federal? uf is pre-filled with DF. Set it to "" and keep another filter such as cnae.

Can I search by company name? No. Search by CNAE, location, legal form or partner, or look up the CNPJ directly.

Can I find companies by a person's CPF? Yes. Put the CPF in partnerCpf, full or masked. The registry stores only digits 4 to 9, so results can include other people with the same six digits; confirm by name in qsa.

Why is email empty? The source stopped publishing company emails. Use telefone1 or enrich the list with another tool.

Do I need proxies, a certificate or a Receita account? No.

What if a CNPJ does not exist? The run finishes with an empty dataset and a status message saying the CNPJ was not found.

Is it legal? It is public open data from the Receita Federal. You are responsible for your use of it, including LGPD and anti-spam rules when contacting companies or people.

Report problems in the Issues tab with your run ID and input. Not affiliated with the Receita Federal or minhareceita.org.


Versão em português

Consulta CNPJ em lote e API CNPJ: lista de empresas por CNAE, sócios (QSA) e situação cadastral

Este Actor faz a consulta de CNPJ em lote na base de dados aberta da Receita Federal. Gere uma lista de empresas por CNAE, por estado (UF), por município ou por natureza jurídica, encontre empresas pelo CPF do sócio ou consulte um único CNPJ. Cada empresa vem com razão social, nome fantasia, situação cadastral, endereço, telefone, quadro societário (QSA), porte, capital social, opção pelo Simples Nacional e MEI e regime tributário por ano.

  • Lista de CNPJ, não um cartão CNPJ por vez. Até 100.000 empresas por execução.
  • Situação cadastral em cada linha. Numa amostra real de 1.000 empresas de TI em São Paulo, 364 não estavam ativas (284 baixadas, 71 inaptas). Filtre situacao_cadastral = ATIVA antes de ligar.
  • QSA, Simples Nacional e MEI junto com a empresa. Sem consulta extra.
  • Sem proxy, navegador, CAPTCHA ou login gov.br. Os dados vêm da API pública do minhareceita.org, espelho aberto dos dados abertos CNPJ da Receita Federal.
  • Exporte em CSV, Excel ou JSON, ou use como API CNPJ no seu código, Make, Zapier ou n8n.

Para que serve

ObjetivoComo
Prospecção B2B e lista de leadscnae + uf ou municipio; use razao_social, telefone1, porte e só as linhas ATIVA
Escritório de contabilidadeFiltre simples_nacional e mei na saída para achar optantes e não optantes
KYC, compliance e créditoConsulte cada cnpj: situação cadastral, data de abertura, capital social e QSA
Consultar empresas por CPF do sóciopartnerCpf com o CPF (completo ou mascarado) ou o CNPJ da empresa sócia
Estudo de mercadoUm CNAE no Brasil inteiro, contado por UF, porte, ano de abertura, Simples e MEI

Como usar

  1. Clique em Try for free na página do Actor.
  2. Informe um código CNAE (por exemplo 6209100) e uma UF, ou um único CNPJ.
  3. Deixe Máximo de registros em 50 no primeiro teste.
  4. Clique em Start e abra a aba Output para exportar.

Campos de entrada

Com cnpj preenchido, os filtros são ignorados e o Actor devolve só essa empresa. Sem cnpj, ele percorre todas as empresas que atendem a todos os filtros (E). É preciso pelo menos um filtro; sem nenhum, a execução termina sem resultados e a mensagem de status diz quais filtros preencher.

CampoPadrãoFunção
cnpjvazioUm CNPJ de 14 dígitos. Pontos, barra e hífen são ignorados.
uf"DF"Sigla do estado. Vem preenchido com DF. Use "" para o Brasil todo.
cnaevazioCódigo CNAE de 7 dígitos. Busca na atividade principal e nas secundárias.
municipiovazioCódigo do município (IBGE ou SIAFI), só números. Exemplo: 5300108 (Brasília).
naturezaJuridicavazioCódigo da natureza jurídica. Exemplo: 2135 (Empresário Individual), 2062 (Ltda.).
partnerCpfvazioCPF do sócio (123.456.789-01 ou ***456789**) ou CNPJ da empresa sócia (14 ou 8 dígitos).
pageSize100Registros por requisição, de 1 a 1000.
maxItems50Máximo de empresas salvas, de 1 a 100000. Conta gratuita: 10.000 por mês.

A Receita publica só do 4º ao 9º dígito do CPF do sócio, então o Actor converte o CPF completo para você: 123.456.789-01 é buscado como ***456789**. Seis dígitos não identificam uma pessoa só; confira os nomes no qsa. Empresa sócia é registrada pela raiz do CNPJ (8 dígitos): 02.316.471/0001-91 é buscado como 02316471.

Exemplos

Consulta de um CNPJ:

{ "cnpj": "00.000.000/0001-91" }

Lista de empresas por CNAE no estado de SP:

{ "uf": "SP", "cnae": "6209100", "maxItems": 10000, "pageSize": 1000 }

Um CNAE no Brasil inteiro:

{ "uf": "", "cnae": "8630504", "maxItems": 50000, "pageSize": 1000 }

Empresas de um sócio pelo CPF:

{ "uf": "", "partnerCpf": "123.456.789-01", "maxItems": 200 }

Dados de saída

Os mesmos campos da tabela em inglês acima: cnpj, razao_social, nome_fantasia, matriz_filial, situacao_cadastral, situacao_cadastral_motivo, data_situacao_cadastral, data_abertura, cnae_principal_codigo, cnae_principal_descricao, cnaes_secundarios, natureza_juridica_codigo, natureza_juridica, porte, capital_social, endereço completo com cep, telefone1, telefone2, fax, email, simples_nacional, mei e as datas de opção e exclusão, regime_tributario, ente_federativo, orgao_publico, qsa, qsa_count e source_url.

Na amostra de 1.000 empresas de SP, 766 tinham telefone e 518 eram optantes do Simples Nacional. O campo email vem vazio: a fonte deixou de publicar o e-mail das empresas.

Perguntas frequentes

Por que só aparecem empresas do DF? O campo uf vem com DF. Troque por "" e mantenha outro filtro, como cnae.

Dá para consultar CNPJ pelo nome da empresa? Não. Busque por CNAE, localização, natureza jurídica ou sócio, ou informe o CNPJ.

Dá para consultar CNPJ por CPF? Sim. Informe o CPF do sócio em partnerCpf, completo ou mascarado. Como a Receita guarda só seis dígitos, podem vir outras pessoas com os mesmos dígitos; confira o nome no qsa.

Os dados são atualizados? Mensalmente, seguindo a base de dados CNPJ da Receita Federal.

É legal? São dados abertos da Receita Federal. O uso é sua responsabilidade, incluindo a LGPD e as regras contra spam.

Problemas ou sugestões: aba Issues da página do Actor. Este Actor não tem vínculo com a Receita Federal nem com o minhareceita.org.