# Brazil CEIS/CNEP Sanctions Delta (`downright_blessing/brazil-ceis-cnep-sanctions-delta`) Actor

Pull CEIS and CNEP Brazil sanctions (Portal da Transparência / CGU) as delta-friendly JSON. CNPJ/CPF, sanction type, dates and authority — for KYC, AML, supplier due diligence and bid-desk screening.

- **URL**: https://apify.com/downright\_blessing/brazil-ceis-cnep-sanctions-delta.md
- **Developed by:** [Joao Pedro Rosado](https://apify.com/downright_blessing) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 sanction rows

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 CEIS / CNEP Sanctions Delta

Pull **CEIS** and **CNEP** **sanctions** records from Brazil’s official **Portal da Transparência** (CGU) public API. Normalized CNPJ/CPF, sanction type, dates, sanctioning authority and legal basis — built for compliance screening, supplier risk and delta-friendly monitoring.

CEIS (Cadastro de Empresas Inidôneas e Suspensas) and CNEP (Cadastro Nacional de Empresas Punidas) are the federal registers of sanctioned parties. This Actor queries both (or either) and emits stable `deltaKey` values so your pipeline can track changes over scheduled runs.

**Store:** [brazil-ceis-cnep-sanctions-delta](https://apify.com/downright_blessing/brazil-ceis-cnep-sanctions-delta)

***

### What it does

1. Calls the Portal da Transparência public API for `ceis` and/or `cnep`.
2. Optionally filters by sanction date window and exact sanctioned CNPJ/CPF.
3. Writes normalized Dataset rows with `deltaKey`, register tag and key sanction fields.

**API key:** the Portal requires a **free** registered key ([cadastrar e-mail](https://portaldatransparencia.gov.br/api-de-dados/cadastrar-email)). Pass it as secret input `apiKey` (or env `PORTAL_TRANSPARENCIA_API_KEY`). The Actor never logs or persists the key.

### Who it's for

- Supplier due diligence and KYC / AML enrichment for Brazil
- Bid desks blocking sanctioned bidders
- Compliance platforms and risk scores
- Agents that need **CEIS CNEP** as a structured tool

### Input summary

| Field | Required | Description |
|---|---|---|
| `datasets` | yes | List: `ceis`, `cnep` (default both) |
| `apiKey` | for live runs | Free Portal da Transparência API key (secret) |
| `dateFrom` / `dateTo` | no | Sanction start window as `DD/MM/YYYY` |
| `cnpj` | no | Exact sanctioned CNPJ/CPF (`codigoSancionado`) |
| `maxItems` | no | Cap across both registers (default 100) |
| `pageSize` | no | Portal page size (default 50) |

v1 exposes stable `deltaKey` values; automatic historical deduplication across runs is left to your scheduler / warehouse.

### Output fields

One Dataset row per sanction record:

`source`, `register` (`CEIS` / `CNEP`), `deltaKey`, `id`, `cnpjSancionado`, `nomeSancionado`, `tipoSancao`, `dataInicioSancao`, `dataFimSancao`, `orgaoSancionador`, `fundamentacaoLegal`, `rawUpdatedAt`, `scrapedAt`.

### Pricing

**Pay-per-event** is already configured (Actor start + result rows). Keep `maxItems` as the spend cap. See the Store pricing panel for current event prices. Your Portal API key is free from CGU; Apify billing is separate.

### Quick start (Apify Console)

1. Register a free key at [Portal da Transparência API](https://portaldatransparencia.gov.br/api-de-dados/cadastrar-email).
2. Open [brazil-ceis-cnep-sanctions-delta](https://apify.com/downright_blessing/brazil-ceis-cnep-sanctions-delta) → **Start**.
3. Paste the key into `apiKey` (secret), keep `datasets: ["ceis","cnep"]`, set dates / CNPJ if needed.
4. Cap `maxItems` → Run → use `deltaKey` in your warehouse for incremental loads.

```json
{
  "apiKey": "YOUR_FREE_PORTAL_KEY",
  "datasets": ["ceis", "cnep"],
  "dateFrom": "01/09/2026",
  "dateTo": "24/09/2026",
  "maxItems": 100
}
```

### Related Actors

- [Brazil PNCP Public Tenders Monitor](https://apify.com/downright_blessing/brazil-pncp-tenders-monitor)
- [Brazil PNCP Awarded Contracts](https://apify.com/downright_blessing/brazil-pncp-awarded-contracts)
- [Brazil TCU Acórdãos Keyword Monitor](https://apify.com/downright_blessing/brazil-tcu-acordaos-keyword-monitor)
- [Brazil NCM / TIPI Lookup](https://apify.com/downright_blessing/brazil-ncm-tipi-lookup)

### Legal / data source

Official **Portal da Transparência** public API (CGU). Government open data; free API key required by the Portal. Do not commit keys to source control. Respect Portal quotas and fair use.

***

### Português (resumo)

Consulta **CEIS** e **CNEP** na API pública do **Portal da Transparência**. Normaliza CNPJ, tipo de sanção, datas, órgão e fundamento. Exige chave gratuita do Portal (input secreto `apiKey`). Emite `deltaKey` para pipelines incrementais. **Pay-per-event** na Store.

# Actor input Schema

## `apiKey` (type: `string`):

Free key issued by portaldatransparencia.gov.br/api-de-dados/cadastrar-email. Do not commit it.

## `datasets` (type: `array`):

Any of: ceis, cnep.

## `dateFrom` (type: `string`):

Optional API date filter; use the Portal's accepted date format.

## `dateTo` (type: `string`):

Optional API date filter.

## `cnpj` (type: `string`):

Optional exact code filter (codigoSancionado).

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

Hard cap across CEIS and CNEP.

## `pageSize` (type: `integer`):

Portal page size; keep modest to respect service limits.

## Actor input object example

```json
{
  "datasets": [
    "ceis",
    "cnep"
  ],
  "dateFrom": "01/09/2026",
  "dateTo": "24/09/2026",
  "maxItems": 100,
  "pageSize": 50
}
```

# Actor output Schema

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

Default dataset items

# 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 = {
    "dateFrom": "01/09/2026",
    "dateTo": "24/09/2026"
};

// Run the Actor and wait for it to finish
const run = await client.actor("downright_blessing/brazil-ceis-cnep-sanctions-delta").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 = {
    "dateFrom": "01/09/2026",
    "dateTo": "24/09/2026",
}

# Run the Actor and wait for it to finish
run = client.actor("downright_blessing/brazil-ceis-cnep-sanctions-delta").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 '{
  "dateFrom": "01/09/2026",
  "dateTo": "24/09/2026"
}' |
apify call downright_blessing/brazil-ceis-cnep-sanctions-delta --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,downright_blessing/brazil-ceis-cnep-sanctions-delta"
        }
    }
}
```

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/EpimlMA4TsiqdURtc/builds/Ojo2aJNVJQaHBJSyt/openapi.json
