# Brazil CNPJ Verification: Status, Age, CNAE, Name Match (`greyridge-signals/brazil-cnpj-verify`) Actor

CNPJ validator and Brazil KYB check for bulk lists. Validates check digits, then Receita Federal status, age, recently-formed flag, CNAE, size, address and optional name-match score. Billed only for registered CNPJs found; invalid and unknown are free. No partner names or CPFs.

- **URL**: https://apify.com/greyridge-signals/brazil-cnpj-verify.md
- **Developed by:** [Rez Archer](https://apify.com/greyridge-signals) (community)
- **Categories:** Business, Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 cnpj verifieds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Verification

Check a list of Brazilian CNPJ numbers and get back what the Receita Federal says about each one: whether it is registered, active or closed, how old it is, what it does (CNAE), where it is, and, if you supply the name you expect, how well that name matches the registered one.

You pay for registered CNPJs that come back with data. A number with bad check digits, a number that is not registered, a repeat inside the same run, or a registry outage costs nothing.

### What each row tells you

| Field | Meaning |
|---|---|
| `result` | `found`, `invalid` (check digits fail), `not_found`, `duplicate` or `error` |
| `valid_checksum` | The two CNPJ check digits validate. Done locally, before any lookup |
| `status` | `active`, `suspended`, `inapta`, `closed` or `nula`, with `status_since` and `status_reason` |
| `founded`, `age_years`, `recently_formed` | Start of activity, age, and a flag for CNPJs younger than `recentMonths` (default 12) |
| `legal_name`, `trade_name`, `establishment` | Razão social, nome fantasia, matriz or filial |
| `legal_nature`, `size_class`, `share_capital_brl` | Legal form, porte, capital social |
| `cnae_main`, `cnae_main_description`, `cnae_secondary_count` | Main activity code and text |
| `simples_nacional`, `mei`, `sole_proprietor` | Tax-regime flags; `sole_proprietor` marks an empresário individual or MEI |
| `address`, `city`, `state`, `postal_code`, `phones`, `email` | As published |
| `expected_name`, `name_verdict`, `name_match_confidence` | Only when you add a name after a pipe: `match`, `partial` or `mismatch`, with a 0 to 1 score |
| `partner_count` | Number of partners on file. Partner names and CPFs are not returned |

### Input

One CNPJ per line, punctuation optional. Add `| expected name` to check it:

```
33.000.167/0001-01 | Petrobras
00000000000191 | Banco do Brasil S.A.
47960950000121
```

Up to 2,000 per run. Duplicates are skipped before billing.

### Name matching

The score comes from the same matcher used in our US business verification actor. It folds accents and treats `S.A.`, `S/A`, `S A` and `SA` as the same legal form, and ignores `Ltda`, `ME`, `EPP`. `match` is a score at or above `minNameConfidence` (default 0.9). `partial` means every word of your name appears in the registered one (a brand like "Bradesco" inside "BANCO BRADESCO S.A.") or the score is 0.7 or more. Everything else is `mismatch`. The score and the name it matched on are always in the row, so you can set your own rule.

### Pricing

$0.0015 per registered CNPJ found (about $1.50 per 1,000). Nothing for invalid, unregistered, duplicate or errored lookups.

### Source and limits

Data comes from the Receita Federal CNPJ open-data release, read through the open BrasilAPI service with Minha Receita as a second mirror. No login, no key, no access control bypassed. The release is refreshed on the Receita's schedule, so a company registered in the last few weeks can show as `not_found`, and `status` can lag a recent change. This is a lookup of public registration data, not a credit report, tax-clearance check or legal opinion. Sole-proprietor registrations carry the owner's name as the legal name, as the Receita publishes it.

Search by company name is not supported: the open data has no name index. Bring the CNPJ, or find it from the company's invoice, website footer or contract.

# Actor input Schema

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

One CNPJ per line, with or without punctuation (33.000.167/0001-01 or 33000167000101). To check the registered name, add it after a pipe: 33000167000101 | Petrobras.

## `minNameConfidence` (type: `number`):

0.5 to 1. A given name scoring at or above this is 'match'. Below it, 'partial' (every word of your name appears in the registered name, or score 0.7+) or 'mismatch'.

## `recentMonths` (type: `integer`):

A CNPJ whose activity started within this many months gets recently_formed = true. Useful as a shell-company and onboarding-risk signal.

## Actor input object example

```json
{
  "cnpjs": [
    "33.000.167/0001-01 | Petrobras",
    "00.000.000/0001-91 | Banco do Brasil S.A.",
    "47960950000121 | Magazine Luiza",
    "33000167000102"
  ],
  "minNameConfidence": 0.9,
  "recentMonths": 12
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `stats` (type: `string`):

No description

# 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": [
        "33.000.167/0001-01 | Petrobras",
        "00.000.000/0001-91 | Banco do Brasil S.A.",
        "47960950000121 | Magazine Luiza",
        "33000167000102"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("greyridge-signals/brazil-cnpj-verify").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": [
        "33.000.167/0001-01 | Petrobras",
        "00.000.000/0001-91 | Banco do Brasil S.A.",
        "47960950000121 | Magazine Luiza",
        "33000167000102",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("greyridge-signals/brazil-cnpj-verify").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": [
    "33.000.167/0001-01 | Petrobras",
    "00.000.000/0001-91 | Banco do Brasil S.A.",
    "47960950000121 | Magazine Luiza",
    "33000167000102"
  ]
}' |
apify call greyridge-signals/brazil-cnpj-verify --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,greyridge-signals/brazil-cnpj-verify"
        }
    }
}
```

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/Ev3lBnH4ToJvCUjgx/builds/9HU4fyBawCsZyftXt/openapi.json
