Brazil CNPJ Company Lookup & Search (Receita Federal) avatar

Brazil CNPJ Company Lookup & Search (Receita Federal)

Pricing

from $3.00 / 1,000 company records

Go to Apify Store
Brazil CNPJ Company Lookup & Search (Receita Federal)

Brazil CNPJ Company Lookup & Search (Receita Federal)

Look up Brazilian companies by CNPJ or search by CNAE, UF, city and status. Receita Federal open data: razão social, CNAEs, address, phone, Simples/MEI, capital, partners (QSA).

Pricing

from $3.00 / 1,000 company records

Rating

0.0

(0)

Developer

Jack Sheward

Jack Sheward

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Brazil CNPJ Company Lookup & Search (Receita Federal)

Português (PT-BR) abaixo ↓

Get Brazilian company data from the Receita Federal CNPJ open data as clean JSON. You can do it two ways:

  • Lookup / enrich. Give it a list of CNPJs (with or without punctuation, including the new alphanumeric CNPJs). You get back the full registration record for each one.
  • Search / lead lists. Find companies by CNAE (activity code, or a word like software, dentista or hotel), state (UF), city, legal nature (natureza jurídica) and registration status (situação cadastral). Optional filters narrow by size (porte), opening date, phone on file, or leave out MEIs.

Each company record includes razão social, nome fantasia, main and secondary CNAEs, full address, phone numbers on file, situação cadastral, opening date, capital social, porte, Simples Nacional / MEI status, tax regime, and the partners (QSA) with the CPF masking the Receita applies.

It suits sales and lead-generation teams building B2B prospect lists, KYC/onboarding and supplier checks, CRM enrichment, market sizing by CNAE and region, and AI agents that need to check a Brazilian company.

It uses public, no-login APIs only, with no scraping and no CAPTCHA solving. Unofficial: not affiliated with the Receita Federal, Minha Receita or BrasilAPI.

What you get

One row per company (tipo_registro: "empresa"), with the same stable set of keys every time:

GroupFields
Identitycnpj, cnpj_formatado, cnpj_raiz, razao_social, nome_fantasia, descricao_identificador_matriz_filial (MATRIZ/FILIAL)
Statusdescricao_situacao_cadastral (ATIVA, BAIXADA, INAPTA, SUSPENSA, NULA), data_situacao_cadastral, descricao_motivo_situacao_cadastral, situacao_especial, data_inicio_atividade
Activitycnae_fiscal (7-digit string, leading zeros kept), cnae_fiscal_descricao, cnaes_secundarios [{codigo, descricao}]
Legal / sizenatureza_juridica, porte, capital_social (R$), opcao_pelo_simples, opcao_pelo_mei and their dates, regime_tributario [{ano, forma_de_tributacao}]
Addressdescricao_tipo_de_logradouro, logradouro, numero, complemento, bairro, cep, municipio, codigo_municipio_ibge, uf, plus a ready-made endereco_completo
Contactddd_telefone_1, ddd_telefone_2, ddd_fax exactly as on file, plus telefones: a formatted, de-duplicated list of dialable numbers ((11) 3849-9580). The Receita stores every number with 8 subscriber digits, so mobiles appear in the form used before Brazil's 2016 switch to 9-digit mobiles (1180778583). In live samples, 36–53% of numbers (depending on the sector) were mobiles written this way, and none used the 9-digit form. An 8-digit number starting with 6–9 is a mobile (landlines start with 2–5), and telefones gives it in today's form, (11) 98077-8583, ready for calls or WhatsApp. It also reads numbers stored with a leading zero (001138499580) or the 55 country code, and leaves out values with no valid area code. email is always null (see FAQ).
Partnersqsa [{nome_socio, cnpj_cpf_do_socio, qualificacao_socio, data_entrada_sociedade, faixa_etaria, ...}], quantidade_socios. cnpj_cpf_do_socio is the masked CPF (***456789**) for a person, the partner company's CNPJ as the source gives it (often only the 8-digit root, e.g. 04020670) for a company, and usually empty for a foreign partner.
Metaconsulta (what you asked), fonte, atualizacao_base (Receita release month, e.g. 2026-09), consultado_em

