# Brazil KYB, Sanctions & ESG Due Diligence (`brasil-api-lcm/apify-brazil-kyb-compliance`) Actor

Screen Brazilian companies (CNPJ/CPF) across Receita Federal QSA, CGU CEIS/CNEP/CEPIM sanctions, MTE Slave Labor Dirty List, and IBAMA Environmental Embargoes. Instant 0-100 risk score, JSON/CSV export, and MCP ready.

- **URL**: https://apify.com/brasil-api-lcm/apify-brazil-kyb-compliance.md
- **Developed by:** [Lucas Maia](https://apify.com/brasil-api-lcm) (community)
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 entity screeneds

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 KYB, Sanctions & ESG Due Diligence (`apify-brazil-kyb-compliance`)

Screen Brazilian companies (CNPJ) and individuals (CPF) against **6 official Brazilian government open-data compliance, sanctions, and ESG registries** in one fast, proxy-free API or MCP call:

- **Receita Federal CNPJ & QSA** (registration status, share capital, CNAE, address, corporate partners via BrasilAPI / MinhaReceita)
- **CGU CEIS** (Cadastro Nacional de Empresas Inidôneas e Suspensas — public procurement bans)
- **CGU CNEP** (Cadastro Nacional de Empresas Punidas — Brazilian Anti-Corruption Law fines)
- **CGU CEPIM** (Entidades Privadas Sem Fins Lucrativos Impedidas)
- **MTE Lista Suja do Trabalho Escravo** (Brazilian Ministry of Labor Forced Labor Dirty List)
- **IBAMA Termos de Embargo** (Environmental land/deforestation embargoes with hectares & lat/lng)

### Operation Modes

| Mode | Purpose | Charged Event |
| :--- | :--- | :--- |
| `screen_entities` (default) | Multi-registry KYB & ESG risk score (`0-100`, `CLEAN` -> `CRITICAL`) + QSA partners per CNPJ/CPF | `entity-screened` |
| `ceis_sanctions` | Search/filter CGU CEIS active sanctions by UF or keyword | `sanction-record` |
| `cnep_punishments` | Search/filter CGU CNEP corporate corruption fines | `sanction-record` |
| `cepim_impediments` | Search/filter CGU CEPIM grant impediments | `sanction-record` |
| `slave_labor_registry` | Search/filter MTE Slave Labor Dirty List | `sanction-record` |
| `ibama_embargoes` | Search/filter active IBAMA environmental embargoes | `sanction-record` |

### Example Input

```json
{
  "mode": "screen_entities",
  "documents": ["33000167000101", "11338577000124"],
  "includeReceita": true,
  "includeIbama": false
}
```

### Example Output (`screen_entities`)

```json
{
  "recordType": "KYB_SCREENING",
  "document": "11338577000124",
  "entityName": "CASSOL REPRESENTACOES E INTERMEDIACOES LTDA",
  "riskLevel": "HIGH",
  "riskScore": 50,
  "registrationStatus": "ATIVA",
  "totalSanctions": 2,
  "ceisHits": 1,
  "cnepHits": 1,
  "summary": "CEIS: ... | CNEP: Multa R$ 36,680.49"
}
```

### MCP & Standby Ready

Runs as an on-demand Apify Actor, REST endpoint (Standby), or MCP server exposing `screen_brazil_entities` and `search_brazil_sanctions`. Zero residential proxies required.

# Actor input Schema

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

Select 'screen_entities' to run consolidated multi-registry risk scoring on CNPJs/CPFs, or search/export individual sanctions registries.

## `documents` (type: `array`):

List of Brazilian CNPJs (14 digits) or CPFs (11 digits) to screen in 'screen_entities' mode.

## `query` (type: `string`):

Optional case-insensitive filter by company name, person, agency, municipality, or reason across selected registry.

## `uf` (type: `string`):

Optional 2-letter Brazilian state filter (e.g. SP, PA, MT, RJ) for registry search modes.

## `includeReceita` (type: `boolean`):

Fetch corporate registration status, capital, CNAE, and partners (QSA) via BrasilAPI/MinhaReceita for each CNPJ.

## `includeIbama` (type: `boolean`):

Also cross-check the full IBAMA environmental embargo dataset (~47 MB ZIP) during 'screen_entities'. Disable for <3s screening across CGU + MTE + Receita.

## `maxResults` (type: `integer`):

Maximum number of records returned in registry search/export modes.

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

HTTP timeout per government data source.

## Actor input object example

```json
{
  "mode": "screen_entities",
  "documents": [
    "33000167000101",
    "11338577000124"
  ],
  "query": "",
  "uf": "",
  "includeReceita": true,
  "includeIbama": false,
  "maxResults": 50,
  "timeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (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 = {
    "documents": [
        "33000167000101",
        "11338577000124"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasil-api-lcm/apify-brazil-kyb-compliance").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 = { "documents": [
        "33000167000101",
        "11338577000124",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("brasil-api-lcm/apify-brazil-kyb-compliance").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 '{
  "documents": [
    "33000167000101",
    "11338577000124"
  ]
}' |
apify call brasil-api-lcm/apify-brazil-kyb-compliance --silent --output-dataset

```

## MCP server setup

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

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/2tQ7ErJuUtEJSPMzF/builds/D2BcYg6WA61btnr0P/openapi.json
