# Brazil ESG & IBAMA Embargo Compliance Engine (EUDR & KYC) (`brazil-data-labs/brazil-ibama-esg-compliance`) Actor

Real-time Brazilian environmental compliance, deforestation embargoes (Termos de Embargo), and environmental fines (Autos de Infração) from IBAMA Open Data. Built for EUDR supply chain due diligence, KYC/AML risk screening, ESG funds, and AI Compliance Agents via Apify MCP.

- **URL**: https://apify.com/brazil-data-labs/brazil-ibama-esg-compliance.md
- **Developed by:** [Brazil Data Labs](https://apify.com/brazil-data-labs) (community)
- **Categories:** AI, 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

from $0.01 / ibama esg record returned

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 ESG & IBAMA Embargo Compliance Engine (EUDR & KYC/AML API)

**Official Brazilian Environmental Embargoes (*Termos de Embargo*) & Infraction Fines (*Autos de Infração*) from IBAMA Open Data — Normalized, English-Translated, and Ready for EUDR Supply Chain Due Diligence, KYC/AML Screening, ESG Hedge Funds, and AI Compliance Agents via Apify MCP.**

***

### Why Global Commodity Traders, Banks & AI Agents Use This Actor

Under the **EU Deforestation Regulation (EUDR)**, international banking KYC/AML mandates, and global corporate ESG frameworks, commodity buyers (**soy, beef, leather, coffee, cocoa, timber, pulp & paper**) and institutional investors are legally required to verify that Brazilian suppliers, farms, and landowners are free from active environmental embargoes and deforestation fines before executing contracts or disbursing credit.

Raw data from **IBAMA** (*Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis*) is fragmented across massive, multi-hundred-megabyte Portuguese CSV/ZIP files with inconsistent CPF/CNPJ formatting, multi-line fields, and government ICP-Brasil SSL quirks.

**`brazil-ibama-esg-compliance`** solves this instantly:

- **100% Official & Legal Open Data:** Connects live to IBAMA's official CKAN Open Data API (`dadosabertos.ibama.gov.br`) and Azure Blob Storage repositories.
- **Dual Enforcement Coverage:** Screens both **Termos de Embargo** (embargoed rural areas/farms where economic activity is legally prohibited) and **Autos de Infração** (monetary environmental fines and administrative proceedings).
- **Executive English Output Schema:** Standardizes Portuguese legal records into clean English JSON with normalized **CPF/CNPJ** identifiers, **affected area in hectares (`affectedAreaHa`)**, **fine amounts in BRL (`fineAmountBrl`)**, **centroid coordinates (`latitude` / `longitude`)**, **biome**, and an automated **`eudrRiskFlag`** (`HIGH_DEFORESTATION_EMBARGO` vs. `ENVIRONMENTAL_NON_COMPLIANCE`).
- **AI Agent & Apify MCP Native:** Designed from the ground up with strongly typed schemas so Claude, GPT, Gemini, and LangChain/CrewAI compliance agents can autonomously screen suppliers via the **Apify Model Context Protocol (MCP)**.

***

### Key Use Cases

1. **EUDR Supply Chain Due Diligence (Soy, Cattle, Coffee, Timber):** Screen direct and indirect Brazilian suppliers by **CNPJ/CPF**, **Landowner/Farm Name**, or **Municipality** (e.g., *Altamira - PA*, *São Félix do Xingu - PA*, *Canarana - MT*) before shipment clearance.
2. **Global KYC / KYB & Agribusiness Credit Risk:** Automate environmental sanction checks for trade finance, rural credit underwriting, and vendor onboarding.
3. **ESG Portfolio & Sovereign Risk Screening:** Monitor public and private companies operating in the **Amazon (`Amazônia`)**, **Cerrado**, and **Atlantic Forest (`Mata Atlântica`)** biomes.
4. **Autonomous AI Compliance Officers (MCP):** Connect this Actor as a tool in your AI Agent workflow to answer prompts like *"Check if CNPJ 07.161.332/0001-05 has any IBAMA embargoes or flora fines."*

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `taxIds` | `array<string>` | `[]` | List of Brazilian **CNPJ** (14 digits) or **CPF** (11 digits) identifiers. Accepts formatted (`07.161.332/0001-05`) or unformatted (`07161332000105`) strings with automatic leading-zero normalization. |
| `entityNameContains` | `string` | `""` | Case-insensitive and accent-insensitive substring search on the offender, company, or landowner name (e.g., `"MADEIREIRA"`, `"AGROPECUARIA"`). |
| `states` | `array<string>` | `[]` | List of 2-letter Brazilian state codes (UFs), such as `["PA", "MT", "AM", "RO"]`. |
| `municipality` | `string` | `""` | Case-insensitive and accent-insensitive municipality filter (e.g., `"Altamira"`, `"Canarana"`). |
| `datasetScope` | `string` | `"BOTH"` | `"BOTH"` (Embargoes + Fines), `"EMBARGOES_ONLY"` (*Termos de Embargo*), or `"INFRACTIONS_ONLY"` (*Autos de Infração*). |
| `includeCancelled` | `boolean` | `false` | When `false`, excludes records marked as cancelled (`SIT_CANCELADO = 'S'`). |
| `maxResults` | `integer` | `100` | Maximum number of matching compliance records to return (`1` to `10,000`). |

#### Example Input (Targeted Supplier & Municipality Audit)

```json
{
    "taxIds": ["07.161.332/0001-05", "48522783349"],
    "states": ["MG", "CE"],
    "datasetScope": "BOTH",
    "includeCancelled": false,
    "maxResults": 50
}
```

#### Example Input (Regional EUDR Deforestation Screening in Pará)

```json
{
    "states": ["PA"],
    "municipality": "Altamira",
    "datasetScope": "BOTH",
    "maxResults": 100
}
```

***

### Output Schema (Executive English JSON)

Each record pushed to the default Apify Dataset follows a standardized compliance schema:

```json
{
    "recordType": "EMBARGO",
    "recordId": "2QJILJXL",
    "processNumber": "02007003548202533",
    "taxId": "48522783349",
    "taxIdFormatted": "485.227.833-49",
    "entityName": "JOSE WEDER BASILIO RABELO",
    "propertyName": "Sitio Mutamba",
    "stateUf": "CE",
    "municipality": "Morada Nova",
    "biome": null,
    "affectedAreaHa": 71.9994,
    "fineAmountBrl": null,
    "occurrenceDate": "2025-09-25",
    "status": "Lavrado",
    "infractionCategory": "Atividade",
    "legalBasis": "Fica embargada uma área de 71,9987 ha, conforme polígono anexado ao processo gerado pelo presente auto de infração.",
    "coordinates": {
        "latitude": -4.867833,
        "longitude": -38.333337
    },
    "eudrRiskFlag": "HIGH_DEFORESTATION_EMBARGO",
    "officialSource": {
        "agency": "IBAMA (Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis)",
        "dataset": "Termos de Embargo (SIFISC / Dados Abertos)",
        "resourceUrl": "https://stibamadadosabertosprd.blob.core.windows.net/dados-abertos/dados/TERMOS_DE_EMBARGO/TERMO_EMBARGO/termo_de_embargo.csv",
        "lastReportUpdate": "2026-11-10 00:52:53",
        "retrievedAtUtc": "2026-11-10T17:25:00Z"
    }
}
```

#### Example Output: Environmental Infraction Fine (`INFRACTION_FINE`)

```json
{
    "recordType": "INFRACTION_FINE",
    "recordId": "VA6FP3SO",
    "processNumber": "02555.000003/2026-40",
    "taxId": "07161332000105",
    "taxIdFormatted": "07.161.332/0001-05",
    "entityName": "MADEIREIRA SÃO GERALDO DE PALMA LTDA ME",
    "propertyName": "Zona Urbana",
    "stateUf": "MG",
    "municipality": "PALMA",
    "biome": "Mata Atlantica",
    "affectedAreaHa": null,
    "fineAmountBrl": 51300.0,
    "occurrenceDate": "2026-01-06",
    "status": "Lavrado",
    "infractionCategory": "Infração da Flora(Não Classificada-Móvel)",
    "legalBasis": "Comercializar 171 metros cúbicos de madeira serrada/beneficiada de espécies nativas sem emissão de licença válida (DOF para Isento de CTF), outorgado pela autoridade ambiental competente. [Art. 72 - Lei 9605/98, Art. 70 § 1 - Lei 9605/98, Art. 3 Inc. 2 - Decreto 6514/2008.]",
    "coordinates": {
        "latitude": -21.378611,
        "longitude": -42.315833
    },
    "eudrRiskFlag": "HIGH_DEFORESTATION_EMBARGO",
    "officialSource": {
        "agency": "IBAMA (Instituto Brasileiro do Meio Ambiente e dos Recursos Naturais Renováveis)",
        "dataset": "Autos de Infração (SIFISC / Dados Abertos)",
        "resourceUrl": "https://stibamadadosabertosprd.blob.core.windows.net/dados-abertos/dados/SIFISC/auto_infracao/auto_infracao/auto_infracao_csv.zip",
        "lastReportUpdate": "2026-11-10 01:31:05",
        "retrievedAtUtc": "2026-11-10T17:25:00Z"
    }
}
```

***

### Transparent Pay-Per-Event (PPE) Pricing

This Actor uses Apify's fair **Pay-Per-Event** model so you only pay for verified upstream availability and clean compliance records returned:

- **`compliance-query-start`**: Triggered once per run **only after** verifying live connectivity to IBAMA's Open Data servers (protects buyers if the government endpoint is undergoing maintenance).
- **`esg-record-returned`**: Triggered once per matching, normalized ESG compliance record delivered to your dataset.

***

### Keywords & SEO Tags

*Brazil KYC, IBAMA Embargoes API, EUDR Deforestation Compliance, CNPJ ESG Risk, Brazilian Environmental Fines MCP, Termos de Embargo IBAMA, Autos de Infração IBAMA, Brazil Supply Chain Due Diligence, Soy & Beef Deforestation Screening, Brazilian Agribusiness AML/KYC.*

# Actor input Schema

## `taxIds` (type: `array`):

List of Brazilian company (CNPJ, 14 digits) tax identifiers to screen. Accepts formatted ('07.161.332/0001-05') or unformatted ('07161332000105') strings. Leave empty to filter by name or geography.

## `entityNameContains` (type: `string`):

Case-insensitive and accent-insensitive substring filter for the company, timber mill, or agribusiness name (e.g., 'MADEIREIRA', 'AGROPECUARIA', 'FLORESTAL').

## `states` (type: `array`):

List of 2-letter Brazilian state codes (UFs) to filter records (e.g., \['PA', 'MT', 'AM', 'RO', 'MG']). Case-insensitive.

## `municipality` (type: `string`):

Case-insensitive and accent-insensitive municipality filter (e.g., 'Altamira', 'Sao Felix do Xingu', 'Novo Progresso').

## `datasetScope` (type: `string`):

Select which official IBAMA datasets to query: 'EMBARGOES_ONLY' (Termos de Embargo - fastest & critical for EUDR deforestation screening), 'BOTH' (Embargoes + Infraction Fines), or 'INFRACTIONS_ONLY' (Autos de Infração).

## `includeCancelled` (type: `boolean`):

When false (default), excludes embargoes or infraction notices marked as cancelled ('SIT_CANCELADO' = 'S') in IBAMA's system.

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

Maximum number of matching compliance records to return (1 to 10,000). Each returned record triggers one 'esg-record-returned' PPE event.

## Actor input object example

```json
{
  "taxIds": [],
  "entityNameContains": "",
  "states": [
    "PA",
    "MT"
  ],
  "municipality": "",
  "datasetScope": "EMBARGOES_ONLY",
  "includeCancelled": false,
  "maxResults": 5
}
```

# Actor output Schema

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

Link to the dataset view containing all matched IBAMA environmental embargoes and fines.

## `datasetItems` (type: `string`):

Direct API link to all returned compliance records in JSON format.

# 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 = {
    "taxIds": [],
    "entityNameContains": "",
    "states": [
        "PA",
        "MT"
    ],
    "municipality": "",
    "datasetScope": "EMBARGOES_ONLY",
    "includeCancelled": false,
    "maxResults": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("brazil-data-labs/brazil-ibama-esg-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 = {
    "taxIds": [],
    "entityNameContains": "",
    "states": [
        "PA",
        "MT",
    ],
    "municipality": "",
    "datasetScope": "EMBARGOES_ONLY",
    "includeCancelled": False,
    "maxResults": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("brazil-data-labs/brazil-ibama-esg-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 '{
  "taxIds": [],
  "entityNameContains": "",
  "states": [
    "PA",
    "MT"
  ],
  "municipality": "",
  "datasetScope": "EMBARGOES_ONLY",
  "includeCancelled": false,
  "maxResults": 5
}' |
apify call brazil-data-labs/brazil-ibama-esg-compliance --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brazil-data-labs/brazil-ibama-esg-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/pajfgurfFP5GiSkb5/builds/Z4W6R6zIkP7tcvrf6/openapi.json
