# Mineração BR — Processos e Royalties (ANM) (`jenko_systems/brazil-mining-anm`) Actor

Processos minerários ativos e royalties CFEM por município, empresa e substância. 270k processos + 1,3M registros CFEM (2002–hoje). Fonte: ANM.

Active mining processes and CFEM royalties by municipality, company and substance. 270k processes + 1.3M CFEM records (2002–present). Source: ANM.

- **URL**: https://apify.com/jenko\_systems/brazil-mining-anm.md
- **Developed by:** [Jenko Systems](https://apify.com/jenko_systems) (community)
- **Categories:** News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.00005 / actor start

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Mineração BR — Processos e Royalties (ANM)

A API mais completa para dados de mineração no Brasil — processos minerários ativos e royalties CFEM por município, empresa e substância, com dados diretamente da ANM (Agência Nacional de Mineração).

### O que você recebe

- **270.000+ processos minerários ativos** em todos os 27 estados (SIGMINE)
- **1,3 milhão de registros de royalties** (CFEM) de 2002 até hoje
- **3.810 municípios** com atividade minerária registrada
- **315 substâncias minerais** — ferro, ouro, bauxita, cobre, calcário e muito mais
- **R$ 50,8 bilhões** em royalties históricos mapeados

### Modos de consulta

#### `ranking_cfem` — Municípios que mais pagaram royalties
```json
{ "mode": "ranking_cfem", "top_n": 20 }
````

Retorna o ranking histórico nacional. Parauapebas/PA lidera com R$ 9,8 bilhões (Mina de Carajás).

#### `municipio` — Processos e royalties de uma cidade

```json
{
  "mode": "municipio",
  "municipio": "ITABIRA",
  "uf": "MG"
}
```

#### `estado` — Visão geral de mineração num estado

```json
{
  "mode": "estado",
  "uf": "MG"
}
```

Retorna processos ativos, área total, top substâncias e top municípios por royalty.

#### `empresa` — Processos e royalties de uma empresa

```json
{
  "mode": "empresa",
  "empresa": "VALE"
}
```

Busca por nome parcial. Retorna todos os processos e royalties históricos da empresa.

#### `substancia` — Ranking de produtores de uma substância

```json
{
  "mode": "substancia",
  "substancia": "FERRO",
  "top_n": 20
}
```

### Casos de uso

- **Fundos de investimento**: due diligence em empresas mineradoras e ativos minerários
- **Escritórios de advocacia mineral**: pesquisa de processos por titular, área e fase
- **Prefeituras e governos estaduais**: monitoramento de royalties CFEM recebidos
- **Jornalismo investigativo**: rastreamento de concessões, licenças e pagamentos
- **Pesquisa acadêmica**: análise histórica da indústria minerária brasileira
- **Startups de geoprocessamento**: enriquecimento de dados territoriais

### Dados disponíveis

| Dataset | Registros | Cobertura | Atualização |
|---------|-----------|-----------|-------------|
| SIGMINE (processos) | 270.000+ | 27 estados | Diária |
| CFEM (royalties) | 1.300.000+ | 3.810 municípios | Mensal |

### Fonte dos dados

Todos os dados são coletados da ANM ([gov.br/anm](https://www.gov.br/anm)) sob licença de dados abertos:

- **SIGMINE**: Sistema de Informações Geográficas da Mineração
- **CFEM**: Compensação Financeira pela Exploração de Recursos Minerais

### Destaques do banco

Top municípios por royalties históricos (CFEM):

1. Parauapebas/PA — R$ 9,8 bilhões (Mina de Carajás — Vale)
2. Canaã dos Carajás/PA — R$ 6,9 bilhões (S11D — Vale)
3. Itabirito/MG — R$ 2,5 bilhões (Quadrilátero Ferrífero)
4. Mariana/MG — R$ 1,6 bilhões (Samarco / Vale / BHP)

# Actor input Schema

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

O que você quer consultar.

## `municipio` (type: `string`):

Nome do município. Ex: ITABIRA, MARIANA, PARAUAPEBAS. Obrigatório no modo 'Município'.

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

Sigla do estado. Ex: MG, PA, SP. Obrigatório no modo 'Estado'. Opcional nos demais para filtrar.

## `empresa` (type: `string`):

Nome parcial da empresa ou CNPJ. Ex: VALE, ANGLOGOLD, KINROSS. Obrigatório no modo 'Empresa'.

## `substancia` (type: `string`):

Nome da substância. Ex: FERRO, OURO, BAUXITA, CALCARIO, COBRE. Obrigatório no modo 'Substância'.

## `ano` (type: `integer`):

Filtrar royalties de um ano específico. Ex: 2024. Vazio = histórico completo (2002–hoje).

## `top_n` (type: `integer`):

Quantos resultados retornar no ranking.

## Actor input object example

```json
{
  "mode": "ranking_cfem",
  "top_n": 20
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("jenko_systems/brazil-mining-anm").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("jenko_systems/brazil-mining-anm").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call jenko_systems/brazil-mining-anm --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jenko_systems/brazil-mining-anm",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mineração BR — Processos e Royalties (ANM)",
        "description": "Processos minerários ativos e royalties CFEM por município, empresa e substância. 270k processos + 1,3M registros CFEM (2002–hoje). Fonte: ANM.\n\nActive mining processes and CFEM royalties by municipality, company and substance. 270k processes + 1.3M CFEM records (2002–present). Source: ANM.",
        "version": "1.0",
        "x-build-id": "K4Ub4ndrQB5IiMvse"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jenko_systems~brazil-mining-anm/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jenko_systems-brazil-mining-anm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jenko_systems~brazil-mining-anm/runs": {
            "post": {
                "operationId": "runs-sync-jenko_systems-brazil-mining-anm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jenko_systems~brazil-mining-anm/run-sync": {
            "post": {
                "operationId": "run-sync-jenko_systems-brazil-mining-anm",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Modo de consulta",
                        "enum": [
                            "municipio",
                            "estado",
                            "empresa",
                            "substancia",
                            "ranking_cfem"
                        ],
                        "type": "string",
                        "description": "O que você quer consultar.",
                        "default": "ranking_cfem"
                    },
                    "municipio": {
                        "title": "Município",
                        "type": "string",
                        "description": "Nome do município. Ex: ITABIRA, MARIANA, PARAUAPEBAS. Obrigatório no modo 'Município'."
                    },
                    "uf": {
                        "title": "Estado (sigla)",
                        "type": "string",
                        "description": "Sigla do estado. Ex: MG, PA, SP. Obrigatório no modo 'Estado'. Opcional nos demais para filtrar."
                    },
                    "empresa": {
                        "title": "Empresa",
                        "type": "string",
                        "description": "Nome parcial da empresa ou CNPJ. Ex: VALE, ANGLOGOLD, KINROSS. Obrigatório no modo 'Empresa'."
                    },
                    "substancia": {
                        "title": "Substância mineral",
                        "type": "string",
                        "description": "Nome da substância. Ex: FERRO, OURO, BAUXITA, CALCARIO, COBRE. Obrigatório no modo 'Substância'."
                    },
                    "ano": {
                        "title": "Ano (para ranking CFEM)",
                        "minimum": 2002,
                        "maximum": 2026,
                        "type": "integer",
                        "description": "Filtrar royalties de um ano específico. Ex: 2024. Vazio = histórico completo (2002–hoje)."
                    },
                    "top_n": {
                        "title": "Tamanho do ranking",
                        "minimum": 5,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Quantos resultados retornar no ranking.",
                        "default": 20
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