Field names follow the Receita Federal layout, the same keys BrasilAPI and Minha Receita use, so existing integrations map almost one to one. The exception is CNAE codes, which are 7-digit strings here so leading zeros survive CSV and Excel. Empty strings become null.

Input

FieldTypeUsed inDescription
modeauto / lookup / searchbothauto (default): lookup when cnpjs are given, search when cnae/uf/city are given (search wins if both are present).
cnpjsarray of stringslookup33.000.167/0001-01, 33000167000101, 12.ABC.345/01DE-35. An item can hold several CNPJs separated by commas or spaces, and spaces inside one CNPJ (33 000 167 0001 01) are joined back. Lost leading zeros are restored, and an 8-digit root is treated as its headquarters (/0001). Max 10,000 per run; each extra CNPJ gets a free "not processed" row.
cnaearray of stringssearchSubclass codes (5611-2/01, 5611201), a class/group prefix (8630-5, 8630, 56), or words. A built-in list of about 650 common words and phrases in Portuguese and English, covering 89 business types, maps each one to the codes people mean: software gives the 5 software/IT codes, dentista/odontologia gives 8630-5/04, gráfica gives the print-shop codes, and hotel, farmácia, advogado, autopeças, livraria, marcenaria, academia, salão de beleza, pet shop, oficina, construtora, escola, restaurante, lawyer and gym work too. Other Portuguese words are matched as whole words, singular or plural, against the official CNAE names (borracharia, contabilidade). Words too generic to mean one industry (comércio, loja, serviços, distribuidora) or matching more than 30 codes (transporte) are refused with a free row saying what to send, rather than searched and charged. A free aviso row lists the exact codes each word became. Max 50 codes.
cnaeScopemain / anysearchmain (default): main activity must match. any: main or a secondary activity.
ufarray of stringssearchSP, rj, Minas Gerais…
cityarray of stringssearchCampinas, Campinas/SP, Bom Jesus - PI, or 7-digit IBGE codes. Accents are optional, and old names or Receita spellings work (Embu, Moji Mirim, Parati, Santa Barbara d Oeste). A state capital's name means the capital even where smaller towns share it (Campo Grande = Campo Grande/MS; Palmas, Boa Vista, Rio Branco and Belém likewise). Any other name used in several states (Bom Jesus, São Vicente) matches all of them unless you add the UF. Either way an aviso row says what was chosen.
naturezaJuridicaarray of stringssearchLegal nature, filtered at the source. 4-digit codes (2062 Ltda, 2135 Empresário Individual, 2046/2054 S.A.) or words: ltda, sa, eireli, cooperativa, associacao, or companies (Ltda, S.A., EIRELI, sociedades simples and cooperatives, leaving out Empresário Individual/MEI, whose address and phone the source hides). It can be the only filter.
situacaoarray of stringssearchATIVA (default), BAIXADA, INAPTA, SUSPENSA, NULA or all. English also works (active, closed, suspended).
portearray of stringssearchME (micro), EPP (small) or DEMAIS (everything larger; the Receita does not split medium from large).
openedFrom / openedTostringsearchOpening-date range (data_inicio_atividade): 2024-03-15, 15/03/2024, 2024-03 or 2024.
openedInLastDaysintegersearchShortcut for "opened in the last N days".
requirePhonebooleansearchKeep only companies with a usable phone on file.
excludeMeibooleansearchDrop MEI registrations.
includePartnersbooleanbothDefault true. Set false to leave out the QSA (data minimisation).
maxRecordsintegerbothMaximum companies returned and charged. Search default is 100, max 50,000. Lookups return every CNPJ given unless you set this.

