Brazilian CNPJ Bulk Lookup & Partner Records Scraper
Look up any number of Brazilian CNPJ numbers and get official Receita Federal data: company name, legal status, CNAE industry codes, address, founding date, capital, tax regime, and the partner (QSA) list for each one.
Input schema
Input fields, types, required flags, descriptions, defaults, and prefills come from the published definition. Prefill examples are distinct from defaults.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | optional | Look up a list of CNPJs, or discover companies that match filters. |
cnpjs | array | optional | CNPJ numbers to look up (mode=lookup). Numeric or alphanumeric, formatted or plain. Example: ["18.236.120/0001-58", "00000000E08G12"]. |
cnpjText | string | optional | Paste a CSV or any text containing CNPJs (mode=lookup). Every valid CNPJ is extracted, validated and deduplicated. A spreadsheet column with or without a header works. |
Show all input fields
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | optional | Look up a list of CNPJs, or discover companies that match filters. |
cnpjs | array | optional | CNPJ numbers to look up (mode=lookup). Numeric or alphanumeric, formatted or plain. Example: ["18.236.120/0001-58", "00000000E08G12"]. |
cnpjText | string | optional | Paste a CSV or any text containing CNPJs (mode=lookup). Every valid CNPJ is extracted, validated and deduplicated. A spreadsheet column with or without a header works. |
cnaes | array | optional | One or more 7-digit CNAE codes (mode=discovery). Matches primary or secondary activity. Example: ["6209100", "6201501"]. |
uf | string | optional | Brazilian state to narrow discovery (mode=discovery). |
municipio | string | optional | IBGE or SIAFI municipality code, digits only (mode=discovery). Example: 3550308 (São Paulo), 5300108 (Brasília). This is a code, not a city name. |
naturezaJuridica | string | optional | 4-digit legal-nature code (mode=discovery). Example: 2135 (Empresário Individual), 2062 (Sociedade Empresária Limitada). |
partnerCpf | string | optional | Masked partner document from the QSA (mode=discovery), in the Receita format such as ***123456**. Add a state or CNAE to narrow the search; the same mask can match different people. |
situacao | string | optional | Keep only companies with this registration status (mode=discovery). |
includePartners | boolean | optional | Include the full partner/shareholder list. |
includeSecondaryActivities | boolean | optional | Include the list of secondary CNAE activities. |
maxItems | integer | optional | Maximum CNPJs to process in lookup, or maximum records to emit in discovery. |
Download the published input schema
View complete JSON
{
"description": "Look up Brazilian companies by CNPJ in bulk, or discover companies by CNAE, state, city, legal nature or partner. Returns official Receita Federal registry data and full partner (QSA) records.",
"properties": {
"cnaes": {
"description": "One or more 7-digit CNAE codes (mode=discovery). Matches primary or secondary activity. Example: [\"6209100\", \"6201501\"].",
"editor": "stringList",
"title": "CNAE codes",
"type": "array"
},
"cnpjText": {
"description": "Paste a CSV or any text containing CNPJs (mode=lookup). Every valid CNPJ is extracted, validated and deduplicated. A spreadsheet column with or without a header works.",
"editor": "textarea",
"title": "CNPJ list or CSV text",
"type": "string"
},
"cnpjs": {
"description": "CNPJ numbers to look up (mode=lookup). Numeric or alphanumeric, formatted or plain. Example: [\"18.236.120/0001-58\", \"00000000E08G12\"].",
"editor": "json",
"prefill": [
"18236120000158"
],
"title": "CNPJ numbers",
"type": "array"
},
"includePartners": {
"default": true,
"description": "Include the full partner/shareholder list.",
"prefill": true,
"title": "Include partners (QSA)",
"type": "boolean"
},
"includeSecondaryActivities": {
"default": true,
"description": "Include the list of secondary CNAE activities.",
"prefill": true,
"title": "Include secondary CNAEs",
"type": "boolean"
},
"maxItems": {
"default": 1000,
"description": "Maximum CNPJs to process in lookup, or maximum records to emit in discovery.",
"editor": "number",
"maximum": 100000,
"minimum": 1,
"prefill": 1,
"title": "Maximum records",
"type": "integer"
},
"mode": {
"default": "lookup",
"description": "Look up a list of CNPJs, or discover companies that match filters.",
"editor": "select",
"enum": [
"lookup",
"discovery"
],
"enumTitles": [
"Look up CNPJs",
"Find companies by filters"
],
"prefill": "lookup",
"title": "Mode",
"type": "string"
},
"municipio": {
"description": "IBGE or SIAFI municipality code, digits only (mode=discovery). Example: 3550308 (São Paulo), 5300108 (Brasília). This is a code, not a city name.",
"editor": "textfield",
"title": "Municipality code",
"type": "string"
},
"naturezaJuridica": {
"description": "4-digit legal-nature code (mode=discovery). Example: 2135 (Empresário Individual), 2062 (Sociedade Empresária Limitada).",
"editor": "textfield",
"title": "Legal nature code",
"type": "string"
},
"partnerCpf": {
"description": "Masked partner document from the QSA (mode=discovery), in the Receita format such as ***123456**. Add a state or CNAE to narrow the search; the same mask can match different people.",
"editor": "textfield",
"title": "Partner CPF/CNPJ",
"type": "string"
},
"situacao": {
"default": "ATIVA",
"description": "Keep only companies with this registration status (mode=discovery).",
"editor": "select",
"enum": [
"all",
"ATIVA",
"SUSPENSA",
"INAPTA",
"BAIXADA",
"NULA"
],
"enumTitles": [
"All statuses",
"Active",
"Suspended",
"Inactive",
"Closed",
"Null"
],
"prefill": "ATIVA",
"title": "Registration status",
"type": "string"
},
"uf": {
"default": "ALL",
"description": "Brazilian state to narrow discovery (mode=discovery).",
"editor": "select",
"enum": [
"ALL",
"AC",
"AL",
"AP",
"AM",
"BA",
"CE",
"DF",
"ES",
"GO",
"MA",
"MT",
"MS",
"MG",
"PA",
"PB",
"PR",
"PE",
"PI",
"RJ",
"RN",
"RS",
"RO",
"RR",
"SC",
"SP",
"SE",
"TO"
],
"enumTitles": [
"All states",
"Acre",
"Alagoas",
"Amapá",
"Amazonas",
"Bahia",
"Ceará",
"Distrito Federal",
"Espírito Santo",
"Goiás",
"Maranhão",
"Mato Grosso",
"Mato Grosso do Sul",
"Minas Gerais",
"Pará",
"Paraíba",
"Paraná",
"Pernambuco",
"Piauí",
"Rio de Janeiro",
"Rio Grande do Norte",
"Rio Grande do Sul",
"Rondônia",
"Roraima",
"Santa Catarina",
"São Paulo",
"Sergipe",
"Tocantins"
],
"prefill": "ALL",
"title": "State",
"type": "string"
}
},
"schemaVersion": 1,
"title": "Brazilian CNPJ Lookup Input",
"type": "object"
}
Output schema
Published result links and storage locations. This schema is not an exhaustive contract for every field in a dataset record.
| Field | Type | Required | Description |
|---|---|---|---|
companies | string | optional | Dataset containing all resolved Brazilian company records. |
Download the published output schema
View complete JSON
{
"actorOutputSchemaVersion": 1,
"description": "One record per Brazilian company, with Receita Federal status, CNAE activities, address, Simples/MEI, tax history and full partner (QSA) records.",
"properties": {
"companies": {
"description": "Dataset containing all resolved Brazilian company records.",
"template": "{{links.apiDefaultDatasetUrl}}/items",
"title": "Company records",
"type": "string"
}
},
"title": "Brazilian CNPJ Bulk Lookup & Partner Records Scraper Output"
}
Dataset schema
Published dataset views and any declared field definitions. A view can select only a subset of the returned record fields.
Download the published dataset schema
View complete JSON
{
"actorSpecification": 1,
"views": {
"overview": {
"display": {
"component": "table",
"properties": {}
},
"title": "Companies",
"transformation": {
"fields": [
"cnpj",
"razaoSocial",
"nomeFantasia",
"situacaoCadastral",
"cnaeDescricao",
"municipio",
"uf",
"dataInicioAtividade",
"isMatriz",
"optanteMei",
"source"
]
}
}
}
}
Key-value schema
Published key-value store definitions, when provided by this build.
This definition is not present in the default published build. See the published README for available documentation.
Published README
Read the full published documentation
Brazilian CNPJ Bulk Lookup & Partner Records Scraper
Look up Brazilian companies by CNPJ in bulk, or discover companies by CNAE activity, state, city, legal nature or partner. Every result is an official-style Receita Federal registry record: legal name, status, CNAE codes, address, Simples/MEI flags, tax history, capital, and the full partner (QSA) list. Numeric and 2026 alphanumeric CNPJs are accepted, with no login, API key, or proxy.
What this actor does
- Bulk lookup: paste a list, a spreadsheet column, or CSV text. CNPJs are normalized, check-digit validated, deduplicated, and resolved in one run.
- Discovery: find companies by CNAE (primary or secondary), state, municipality code, legal nature, or a partner's masked CPF/CNPJ, then keep only the status you want.
- Full partner records: name, masked document, person/company/foreign type, qualification, entry date, age band, country and legal representative.
- Tax and status depth: Simples Nacional, MEI, option/exclusion dates, per-year tax regime, status reason, special status and registration dates.
- Clean output: empty fields are omitted at every level;
falseand0are kept because they are real values.
Output per company
| Field | Description |
|---|---|
cnpj, cnpjFormatado, cnpjRaiz |
14-character CNPJ, formatted mask, and 8-character root |
razaoSocial, nomeFantasia |
Legal name and trade name |
isMatriz, tipoUnidade |
Headquarters or branch |
situacaoCadastral, situacaoCadastralCodigo |
Registration status and code |
situacaoCadastralMotivo, situacaoCadastralMotivoCodigo |
Reason for the current status |
dataSituacaoCadastral |
Date the status took effect (YYYY-MM-DD) |
situacaoEspecial, dataSituacaoEspecial |
Special registration status, when published |
cnaeFiscal, cnaeDescricao |
Primary CNAE code and description |
cnaesSecundarios |
Secondary CNAEs, each {codigo, descricao} |
naturezaJuridica, naturezaJuridicaCodigo |
Legal nature description and code |
capitalSocial |
Share capital in BRL (zero is kept) |
porte, porteCodigo |
Company size and code |
optanteSimples, dataOpcaoSimples, dataExclusaoSimples |
Simples Nacional flag and dates |
optanteMei, dataOpcaoMei, dataExclusaoMei |
MEI flag and dates |
regimeTributario, regimeTributarioAno, regimeTributarioHistorico |
Latest tax regime, its year, and the full per-year history |
endereco |
{tipoLogradouro, logradouro, numero, complemento, bairro, municipio, codigoMunicipioIbge, uf, cep, pais, codigoPais, nomeCidadeExterior} |
municipio, uf, cep |
Top-level address fields for spreadsheets |
telefone1, telefone2, fax, email |
Contact data when the registry publishes it |
socios |
Partner list: {nome, documento, tipo, qualificacao, codigoQualificacao, dataEntradaSociedade, faixaEtaria, codigoFaixaEtaria, pais, codigoPais, representanteLegal} |
companyAgeDays, statusAgeDays |
Days since activity start and since the current status |
source, sourceUrl, sourceUpdatedAt |
Data source, provider URL used (company endpoint for lookups, search query for discovery), and registry snapshot month |
recordType, scrapedAt |
Always company; ISO UTC scrape time |
Fallback depth. If the primary mirror and its same-schema fallback are unavailable, the independent fallback may omit the per-year tax regime and some partner detail (masked document, partner type, entry date, legal representative). Unavailable fields are omitted, never fabricated; source identifies the mirror that answered.
Input
| Field | Type | Default | Description |
|---|---|---|---|
mode |
string | lookup |
lookup or discovery |
cnpjs |
array | – | CNPJ numbers for lookup, numeric or alphanumeric, formatted or plain |
cnpjText |
string | – | CSV or free text containing CNPJs; valid values are extracted and deduplicated |
cnaes |
array | – | 7-digit CNAE codes for discovery (primary or secondary) |
uf |
string | ALL |
State for discovery |
municipio |
string | – | IBGE/SIAFI municipality code (digits, not a city name) |
naturezaJuridica |
string | – | 4-digit legal-nature code |
partnerCpf |
string | – | Masked partner CPF/CNPJ, e.g. ***123456** |
situacao |
string | ATIVA |
all, ATIVA, SUSPENSA, INAPTA, BAIXADA, NULA |
includePartners |
boolean | true |
Include the QSA list |
includeSecondaryActivities |
boolean | true |
Include secondary CNAEs |
maxItems |
integer | 1000 |
Max CNPJs processed in lookup or records emitted in discovery (1–100,000) |
Example: bulk lookup with partners
{
"mode": "lookup",
"cnpjs": ["18.236.120/0001-58", "00000000E08G12", "33.000.167/0001-01"],
"includePartners": true,
"includeSecondaryActivities": true
}
Example: paste a spreadsheet column
{
"mode": "lookup",
"cnpjText": "cliente,cnpj\nNubank,18.236.120/0001-58\nBanco do Brasil,00.000.000/E08G-12",
"maxItems": 500
}
Example: discover active companies by CNAE and city
{
"mode": "discovery",
"cnaes": ["4713004", "6209100"],
"uf": "SP",
"municipio": "3550308",
"situacao": "ATIVA",
"maxItems": 100
}
Example: find companies by a partner's masked CPF
{
"mode": "discovery",
"partnerCpf": "***550179**",
"uf": "RR",
"situacao": "all",
"maxItems": 20
}
Use cases
- KYB and vendor onboarding: confirm a Brazilian counterparty's status, legal nature, capital and owners before signing.
- Bulk CRM enrichment: turn a CNPJ column into industry, address, contact and ownership data.
- Compliance screening: review status reason, Simples/MEI and partner structure for risk triage.
- B2B prospecting: build lists by CNAE, state and municipality, then filter to active companies.
- Ownership research: trace a masked partner across companies or review a company's QSA.
- Market mapping: count companies in an activity or region before outreach.
FAQ
What is a CNPJ? Cadastro Nacional da Pessoa Jurídica — Brazil's 14-character company registration number issued by the Receita Federal. Since July 2026 new registrations can include letters (alphanumeric CNPJ), and this actor accepts both formats.
Where does the data come from? Public mirrors of the official Receita Federal CNPJ registry. The registry is published monthly, so very recent changes may not appear immediately.
Do I need an API key, login, cookie or proxy? No. The actor gets real data without credentials and without any proxy setup. Just fill in the input and run it.
What happens to invalid or unknown CNPJs? Invalid CNPJs are skipped before any request; unknown CNPJs are skipped by the source. The run summary reports invalid, not-found, duplicate and unavailable counts. No made-up records are ever added.
Why is the partner list (socios) empty for some companies?
MEI and individual-entrepreneur registrations normally have no QSA. The registry can also withhold a QSA in specific legal cases. The field is simply omitted rather than filled with placeholders.
Why is email often missing?
The public CNPJ registry rarely publishes company email addresses. When the source has one, it is included; otherwise the field is omitted. Phone and address data are more consistently available.
Does socios include equity percentages?
No. The public registry exposes the partner list, qualification, entry date, age band and masked document, but not each partner's percentage. Percentages are only in the company's contract at the Junta Comercial.
Can I search by a partner's CPF?
Yes, using the masked format shown in the QSA (for example ***123456**). Add a state or CNAE because the same six visible digits can match more than one person.
Is this affiliated with the Receita Federal or the Brazilian government? No. This is an independent, third-party actor that reads public registry mirrors and is not operated by or affiliated with any government agency.
Python quickstart
Use a schema-derived input and the Python standard library to start a run. An Apify account and token are required for execution.
Source build BWzgVjDPh2W6AweCl. Documentation is regenerated from the default published build; private drafts are not included.