# Brazil Cnpj Company Lookup (`real-estate-api/brazil-cnpj-company-lookup`) Actor

Brazil CNPJ Company Lookup Scraper is a Python tool designed to extract corporate registration details, tax status, share capital, and partner info using CNPJ numbers. It exports structured business datasets into clean CSV or JSON formats for risk assessment and lead generation.

- **URL**: https://apify.com/real-estate-api/brazil-cnpj-company-lookup.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Brazil CNPJ Company Lookup — Brazilian Company Partner (QSA) Data

![Brazil CNPJ Company Lookup cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/brazil-cnpj-company-lookup-cover.png)

Look up Brazilian company partner (QSA) information using 14-digit CNPJs. Provide a list of company identifiers, set a result limit, and collect partner names, roles, age ranges, entry dates, and related company details in a structured dataset.

### Overview

Brazil CNPJ Company Lookup collects partner and shareholder information associated with Brazilian company registration numbers (CNPJ).

Enter one or more CNPJs to retrieve available company partner records. Each partner is saved as an individual dataset row, with the parent company's CNPJ included for easy identification.

### Features

- **CNPJ lookup:** Collect partner information using 14-digit Brazilian company identifiers.
- **Partner details:** Retrieve names, roles, age ranges, and company entry dates when available.
- **Duplicate handling:** Removes duplicate CNPJs from the input before processing.
- **Result limits:** Control the maximum number of partner records collected.
- **Structured output:** Store results in a clean, spreadsheet-friendly format.
- **Multiple exports:** Export datasets as JSON, CSV, Excel, and other supported formats.

### Use Cases

- **Lead enrichment:** Add company partner names and roles to Brazilian business lists.
- **Business research:** Review partner qualifications, age ranges, and entry dates.
- **Compliance workflows:** Support company ownership and partner information reviews during vendor onboarding.
- **CRM management:** Enrich and update company records with available partner details.
- **Data analysis:** Compare partner information across multiple Brazilian companies.

### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `mode` | String | Lookup mode. Use `cnpj`. |
| `cnpjs` | Array | List of 14-digit Brazilian CNPJ numbers. |
| `maxItems` | Integer | Maximum number of partner records to collect. |
| `requestDelaySecs` | Number | Delay between lookups in seconds. |

### Example Input

```json
{
  "mode": "cnpj",
  "cnpjs": [
    "19131243000197"
  ],
  "maxItems": 50,
  "requestDelaySecs": 1
}
```

### What Data Does This Actor Extract?

Each dataset row represents one company partner record. Available fields may include:

| Field | Description |
|---|---|
| `cnpj` | Parent company's CNPJ |
| `nome_socio` | Partner or shareholder name |
| `qualificacao_socio` | Partner's role or qualification |
| `faixa_etaria` | Partner's age range |
| `codigo_faixa_etaria` | Age range classification code |
| `data_entrada_sociedade` | Date the partner joined the company |
| `cnpj_cpf_do_socio` | Masked partner identification number, when available |
| `identificador_de_socio` | Partner identification category |
| `pais` | Partner's country |
| `codigo_pais` | Country code |
| `cpf_representante_legal` | Masked legal representative identification number, when available |
| `nome_representante_legal` | Legal representative's name |
| `qualificacao_representante_legal` | Legal representative's qualification |
| `codigo_qualificacao_socio` | Partner qualification code |
| `codigo_qualificacao_representante_legal` | Legal representative qualification code |
| `scraped_at` | Date and time the record was collected |

Some fields may be empty or unavailable depending on the company record.

### Example Output

```json
{
  "pais": null,
  "nome_socio": "LUIZ CARLOS PINHO GUEDES",
  "codigo_pais": null,
  "faixa_etaria": "Entre 31 a 40 anos",
  "cnpj_cpf_do_socio": "***682847**",
  "qualificacao_socio": "Diretor",
  "codigo_faixa_etaria": 4,
  "data_entrada_sociedade": "2026-09-10",
  "identificador_de_socio": 2,
  "cpf_representante_legal": "***000000**",
  "nome_representante_legal": "",
  "codigo_qualificacao_socio": 10,
  "qualificacao_representante_legal": "Não informada",
  "codigo_qualificacao_representante_legal": 0,
  "cnpj": "19131243000197",
  "scraped_at": "2026-10-26T00:00:00+00:00"
}
```

### Working with Your Dataset

After the run finishes, open the dataset in Apify Console to review the collected partner records.

You can:

- Export results as JSON, CSV, or Excel.
- Filter records by company CNPJ.
- Sort partners by name, qualification, or entry date.
- Import the data into spreadsheets, CRM systems, or data analysis workflows.
- Combine multiple company lookup results for further research.

### FAQ

**Who is this actor for?**

It is designed for analysts, marketers, researchers, and developers who need Brazilian company partner information in a structured dataset.

**What is QSA?**

QSA stands for *Quadro de Sócios e Administradores*. It refers to the partners and administrators associated with a Brazilian company.

**What can I export?**

You can export JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I run it on a schedule?**

Yes. You can configure an Apify schedule to run your CNPJ lookups automatically at your preferred intervals.

**What happens if some company information is unavailable?**

Unavailable fields may be empty or null. The actor can continue processing other submitted CNPJs.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or officially associated with BrasilAPI or its owners. It collects information made publicly available through the service. Users are responsible for ensuring that their data collection and use comply with applicable laws and relevant terms.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. CNPJ lookup fetches company records from BrasilAPI.

## `cnpjs` (type: `array`):

14-digit CNPJs, one per line. Punctuation is stripped automatically.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "cnpj",
  "cnpjs": [
    "19131243000197"
  ],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cnpjs": [
        "19131243000197"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/brazil-cnpj-company-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "cnpjs": ["19131243000197"] }

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/brazil-cnpj-company-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cnpjs": [
    "19131243000197"
  ]
}' |
apify call real-estate-api/brazil-cnpj-company-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/brazil-cnpj-company-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/tWiSKhMHyMerSJLNu/builds/c1knTIr5YLman5FvM/openapi.json
