# Brazil CNPJ KYB, Sanctions (CEIS/CNEP) & Supplier Risk Dossier (`francescopacifico1905/brazil-kyb-dossier`) Actor

Instant Brazilian B2B counterparty KYB, Receita Federal cadastre + QSA partners, CGU federal sanctions (CEIS, CNEP, Leniency), and Compras.gov.br SICAF bidding eligibility in one typed JSON dossier.

- **URL**: https://apify.com/francescopacifico1905/brazil-kyb-dossier.md
- **Developed by:** [Francesco Pacifico](https://apify.com/francescopacifico1905) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 1,000 validated cnpj kyb & sanctions dossiers

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

### What does Brazil CNPJ KYB, Sanctions (CEIS/CNEP) & Supplier Risk Dossier do?

**Brazil CNPJ KYB, Sanctions (CEIS/CNEP) & Supplier Risk Dossier** is an ultra-fast, multi-source Brazilian corporate compliance API and MCP tool built on official public registries.

Given one or more Brazilian company tax IDs (**CNPJ**), it returns a unified, normalized JSON dossier combining:

1. **Receita Federal Company Cadastre** via resilient 4-API automatic fallback (`minhareceita.org`, `brasilapi.com.br`, `open.cnpja.com`, `publica.cnpj.ws`) — legal name (*Razão Social*), trade name, status (*ATIVA / BAIXADA / INAPTA*), founding date, share capital, CNAE codes, tax regime (Simples/MEI), address, contacts, and **full QSA corporate partners/officers**.
2. **CGU Federal Sanctions & Anti-Corruption Screening** from daily official [Portal da Transparência](https://portaldatransparencia.gov.br/) datasets:
   - **CEIS** (*Cadastro de Empresas Inidôneas e Suspensas*) — debarred/suspended suppliers.
   - **CNEP** (*Cadastro Nacional de Empresas Punidas*) — Anti-Corruption Law fines and penalties.
   - **Acordos de Leniência** — active and fulfilled leniency agreements.
   - Checks **both** the exact 14-digit CNPJ **and** the 8-digit corporate group root (**CNPJ Raiz**), plus unmasked corporate shareholders (`Pessoa Jurídica`) in the QSA!
3. **Federal Public Procurement Status (SICAF / Compras.gov.br)** — checks whether the company is an active registered federal supplier and eligible to bid (`habilitadoLicitar`).
4. **Deterministic Risk Engine** — outputs a ready-to-route `riskScore` (`0–100`), `riskLevel` (`LOW`, `MEDIUM`, `HIGH`, `CRITICAL`), and audit flags for automated KYC/KYB onboarding, B2B credit underwriting, ERP vendor approval, and AI procurement agents.

***

### Why use this Actor instead of single-source CNPJ scrapers?

- **Zero single-point-of-failure downtime**: Automatically cascades across 4 independent Receita Federal mirrors if any upstream API rate-limits or stalls.
- **No silent compliance blind spots**: A standard CNPJ lookup only tells you whether a company is `ATIVA` — it misses federal debarments, Anti-Corruption fines on sibling branches (`CNPJ Raiz`), and SICAF bidding blocks.
- **Sub-second MCP readiness**: Runs purely over lightweight asynchronous HTTP (`512 MB RAM`, zero headless browser), completing typical 1–10 CNPJ checks inside Apify MCP's synchronous 30-second wait window.
- **Fair Pay-Per-Event pricing**: Invalid Modulo-11 CNPJs, 404 non-existent entities, and upstream errors are emitted as free diagnostic rows (`billed: false`) and **never** billed as `kyb-dossier` events.

***

### What data does it extract?

| Field                          | Type                 | Description                                                                                                               |
| :----------------------------- | :------------------- | :------------------------------------------------------------------------------------------------------------------------ |
| `cnpjFormatted`                | `string`             | Formatted CNPJ (`XX.XXX.XXX/XXXX-XX`)                                                                                     |
| `status`                       | `string`             | `OK`, `INVALID_CNPJ`, `NOT_FOUND`, or `UPSTREAM_ERROR`                                                                    |
| `companyName`                  | `string`             | Official legal name (*Razão Social*)                                                                                      |
| `registrationStatus`           | `string`             | Receita Federal status (`ATIVA`, `BAIXADA`, `INAPTA`, etc.)                                                               |
| `capitalSocialBrl`             | `number`             | Declared share capital in BRL                                                                                             |
| `taxRegime`                    | `string`             | Latest tax regime (`SIMPLES_NACIONAL`, `MEI`, `LUCRO_REAL`, etc.)                                                         |
| `primaryCnae`                  | `object`             | Primary economic activity code and description                                                                            |
| `partners`                     | `array`              | QSA officers & shareholders with roles, entry dates, and corporate partner sanction counts                                |
| `exactSanctionsCount`          | `integer`            | Number of CEIS / CNEP / Leniency hits on the exact 14-digit CNPJ                                                          |
| `corporateGroupSanctionsCount` | `integer`            | Additional CGU sanction hits on sibling branches sharing the 8-digit CNPJ root                                            |
| `sanctions`                    | `object`             | Full arrays of `exactMatches`, `corporateGroupMatches`, and `partnerMatches` with fines, dates, agencies, and legal basis |
| `isPublicBiddingEligible`      | `boolean`            | Federal SICAF `habilitadoLicitar` status (`Compras.gov.br`)                                                               |
| `riskLevel` / `riskScore`      | `string` / `integer` | Deterministic `LOW` / `MEDIUM` / `HIGH` / `CRITICAL` tier (`0–100`) + `riskAssessment.flags`                              |

***

### How much does it cost?

This Actor uses transparent **Pay-Per-Event (PPE)** pricing with all compute and transfer bundled in (no separate usage fees):

- **Actor start (`apify-actor-start`)**: `$0.00005` per run (includes 5 seconds of free compute up to 1 GB RAM).
- **Validated Dossier (`kyb-dossier`)**: **`$0.004` per valid CNPJ dossier** (`$4.00` per 1,000 dossiers on Bronze, with automatic **10% Silver** and **20% Gold** store discounts).
- **Free Tier**: Apify's free `$5/month` credit covers **~1,250 full KYB & Sanctions dossiers** every month with zero credit card required.
- **Zero charge on invalid/missing CNPJs**: Checksum errors (`INVALID_CNPJ`), `NOT_FOUND`, and `UPSTREAM_ERROR` diagnostic rows are never billed.

***

### How to use with AI Agents (MCP), n8n, Make, or API

#### 1. AI Agents via Apify MCP (`https://mcp.apify.com`)

Connect Claude, Cursor, Antigravity, or custom agents to `https://mcp.apify.com` and call this Actor directly via `call-actor`:

```json
{
    "cnpjs": ["33.000.167/0001-01", "37.977.691/0007-83"],
    "includeSanctionsCheck": true,
    "includePublicSupplierCheck": true,
    "screenCorporatePartners": true,
    "maxItems": 25
}
```

#### 2. n8n / Make / REST API

Trigger synchronous runs and immediately receive the dataset JSON:

```bash
curl -X POST "https://api.apify.com/v2/acts/francescopacifico1905~brazil-kyb-dossier/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "cnpjs": ["33.000.167/0001-01"],
    "includeSanctionsCheck": true,
    "includePublicSupplierCheck": true
  }'
```

***

### Output example

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
    "cnpj": "12345678000195",
    "cnpjFormatted": "12.345.678/0001-95",
    "cnpjRoot": "12345678",
    "status": "OK",
    "billed": true,
    "companyName": "EXEMPLO SERVICOS INDUSTRIAIS LTDA",
    "tradeName": "EXEMPLO TECH",
    "registrationStatus": "ATIVA",
    "foundedDate": "2015-08-18",
    "isHeadquarters": true,
    "capitalSocialBrl": 500000,
    "taxRegime": "LUCRO_PRESUMIDO",
    "primaryCnae": {
        "code": "6201501",
        "description": "Desenvolvimento de programas de computador sob encomenda"
    },
    "partnersCount": 2,
    "exactSanctionsCount": 0,
    "corporateGroupSanctionsCount": 0,
    "activeSanctionsCount": 0,
    "isPublicBiddingEligible": true,
    "riskLevel": "LOW",
    "riskScore": 0,
    "riskAssessment": {
        "level": "LOW",
        "score": 0,
        "flags": [],
        "summary": "Receita Federal status: ATIVA; SICAF supplier eligible to bid."
    },
    "sources": {
        "cadastreProvider": "minhareceita",
        "cguSnapshotDate": "2026-11-13",
        "sicafChecked": true,
        "checkedAt": "2026-11-14T12:00:00.000Z"
    }
}
```

***

### Composable Brazil GovTech & B2G Pipeline (MCP + n8n)

Combine this Actor with its two sister Actors to automate end-to-end Brazilian public-sector origination and counterparty due diligence:

1. **Stage 1 — [Pre-Tender Funding & Works (`francescopacifico1905/brazil-transferegov-obras`)](https://apify.com/francescopacifico1905/brazil-transferegov-obras)**: Spot municipalities and executing agencies receiving fresh Transferegov transfers or managing `Paralisada`/`Inacabada` Obrasgov sites before formal bid notices drop.
2. **Stage 2 — [Open Tenders & Piggyback Atas (`francescopacifico1905/ibero-procurement-atas`)](https://apify.com/francescopacifico1905/ibero-procurement-atas)**: Pull live PNCP public tenders (*editais*) and reusable *Atas de Registro de Preços* (*carona*) plus market benchmark pricing for those target regions or objects.
3. **Stage 3 — [Counterparty CNPJ & Sanctions KYB (`francescopacifico1905/brazil-kyb-dossier`)](https://apify.com/francescopacifico1905/brazil-kyb-dossier)**: Run instant Receita Federal CNPJ health, UBO/QSA partner checks, CGU sanctions (CEIS/CNEP/CEAF/CEPIM), and SICAF qualification on shortlisted contractors, joint-venture partners, or award winners before contracting.

### FAQ, Compliance & Support

#### Where does the data come from?

All fields are fetched strictly from official Brazilian public open-data portals (`Portal da Transparência / CGU`, `Dados Abertos Compras.gov.br`, and public Receita Federal CNPJ open-data mirrors). No private, login-gated, or personal non-public data is accessed.

#### Legal & Ethical Notice

> Our Actors are ethical and only aggregate publicly disclosed corporate registration and federal sanction records made available under Brazilian open-data transparency statutes (LAI / Portal da Transparência). However, company records (such as officer/partner entries in QSA) may include names protected under Brazil's LGPD or GDPR depending on jurisdiction. Ensure your compliance, due-diligence, or KYB processing has a lawful basis.

For feature requests, bug reports, or custom integration feedback, please open an issue in the **Issues** tab or inspect the **API** tab for endpoint snippets.

# Actor input Schema

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

List of Brazilian company tax IDs (CNPJs) to verify. Accepts formatted (XX.XXX.XXX/XXXX-XX) or plain 14-digit strings.

## `includeSanctionsCheck` (type: `boolean`):

Screen exact CNPJ and 8-digit corporate group root (CNPJ Raiz) against official CGU CEIS (debarred), CNEP (anti-corruption fines), and Leniency Agreements.

## `includePublicSupplierCheck` (type: `boolean`):

Check federal SICAF / Compras.gov.br supplier registration and public bidding eligibility (habilitadoLicitar).

## `screenCorporatePartners` (type: `boolean`):

Cross-check any unmasked 14-digit corporate shareholders (Pessoa Juridica in QSA) against CGU sanctions at zero extra charge.

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

Maximum number of valid KYB dossiers to emit in this run (default 25 is tuned for sub-10s MCP synchronous calls).

## `concurrency` (type: `integer`):

Number of parallel CNPJ lookups.

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

Optional proxy configuration for large batch runs (not required for standard runs).

## Actor input object example

```json
{
  "cnpjs": [
    "33.000.167/0001-01",
    "00.000.000/0001-91"
  ],
  "includeSanctionsCheck": true,
  "includePublicSupplierCheck": true,
  "screenCorporatePartners": true,
  "maxItems": 25,
  "concurrency": 5
}
```

# Actor output Schema

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

Dataset containing validated company KYB and sanctions dossiers

# 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",
        "00.000.000/0001-91"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("francescopacifico1905/brazil-kyb-dossier").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",
        "00.000.000/0001-91",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("francescopacifico1905/brazil-kyb-dossier").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",
    "00.000.000/0001-91"
  ]
}' |
apify call francescopacifico1905/brazil-kyb-dossier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,francescopacifico1905/brazil-kyb-dossier"
        }
    }
}
```

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/G82U3piO6cZnEc0le/builds/GeL2I4Gw63itzYcXV/openapi.json
