# Brazil Central Bank Indicators (Selic, IPCA, IGP-M, CDI, USD) (`dados_publicos_br/bcb-indicadores`) Actor

Clean time series from the Brazilian Central Bank (BCB SGS): Selic, CDI, IPCA, IGP-M, INPC, exchange rates and more, plus accumulated inflation for any period.

- **URL**: https://apify.com/dados_publicos_br/bcb-indicadores.md
- **Developed by:** [Dados Públicos BR](https://apify.com/dados_publicos_br) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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 Central Bank Indicators (Selic, IPCA, IGP-M, CDI, USD)

Clean, ready-to-use time series from the **Banco Central do Brasil (BCB)**, the SGS system, without dealing with its quirks: Brazilian date formats, numbers as strings, the 10-year limit on daily series, missing names and units.

Pick indicators from a curated catalog (or any SGS code), choose a period, and get either the **full history** or a **one-line summary with the accumulated change**, e.g. *"IPCA accumulated over the last 12 months"* for rent and contract adjustments.

### Curated catalog

| Key | Indicator | Unit |
|---|---|---|
| `selic_meta` | Selic target rate set by Copom | % p.a. |
| `selic_diaria` / `selic_anualizada` | Selic effective rate, daily / annualized (base 252) | % p.d. / % p.a. |
| `cdi_diario` / `cdi_anualizado` | CDI rate, daily / annualized (base 252) | % p.d. / % p.a. |
| `ipca` / `ipca_12m` / `ipca_15` | IPCA inflation: monthly, 12-month, IPCA-15 | % |
| `inpc`, `igpm`, `igpdi`, `incc` | INPC, IGP-M, IGP-DI, INCC monthly change | % p.m. |
| `tr` | TR reference rate | % p.m. |
| `poupanca` | Savings account (poupança) yield | % p.m. |
| `dolar_venda` / `dolar_compra` | USD/BRL PTAX sell / buy | BRL per USD |
| `euro_venda` | EUR/BRL sell | BRL per EUR |
| `ibc_br` / `ibc_br_dessaz` | IBC-Br economic activity index (raw / seasonally adjusted) | index |

Need something else? Add any code from the [SGS catalog](https://www3.bcb.gov.br/sgspub/) in `codigosPersonalizados`.

### How to use

1. Open this Actor in Apify Console (you can try it on Apify's free plan).
2. Fill in the input, or keep the example values to see how the output looks.
3. Click **Start** and wait for the run to finish.
4. Download the results as JSON, CSV or Excel from the run's output, or get them through the Apify API.
5. To get fresh data automatically, create an Apify **Schedule** for the Actor (for example, every morning).

### Input examples

**IGP-M and IPCA accumulated over 12 months (rent adjustment):**

```json
{
  "series": ["igpm", "ipca"],
  "modo": "acumulado",
  "dataInicial": "2025-10-01",
  "dataFinal": "2026-09-30"
}
```

**15 years of daily CDI (split into valid requests automatically):**

```json
{ "series": ["cdi_diario"], "dataInicial": "2011-01-01" }
```

### Output

**`observacoes` mode (default)**: one row per observation:

```json
{ "chave": "dolar_venda", "codigo": 1, "nome": "Dólar americano (venda) — PTAX", "unidade": "R$/US$",
  "periodicidade": "diária", "data": "2026-10-16", "dataFim": null, "valor": 5.0826 }
```

**`acumulado` mode**: one summary per indicator:

```json
{ "chave": "ipca", "codigo": 433, "nome": "IPCA — variação mensal", "unidade": "% a.m.",
  "dataInicial": "2025-10-01", "dataFinal": "2026-09-30", "primeiraData": "2025-10-01", "ultimaData": "2026-09-01",
  "observacoes": 12, "primeiroValor": 0.09, "ultimoValor": 0.82, "minimo": -0.32, "maximo": 0.88, "media": 0.374167,
  "variacaoAcumuladaPct": 4.57612, "metodo": "produto de (1 + taxa/100) no período" }
```

How `variacaoAcumuladaPct` is computed:

- **Period rates** (IPCA, IGP-M, INPC, daily Selic/CDI…): compounded, ∏(1 + rate/100) − 1.
- **Prices and indexes** (USD, EUR, IBC-Br): last value ÷ first value − 1.
- **Annualized or anniversary-based rates** (Selic target, annualized CDI, TR, poupança): not accumulated (`null`); min/max/average are still provided.

Dates are ISO (`YYYY-MM-DD`), values are numbers. For monthly series, the BCB includes the month that contains your start date (start `2025-10-17` → October 2025 is included).

### How much does it cost?

You pay **US$ 0.0005 per row** delivered to your dataset (US$ 0.50 per 1,000), plus a tiny start fee per run. One row is one observation, or one indicator in `acumulado` mode.

- 12 months of IPCA (12 rows): about **US$ 0.006**.
- Accumulated IPCA, IGP-M and CDI for a rent or contract adjustment (3 rows): about **US$ 0.002**.
- 10 years of daily Selic (about 2,500 rows): about **US$ 1.25**.

### Data source

Official **BCB SGS open data API** (`api.bcb.gov.br`), public data from the Brazilian Central Bank. This Actor is not affiliated with the BCB. Values are delivered exactly as published, so check the official source before using them in contracts.

### FAQ

**Can I use it from my code or an AI agent?** Yes. Every Apify Actor can be called through the Apify API and the official clients, and AI agents can find and run it through the Apify MCP server.

**Is the data official?** Yes. It comes straight from the official public source listed under "Data source", with no manual edits.

**Something broke or you need a field?** Open an issue on the Actor's *Issues* tab.

### Related Actors

More Brazilian public data from the same publisher:

- [Brazil public tenders (PNCP Licitações)](https://apify.com/dados_publicos_br/pncp-licitacoes): open and recently published government tenders, filtered by keyword, state, agency and value.
- [Brazil government contracts and price records](https://apify.com/dados_publicos_br/pncp-contratos-atas): contracts, purchase orders and price registration records (atas): who won, what, how much.
- [Brazil government purchase prices](https://apify.com/dados_publicos_br/pncp-itens-precos): awarded unit prices and winning suppliers for any product or service, with price statistics.
- [Brazil holidays and business days](https://apify.com/dados_publicos_br/feriados-dias-uteis): national and banking holidays, business-day counts and date math.

***

#### 🇧🇷 Resumo em português

Séries do **Banco Central (SGS)** prontas para usar: Selic, CDI, IPCA, IGP-M, INPC, INCC, TR, poupança, dólar, euro e IBC-Br, com nome, unidade, datas ISO e valores numéricos. O modo `acumulado` calcula a variação acumulada no período (ex.: IGP-M de 12 meses para reajuste de aluguel). Períodos longos de séries diárias são divididos automaticamente. Você paga apenas pelos registros entregues.

# Actor input Schema

## `series` (type: `array`):

Curated Brazilian Central Bank time series with names, units and periodicity.

## `codigosPersonalizados` (type: `array`):

Any other series code from the BCB SGS system (e.g. 20542). Find codes at https://www3.bcb.gov.br/sgspub/

## `modo` (type: `string`):

<b>acumulado</b> compounds period rates (e.g. IPCA over 12 months, useful for rent adjustments) and computes first→last change for prices and indexes.

## `dataInicial` (type: `string`):

Default: 12 months before the end date. Long ranges are split automatically (the BCB API limits daily series to 10 years per request).

## `dataFinal` (type: `string`):

Default: today.

## Actor input object example

```json
{
  "series": [
    "selic_meta",
    "ipca",
    "igpm",
    "dolar_venda"
  ],
  "modo": "observacoes"
}
```

# Actor output Schema

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

All rows delivered by this run (dataset items).

## `stats` (type: `string`):

Run statistics: series fetched and rows delivered.

# 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 = {
    "series": [
        "selic_meta",
        "ipca",
        "igpm",
        "dolar_venda"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dados_publicos_br/bcb-indicadores").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 = { "series": [
        "selic_meta",
        "ipca",
        "igpm",
        "dolar_venda",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("dados_publicos_br/bcb-indicadores").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 '{
  "series": [
    "selic_meta",
    "ipca",
    "igpm",
    "dolar_venda"
  ]
}' |
apify call dados_publicos_br/bcb-indicadores --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dados_publicos_br/bcb-indicadores"
        }
    }
}
```

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/4JeFkjN5VGwKbC7wm/builds/FuvLjLbZDOIXvmAvj/openapi.json