cnae, uf, city and naturezaJuridica are filtered by the data source. situacao, porte, the opening dates, requirePhone and excludeMei are checked by the actor while it scans results, and companies skipped that way are not charged. The source returns results in its own order, not by date, so a narrow date range over a big area scans many pages. Page size grows with how rarely results match, up to 1,000 per page, and a run scans at most 300,000 results (300 pages). If that limit stops a search short, a free aviso row says so.

The Apify platform validates the declared fields against their types, so send list fields as arrays of strings and maxRecords as an integer. Beyond that the input is lenient. Keys are matched case-insensitively and common aliases work (cnpj, state, cidade, status, activity, limit…). Free-text keys that agents often use (keyword, query, q, search, segmento) are read as cnae, except that a full CNPJ in them is treated as a lookup. Values ignore case and accents. Input that can't be used gets a free explanatory row. A request made only of fields the actor doesn't recognise (for example a company name) is explained and not run, rather than falling back to the paid example. A search where the only filter is a state or city, sent next to an unrecognised text field, is also held back, because that field was probably meant as the activity. None of this fails the run or costs anything.

Example: enrich a list

{ "cnpjs": ["33.000.167/0001-01", "60746948000112", "47960950000121"] }

Example: lead list of active restaurants in Campinas that have a phone

{ "cnae": ["restaurante"], "city": ["Campinas/SP"], "requirePhone": true, "maxRecords": 500 }

Example: dental clinics in Rio de Janeiro state, excluding MEI

{ "cnae": ["dentista"], "uf": ["RJ"], "excludeMei": true, "maxRecords": 1000 }

Example: software companies (Ltda or S.A.) in Florianópolis opened in the last 12 months

{ "cnae": ["software"], "city": ["Florianópolis/SC"], "naturezaJuridica": ["ltda", "sa"], "openedInLastDays": 365, "maxRecords": 200 }

Output example

This record comes from a real run on 2026-09-24 (cnpjs: ["33.000.167/0001-01"]). Only the partner, secondary-CNAE and tax-regime lists were shortened (Petrobras has 8 partners on file).

{
"tipo_registro": "empresa",
"erro": null,
"consulta": "33.000.167/0001-01",
"cnpj": "33000167000101",
"cnpj_formatado": "33.000.167/0001-01",
"cnpj_raiz": "33000167",
"razao_social": "PETROLEO BRASILEIRO S A PETROBRAS",
"nome_fantasia": "PETROBRAS - EDISE",
"identificador_matriz_filial": 1,
"descricao_identificador_matriz_filial": "MATRIZ",
"situacao_cadastral": 2,
"descricao_situacao_cadastral": "ATIVA",
"data_situacao_cadastral": "2005-11-03",
"motivo_situacao_cadastral": 0,
"descricao_motivo_situacao_cadastral": "SEM MOTIVO",
"situacao_especial": null,
"data_situacao_especial": null,
"data_inicio_atividade": "1966-09-28",
"cnae_fiscal": "0600001",
"cnae_fiscal_descricao": "Extração de petróleo e gás natural",
"cnaes_secundarios": [
{ "codigo": "1921700", "descricao": "Fabricação de produtos do refino de petróleo" },
{ "codigo": "3520401", "descricao": "Produção de gás; processamento de gás natural" }
],
"codigo_natureza_juridica": 2038,
"natureza_juridica": "Sociedade de Economia Mista",
"qualificacao_do_responsavel": 10,
"ente_federativo_responsavel": null,
"codigo_porte": 5,
"porte": "DEMAIS",
"capital_social": 205431960000,
"opcao_pelo_simples": null,
"data_opcao_pelo_simples": null,
"data_exclusao_do_simples": null,
"opcao_pelo_mei": null,
"data_opcao_pelo_mei": null,
"data_exclusao_do_mei": null,
"descricao_tipo_de_logradouro": "AVENIDA",
"logradouro": "REPUBLICA DO CHILE",
"numero": "65",
"complemento": null,
"bairro": "CENTRO",
"cep": "20031170",
"municipio": "RIO DE JANEIRO",
"codigo_municipio": 6001,
"codigo_municipio_ibge": 3304557,
"uf": "RJ",
"codigo_pais": null,
"pais": null,
"nome_cidade_no_exterior": null,
"ddd_telefone_1": "2121660000",
"ddd_telefone_2": null,
"ddd_fax": "213224",
"email": null,
"qsa": [
{
"identificador_de_socio": 2,
"nome_socio": "ANGELICA GARCIA COBAS LAUREANO",
"cnpj_cpf_do_socio": "***912137**",
"codigo_qualificacao_socio": 10,
"qualificacao_socio": "Diretor",
"data_entrada_sociedade": "2025-07-29",
"codigo_faixa_etaria": 8,
"faixa_etaria": "Entre 71 a 80 anos",
"codigo_pais": null,
"pais": null,
"cpf_representante_legal": "***000000**",
"nome_representante_legal": null,
"codigo_qualificacao_representante_legal": 0,
"qualificacao_representante_legal": "Não informada"
}
],
"regime_tributario": [
{ "ano": 2024, "forma_de_tributacao": "LUCRO REAL", "quantidade_de_escrituracoes": 1, "cnpj_da_scp": null }
],
"endereco_completo": "AVENIDA REPUBLICA DO CHILE, 65, CENTRO, RIO DE JANEIRO/RJ, CEP 20031-170",
"telefones": ["(21) 2166-0000"],
"quantidade_socios": 8,
"fonte": "minhareceita.org",
"atualizacao_base": "2026-09",
"consultado_em": "2026-09-24T16:36:37Z"
}

