# Banco Central de Chile – Dólar, UF, TPM, IMACEC (API BDE) (`better-llama/banco-central-chile-bde`) Actor

Official Banco Central de Chile statistical series (BDE API): observed dollar, UF, monetary policy rate, IMACEC, CPI, GDP or any series code, plus catalog search. Works without a key (optional own free token for higher quota). Not affiliated with the Central Bank of Chile.

- **URL**: https://apify.com/better-llama/banco-central-chile-bde.md
- **Developed by:** [Francisco Rubio](https://apify.com/better-llama) (community)
- **Categories:** Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 resultado entregado / delivered 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

## Banco Central de Chile – Dólar, UF, TPM, IMACEC (API BDE)

**ES** · Series estadísticas **oficiales** del **Banco Central de Chile** listas para agentes de IA y desarrolladores: **dólar observado, euro, UF, UTM, tasa de política monetaria (TPM), IPC, Imacec, PIB, desempleo** o **cualquier código de serie** de la Base de Datos Estadísticos (BDE), además de **búsqueda en el catálogo** de series. Usa la **API REST oficial de la BDE**; funciona sin key (token propio opcional).
**EN** · Official **Central Bank of Chile** statistical series — observed USD/CLP rate, UF, monetary policy rate, CPI, IMACEC, GDP or any BDE series code — plus catalog search, from the **official BDE REST API**, no key needed (your own free token optional for higher quota).

> 🔓 **Funciona sin key / No key needed.** Si no ingresas token, el Actor usa un token compartido del operador con límites por ejecución (máx. 10 series y 1 serie por segundo, para respetar el límite de la BDE de 5 series simultáneas por segundo). **Opcionalmente usa el tuyo para mayor cuota** (hasta 50 series y ritmo más rápido): es gratuito y dura un año; crea una cuenta en la BDE (<https://si3.bcentral.cl/estadisticas/Principal1/Web_Services/acceso_api.html>), entra a **Mi Cuenta**, **activa el acceso a la API** y copia el **Apikey Token** (o usa email y contraseña de la BDE).
>
> ⚠️ **No afiliado / Not affiliated.** Proyecto independiente. **No está afiliado, patrocinado ni aprobado por el Banco Central de Chile**. El nombre se usa solo para describir la fuente.
>
> **Fuente / Data source:** la información es **propiedad del Banco Central de Chile** (Base de Datos Estadísticos, <https://si3.bcentral.cl>). Según los términos de la API, debes **citar la fuente** al usarla; cada registro trae `dataSource` con esa atribución.

### Uso con agentes de IA (MCP)

```
https://mcp.apify.com/?tools=better-llama/banco-central-chile-bde
```

Ejemplos: *«¿A cuánto quedó el dólar observado hoy?»*, *«Dame la UF de todo octubre»*, *«¿Cuál es la TPM vigente?»*, *«Busca series mensuales sobre Imacec desestacionalizado»*.

### Operaciones / Operations

| `operation` | Función oficial | Qué entrega |
|---|---|---|
| `series` (defecto) | `GetSeries` | Una fila por **observación** (fecha, valor) de cada serie pedida |
| `search` | `SearchSeries` | Una fila por **serie del catálogo** de la frecuencia elegida (código, título ES/EN, primera y última observación), filtrada por `query` |

#### Indicadores frecuentes (`indicators`)

| Atajo | Serie BDE | Frecuencia |
|---|---|---|
| `dolar` | `F073.TCO.PRE.Z.D` (dólar observado) | diaria |
| `euro` | `F072.CLP.EUR.N.O.D` | diaria |
| `uf` | `F073.UFF.PRE.Z.D` | diaria |
| `utm` | `F073.UTR.PRE.Z.M` | mensual |
| `tpm` | `F022.TPM.TIN.D001.NO.Z.D` | diaria |
| `ipc_variacion` | `F074.IPC.VAR.Z.Z.C.M` | mensual |
| `imacec` / `imacec_desestacionalizado` | `F032.IMC.IND.Z.Z.EP18.Z.Z.0.M` / `…1.M` | mensual |
| `pib` | `F032.PIB.FLU.R.CLP.EP18.Z.Z.0.T` | trimestral |
| `desempleo` | `F049.DES.TAS.INE9.10.M` | mensual |
| `tipo_cambio_real` | `F073.TCR.IND.199101.M` | mensual |

Cualquier otro código va en `seriesIds` (máx. 50 por ejecución). Si no indicas nada, se entrega el dólar observado.

### Comportamiento

- **Fechas:** `firstDate` / `lastDate` (AAAA-MM-DD). Por defecto, los últimos 31 días hasta hoy (hora de Chile).
- **Días sin dato:** la BDE devuelve `NaN` en fines de semana y feriados; se omiten por defecto (`skipEmpty`) y no se cobran.
- **`latestOnly`:** solo el último valor disponible de cada serie (respuesta corta para agentes).
- **Ritmo:** 300 ms entre solicitudes (los términos permiten hasta 5 consultas por segundo), reintentos con espera exponencial ante errores de red y 5xx.
- **Errores claros:** token o usuario inválido (código `-5`), serie inexistente (se omite si pediste varias), API no activada en Mi Cuenta.
- Las credenciales son campos **secretos** (cifrados por Apify) y nunca se escriben en logs. Deduplicación si la ejecución se reanuda.

### Precio / Pricing

Pago por resultado (*pay per event*): solo se cobra el evento `result` por cada registro **entregado**. Puedes fijar un gasto máximo por ejecución; el Actor se detiene al alcanzarlo.

### Input

Último dólar, UF y TPM:

```json
{ "indicators": ["dolar", "uf", "tpm"], "latestOnly": true }
```

UF de octubre 2026:

```json
{ "apiToken": "TU-TOKEN-BDE", "indicators": ["uf"], "firstDate": "2026-10-01", "lastDate": "2026-10-31" }
```

Buscar series mensuales del Imacec:

```json
{ "apiToken": "TU-TOKEN-BDE", "operation": "search", "frequency": "MONTHLY", "query": "imacec" }
```

### Output

```json
{
  "kind": "observacion",
  "seriesId": "F073.TCO.PRE.Z.D",
  "indicator": "dolar",
  "title": "Tipo de cambio nominal (dólar observado $CLP/USD)",
  "frequency": "DAILY",
  "unit": "CLP/USD",
  "date": "2024-10-07",
  "value": 923.74,
  "valueRaw": "923.74",
  "statusCode": "OK",
  "officialUrl": "https://si3.bcentral.cl/siete",
  "dataSource": "Información propiedad del Banco Central de Chile – Base de Datos Estadísticos (BDE)",
  "retrievedAt": "2026-11-12T18:00:00.000Z"
}
```

| Campo | ES | EN |
|---|---|---|
| `kind` | `observacion` o `serie` (búsqueda) | Row type |
| `seriesId`, `indicator`, `title`, `titleEn`, `frequency`, `unit` | Identificación de la serie | Series metadata |
| `date`, `value`, `valueRaw`, `statusCode` | Observación (valor `null` si la BDE informa `NaN`) | Observation |
| `firstObservation`, `lastObservation`, `updatedAt`, `createdAt` | Datos del catálogo (búsqueda) | Catalog info |
| `officialUrl`, `dataSource`, `retrievedAt` | Atribución y fecha de consulta | Attribution |

### English summary

Official Central Bank of Chile (BDE) statistics as clean JSON: observed dollar, euro, UF, UTM, monetary policy rate, CPI, IMACEC, GDP, unemployment or any BDE series code, plus catalog search by frequency and text. Works without a key using the operator's shared token (max 10 series per run, 1 series/second); optionally bring your own free token (BDE → My Account → enable API → Apikey Token) for higher quota. Data is property of the Banco Central de Chile and must be attributed. Pay only per delivered result. Not affiliated with the Central Bank of Chile.

### Más conectores de Chile / More Chilean data connectors

Este Actor es parte de **Better Llama**, una colección de conectores de datos públicos y empresariales de Chile (licitaciones, UF y dólar, energía, bencina, envíos, bolsa y más) con JSON limpio y pago por resultado. Catálogo completo: <https://betterllama.com>.

Part of **Better Llama**, a collection of Chilean data connectors for developers and AI agents. Full catalog: <https://betterllama.com/en/>.

# Changelog

This Actor's version history is a separate document: https://apify.com/better-llama/banco-central-chile-bde/changelog.md

# Actor input Schema

## `apiToken` (type: `string`):

Opcional. Tu token personal (BDE → Mi Cuenta → Apikey Token) para mayor cuota. Sin él se usa el token compartido con límites. Cifrado; nunca se registra en logs. / Optional; your own token for higher quota.

## `email` (type: `string`):

Solo si no usas token: el email de tu cuenta BDE (método antiguo usuario/contraseña).

## `password` (type: `string`):

Solo si no usas token. Se guarda cifrada y nunca se registra.

## `operation` (type: `string`):

series = observaciones de una o más series; search = buscar series en el catálogo por frecuencia y texto.

## `indicators` (type: `array`):

Atajos con el código oficial ya resuelto. Se suman a seriesIds.

## `seriesIds` (type: `array`):

Códigos BDE (p. ej. F073.TCO.PRE.Z.D = dólar observado). Encuéntralos con operation=search o en el Buscador de Series de la BDE. Máximo 50. Si no indicas nada, se usa el dólar observado.

## `firstDate` (type: `string`):

AAAA-MM-DD. Por defecto: 31 días antes de lastDate.

## `lastDate` (type: `string`):

AAAA-MM-DD. Por defecto: hoy (hora de Chile).

## `latestOnly` (type: `boolean`):

Entrega solo la observación más reciente con dato de cada serie (ideal para agentes).

## `skipEmpty` (type: `boolean`):

La BDE devuelve NaN en fines de semana y feriados. Por defecto se omiten (y no se cobran).

## `frequency` (type: `string`):

Solo operation=search.

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

Solo operation=search. Todas las palabras deben aparecer en el título (español o inglés) o el código; no distingue tildes ni mayúsculas. Ej.: «imacec desestacionalizado».

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

Tope de registros entregados y cobrados (1-100000). Por defecto 1000.

## `requestIntervalMs` (type: `integer`):

Mínimo 250 ms: los términos de la BDE permiten hasta 5 consultas por segundo por cuenta. Por defecto 300.

## `maxRetries` (type: `integer`):

Reintentos ante errores transitorios (red, 5xx). Por defecto 4.

## Actor input object example

```json
{
  "operation": "series",
  "latestOnly": false,
  "skipEmpty": true,
  "frequency": "MONTHLY",
  "maxItems": 1000,
  "requestIntervalMs": 300,
  "maxRetries": 4
}
```

# Actor output Schema

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

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("better-llama/banco-central-chile-bde").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("better-llama/banco-central-chile-bde").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 '{}' |
apify call better-llama/banco-central-chile-bde --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,better-llama/banco-central-chile-bde"
        }
    }
}
```

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/LCShhz2lcLGnGkIe4/builds/0wszqcbP89bB093Th/openapi.json