Row types

tipo_registroCharged?Meaning
empresayes, company-recordA company record.
errofreeA CNPJ that is invalid (bad check digits, a CPF, garbage), not found, couldn't be fetched, or wasn't attempted (sources down, run timeout, maxRecords or charge limit reached, over the 10,000 cap). Also a search that couldn't run, a search the source broke off partway (a later page failed after retries: the row says it is a source problem, not your filters), input that couldn't be used, or a max charge too low for one company. The reason is in erro and your input is echoed in consulta.
avisofreeA note: how each CNAE word, prefix or legal-nature word was resolved (filters used: cnae 'software' -> 6201501 …), input values that were ignored or reinterpreted (including which city a shared name was read as), a CNPJ repeated in your input (looked up and charged once), a search with zero matches, or a search stopped by the per-run scan limit.

Every row carries the full key set, so you can export it straight to CSV or Excel. A real erro row from the same run: {"tipo_registro": "erro", "erro": "CNPJ not found in the Receita Federal open data (não encontrado) — not charged", "consulta": "12.ABC.345/01DE-35", "cnpj": "12ABC34501DE35", ...all other keys null}.

Pricing

Pay per event. There is no subscription.

EventPriceWhen
actor-start$0.005Once per run, and only after the data source has actually answered.
company-record$0.003For each company returned (tipo_registro: "empresa").

Error and notice rows are free. Invalid CNPJs are rejected before any request is made. Companies scanned during a search but filtered out by situacao, porte, the opening dates, requirePhone or excludeMei are not charged. If the data sources are down for the whole run, the input can't be used, or the run's maximum charge can't pay for the start plus one company ($0.008), the run makes no requests where it can avoid them and costs nothing.

Worked examples:

JobCost
Empty input {}: the 2 example CNPJs (the daily health check)$0.005 + 2 × $0.003 = $0.011
Enrich 100 CNPJs; 97 are found, 3 are invalid or not found$0.005 + 97 × $0.003 = $0.296
Lead list: 1,000 active restaurants in São Paulo$0.005 + 1,000 × $0.003 = $3.005
10,000-company lead list$0.005 + 10,000 × $0.003 = $30.005

Set Maximum cost per run in the Apify Console (or maxRecords) to cap spend. The actor stops cleanly when it hits the cap and tells you in the status message.

Data source, freshness and reliability

  • Source: Minha Receita, an open-source project (MIT licence, code now on Codeberg) that serves the Receita Federal's public CNPJ files, published under Brazil's Lei de Acesso à Informação, through a JSON API. Search uses its paginated /?cnae_fiscal=&uf=&municipio= endpoint. Fallback: if Minha Receita is unreachable, single lookups retry through BrasilAPI /api/cnpj/v1, capped at 25 per run to respect BrasilAPI's fair-use terms. Search has no fallback.
  • Freshness: the Receita publishes the full base about once a month. atualizacao_base shows the release month each row came from.
  • Reliability: requests are sequential and paced (≤5/s). 429 and 5xx responses and timeouts are retried with backoff, and a retry never comes sooner than Retry-After asks (in seconds or as an HTTP date). When the sources keep failing for about 30 seconds with no good answer (2 minutes for search pages), the actor stops waiting and uses short timeouts, so an outage costs seconds per CNPJ, not minutes. Requests are also fitted inside the run's own timeout: near the end the actor stops fetching, saves what it has, and gives each CNPJ it skipped a free row. Malformed items are skipped (never charged), NaN/Infinity and absurdly large numbers become null, and text the source sends that isn't valid UTF-8 is repaired. If a later search page fails after its retries, the companies already found are kept and a free erro row says the source broke off, so you know to run it again. The run ends SUCCEEDED with explanatory rows rather than failing. Minha Receita is run by volunteers and funded by donations, with no SLA. If you use this heavily, consider supporting it.
  • Scope of search: CNAE, UF, city and legal nature are filtered at the source. situacao, porte, opening dates, requirePhone and excludeMei are filtered by the actor while it scans. Results come in the source's internal order, not alphabetical or by date. Minha Receita labels its search feature as being in testing, so its parameters could change. Its search by partner CPF/CNPJ (cnpf) is not offered here: the source's docs warn that it tends to time out, and a search by a person's CPF is a people lookup this actor doesn't do.

Privacy and LGPD

  • This actor returns only what the Receita Federal publishes as open data. The public source already removes e-mail addresses from every record. For individual entrepreneurs (Empresário Individual / MEI) it also removes the street, number, complement and phones.
  • Partner CPFs come masked the way the Receita publishes them (***456789**). The Receita data often ends an individual entrepreneur's company name with the owner's full CPF. This actor masks those CPFs the same way (FULANO DE TAL ***456789**).
  • Set includePartners: false if you don't need partner names.
  • You, the buyer, are the controller of any personal data you process. Under the LGPD (Lei 13.709/2018) you need a legal basis for your use, such as legitimate interest for B2B prospecting. You must honour data-subject requests and opt-outs, and you should follow the ANPD's guidance and anti-spam rules for any outreach.

Use with AI agents / MCP

This actor is designed to be called by agents through the Apify MCP server:

  • The output is flat and self-describing, with the same keys on every row. tipo_registro tells the agent whether a row is a company, an error or a note, and erro explains the problem in plain words.
  • List fields (cnpjs, cnae, uf, city, naturezaJuridica, situacao, porte) are arrays of strings. The platform checks this, so a bare string is rejected before the run starts. Items may still contain comma-separated values.
  • Put the activity, state and city in separate fields: {"cnae": ["dentista"], "uf": ["SP"]}, not {"query": "dentistas em SP"}. The second form isn't guessed at. It returns a free row explaining what to send.
  • Common words work in cnae (software, dentist, hotel, lawyer, gráfica, autopeças…). Generic words (comércio, loja, serviços) are refused for free rather than guessed at. Always check the free aviso row "filters used", which lists the CNAE codes each word became, before trusting a big pull.
  • Costs are $0.005 per run plus $0.003 per company returned. Use maxRecords to bound a search. The status message says what was charged and why the run stopped.

Example tool input an agent might send:

{ "mode": "search", "cnae": ["contabilidade"], "city": ["Belo Horizonte/MG"], "situacao": ["ATIVA"], "maxRecords": 25, "includePartners": false }

FAQ

Why is email always null? The Receita's raw open-data files have an e-mail column, but the public Minha Receita/BrasilAPI API strips it from every record to protect privacy. This actor doesn't add e-mails back from any other source. The key stays in the schema for compatibility.

Why is the address or phone of some companies empty? For individual entrepreneurs (EI/MEI) the source removes the street and phone numbers for privacy. requirePhone: true keeps only companies with a phone on file.

Do alphanumeric CNPJs work? Yes. New CNPJs issued from July 2026 can contain letters (e.g. 12.ABC.345/01DE-35). The check digits are validated with the Receita's new rule.

How current is the data? It is as current as the latest Receita monthly release (see atualizacao_base). Status changes made after that release won't show yet.

How do I search every status? Send "situacao": ["all"]. The default is active companies only.

How do I find the right CNAE? Send a word ("cnae": ["padaria"], ["software"], ["dentist"]). The free aviso row "filters used" lists every code it became, with its official name. If that isn't what you meant, send 7-digit codes from the IBGE CNAE 2.3 table. Words with no CNAE equivalent (e-commerce, startup), words too generic to mean one industry (comércio, loja, distribuidora) and words that match more than 30 codes (transporte, veículos) get a free row explaining what to send instead, and nothing is searched with them. Words that match nothing (sapateiro) get a free row too.

Can I search by company name? No. The public source only searches by CNAE, state, city, legal nature and partner. Look companies up by CNPJ instead.

Can I filter by size or opening date? Yes: porte (ME / EPP / DEMAIS) and openedFrom / openedTo / openedInLastDays. The source can't filter these, so the actor checks each result as it scans. Narrow the area or activity first, so it doesn't have to scan hundreds of pages.

How do I get only real companies, not individual entrepreneurs? Send "naturezaJuridica": ["companies"] (or ["ltda"]). This is filtered at the source, so it is fast. Empresário Individual rows have no street or phone in the public data.

What if a city name exists in several states? If one of them is a state capital, the capital is used: Campo Grande means Campo Grande/MS, not the towns of the same name in RN and AL. Otherwise, for example "Bom Jesus" (5 states), the actor searches all of them. Either way it adds an aviso row saying what it did. Add the UF (Bom Jesus/PI, Campo Grande/RN) to pick one.

Are the phone numbers ready to dial? telefones is. The Receita stores 8-digit subscriber numbers, so mobiles registered before 2016 are on file without the leading 9. telefones adds it back (1180778583 → (11) 98077-8583), because every 8-digit number starting with 6–9 is a mobile. ddd_telefone_1 / ddd_telefone_2 keep the value exactly as on file. Whether a number still belongs to the company is something only a call can tell.

Maximum sizes? 10,000 CNPJs per lookup run and 50,000 companies per search run. Records are streamed in batches of 500, so memory doesn't grow with the result count. Peak memory measured locally (2026-09-24): 95 MB on a live 5,000-company search (apify run, 15 pages). In the test harness, which runs a simulated source inside the same process, it was 101 MB on a 50,000-company search and 80 MB on a 10,000-CNPJ lookup (78 MB at 1,000 CNPJs, so it stays flat). 128 MB is enough for typical runs; give the largest runs 256 MB. Lookups are sequential and paced at no more than 5 per second (Minha Receita is a volunteer service). Measured locally they average about 0.25 s each, so 10,000 CNPJs take about 45 minutes, and longer from a datacenter far from Brazil. Set the run timeout to at least 90 minutes for 10,000 CNPJs. If the timeout is shorter, the actor stops in time and gives every CNPJ it skipped a free row.

Changelog

  • 0.1 (2026-09-24): First release. Lookup (numeric and alphanumeric CNPJs, check-digit validation, root → HQ, CNPJs typed with spaces) and search (CNAE code/prefix/word with a Portuguese and English common-word list, UF, city with spelling variants, legal nature at the source, situação, porte, opening date, phone/MEI filters). A free "filters used" row shows how every word was resolved. Minha Receita source with a BrasilAPI fallback. Retries, timeouts and backoff are bounded and fitted inside the run's own timeout. Free rows cover every CNPJ that wasn't looked up. Nothing is charged when the max charge can't pay for one company. Also: phone normalisation (pre-2016 8-digit mobiles returned in today's 9-digit form), CPF masking in company names, and dataset views for companies and contacts. Pre-release review fixes: 42 more business types in the common-word list (gráfica, autopeças, livraria, marcenaria, mudança…); generic or over-broad CNAE words refused for free instead of truncated; state capitals win for shared city names; free rows for duplicate CNPJs, for a search the source broke off partway, and for the scan limit; Retry-After HTTP dates honoured; absurd numbers from the source or the input can no longer fail a run.

Português (PT-BR)

Consulta CNPJ em lote e busca de empresas por CNAE, UF, cidade e situação cadastral. Os dados vêm dos dados abertos de CNPJ da Receita Federal e saem em JSON limpo, com os mesmos nomes de campo do layout da Receita (usados também pela BrasilAPI e pelo Minha Receita).

Não oficial: sem vínculo com a Receita Federal, o Minha Receita ou a BrasilAPI.

O que faz

  • Consulta / enriquecimento: envie uma lista de CNPJs, com ou sem pontuação e também no novo formato alfanumérico. O ator valida o dígito verificador antes de consultar, restaura zeros à esquerda perdidos no Excel e trata uma raiz de 8 dígitos como a matriz (/0001).
  • Busca / lista de leads: filtre por CNAE (código, prefixo de classe ou palavra como software, dentista, hotel, farmácia, advogado, restaurante), UF, cidade, natureza jurídica e situação cadastral (padrão: ATIVA). Há filtros opcionais por porte (ME/EPP/DEMAIS), data de abertura, empresas com telefone e exclusão de MEI. Uma linha gratuita aviso mostra exatamente em quais códigos CNAE cada palavra foi convertida.

Cada empresa traz razão social, nome fantasia, CNAE principal e secundários, endereço completo, telefones, situação cadastral, data de abertura, capital social, porte, opção pelo Simples/MEI, regime tributário e o quadro societário (QSA) com o CPF mascarado como a Receita publica.

Entrada

CampoDescrição
cnpjsLista de CNPJs (consulta), com ou sem pontuação, inclusive com espaços (33 000 167 0001 01). Máximo de 10.000 por execução.
cnaeCódigos (5611-2/01), prefixos (8630-5) ou palavras (software, dentista, padaria, gráfica, autopeças, borracharia). Palavras genéricas demais (comércio, loja, serviços, distribuidora) ou que batem com mais de 30 códigos (transporte) são recusadas com uma linha gratuita explicando o que enviar, sem busca e sem cobrança.
cnaeScopemain (só o CNAE principal, padrão) ou any (principal ou secundário).
ufSP, RJ, Minas Gerais…
cityCampinas/SP, Bom Jesus - PI, nomes ou grafias antigas (Embu, Moji Mirim) ou código IBGE de 7 dígitos. Nome de capital vale a capital (Campo Grande = Campo Grande/MS); outros nomes repetidos em vários estados buscam todos, a menos que você informe a UF.
naturezaJuridicaCódigos (2062, 2135) ou ltda, sa, eireli, cooperativa, companies (sem empresário individual). Filtrado na fonte.
situacaoATIVA (padrão), BAIXADA, INAPTA, SUSPENSA, NULA ou all.
porteME, EPP ou DEMAIS.
openedFrom / openedTo / openedInLastDaysData de abertura (2024-03-15, 15/03/2024, 2024) ou "abertas nos últimos N dias".
requirePhone / excludeMeiFiltros opcionais da busca.
includePartnersfalse para omitir o QSA (minimização de dados).
maxRecordsLimite de empresas. Na busca, o padrão é 100 e o máximo é 50.000.

Na plataforma Apify, os campos de lista devem ser enviados como arrays de strings.

Exemplo: {"cnae": ["restaurante"], "city": ["Campinas/SP"], "naturezaJuridica": ["companies"], "requirePhone": true, "maxRecords": 500}

Preço

A cobrança é por evento: $0,005 por execução (actor-start) + $0,003 por empresa retornada (company-record). Linhas de erro ou aviso são gratuitas, CNPJs inválidos não são cobrados e as empresas descartadas pelos filtros também não. Se o custo máximo da execução não cobrir o início mais uma empresa ($0,008), nada é consultado nem cobrado. Por exemplo, uma lista de 1.000 empresas custa $0,005 + 1.000 × $0,003 = $3,005, e o teste padrão (entrada vazia, 2 CNPJs de exemplo) custa $0,011.

LGPD e privacidade

  • A fonte pública (Minha Receita) já remove os e-mails de todas as empresas. No caso de empresário individual/MEI, remove também logradouro, número, complemento e telefones. Por isso o campo email é sempre null.
  • Os CPFs dos sócios pessoas físicas vêm mascarados como a Receita publica (***456789**). Sócios pessoas jurídicas aparecem com o CNPJ como a fonte informa (muitas vezes só a raiz de 8 dígitos), e sócios estrangeiros costumam vir sem documento. Quando o CPF aparece no fim da razão social de empresário individual, este ator o mascara do mesmo jeito.
  • Quem usa os dados é o controlador perante a LGPD (Lei 13.709/2018). É preciso ter base legal para o tratamento (por exemplo, legítimo interesse em prospecção B2B), atender pedidos de titulares e de descadastramento e seguir as orientações da ANPD. Use includePartners: false se não precisar dos nomes dos sócios.

Perguntas frequentes

  • Os dados estão atualizados? Estão atualizados até a última base mensal divulgada pela Receita (campo atualizacao_base, por exemplo 2026-09).
  • CNPJ alfanumérico funciona? Sim. O dígito verificador é validado pela nova regra da Receita (IN RFB 2.229/2024).
  • Por que algumas empresas vêm sem telefone ou endereço? Porque a fonte oculta esses dados de empresários individuais/MEI por privacidade. Use requirePhone: true.
  • Os telefones já vêm prontos para ligar? O campo telefones sim. A Receita guarda números com 8 dígitos, então celulares cadastrados antes de 2016 aparecem sem o 9 inicial. Todo número de 8 dígitos começando com 6 a 9 é celular, e o ator devolve em telefones a forma atual (1180778583 → (11) 98077-8583), pronta para ligação ou WhatsApp. ddd_telefone_1 e ddd_telefone_2 mantêm o valor original.
  • A busca inclui empresas baixadas? Só se você pedir: "situacao": ["all"] ou ["BAIXADA"].
  • A fonte caiu, e agora? O ator tenta de novo com espera crescente, respeitando o Retry-After, sempre dentro do tempo limite da execução. Para consultas individuais ele recorre à BrasilAPI e, se nada responder, devolve linhas de erro gratuitas sem cobrar a execução. Se uma página posterior da busca falhar, as empresas já encontradas são mantidas e uma linha erro gratuita avisa que o problema foi da fonte, não dos seus filtros.
  • Dá para buscar pelo nome da empresa? Não. A fonte pública só busca por CNAE, UF, cidade, natureza jurídica e sócio. Use o CNPJ.
  • Como trazer só empresas (sem empresário individual)? Use "naturezaJuridica": ["companies"] ou ["ltda"]. O filtro é feito na fonte.