{
  "openapi": "3.0.1",
  "info": {
    "title": "Banco Central de Chile – Dólar, UF, TPM, IMACEC (API BDE)",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "0wszqcbP89bB093Th"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/better-llama~banco-central-chile-bde/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-better-llama-banco-central-chile-bde",
        "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/better-llama~banco-central-chile-bde/runs": {
      "post": {
        "operationId": "runs-sync-better-llama-banco-central-chile-bde",
        "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/better-llama~banco-central-chile-bde/run-sync": {
      "post": {
        "operationId": "run-sync-better-llama-banco-central-chile-bde",
        "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",
        "properties": {
          "apiToken": {
            "title": "API Key Token de la BDE (opcional) / BDE API token (optional)",
            "type": "string",
            "description": "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": {
            "title": "Email BDE (alternativa) / BDE email (alternative)",
            "type": "string",
            "description": "Solo si no usas token: el email de tu cuenta BDE (método antiguo usuario/contraseña)."
          },
          "password": {
            "title": "Contraseña BDE (alternativa) / BDE password",
            "type": "string",
            "description": "Solo si no usas token. Se guarda cifrada y nunca se registra."
          },
          "operation": {
            "title": "Operación / Operation",
            "enum": [
              "series",
              "search"
            ],
            "type": "string",
            "description": "series = observaciones de una o más series; search = buscar series en el catálogo por frecuencia y texto.",
            "default": "series"
          },
          "indicators": {
            "title": "Indicadores frecuentes / Common indicators",
            "type": "array",
            "description": "Atajos con el código oficial ya resuelto. Se suman a seriesIds.",
            "items": {
              "type": "string",
              "enum": [
                "dolar",
                "euro",
                "uf",
                "utm",
                "tpm",
                "ipc_variacion",
                "imacec",
                "imacec_desestacionalizado",
                "pib",
                "desempleo",
                "tipo_cambio_real"
              ],
              "enumTitles": [
                "Dólar observado (CLP/USD)",
                "Euro (CLP/EUR)",
                "UF",
                "UTM",
                "Tasa de política monetaria (TPM)",
                "IPC, variación mensual",
                "Imacec (2018=100)",
                "Imacec desestacionalizado",
                "PIB trimestral (volumen encadenado)",
                "Tasa de desocupación",
                "Tipo de cambio real"
              ]
            }
          },
          "seriesIds": {
            "title": "Códigos de serie / Series codes",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "firstDate": {
            "title": "Desde / From",
            "type": "string",
            "description": "AAAA-MM-DD. Por defecto: 31 días antes de lastDate."
          },
          "lastDate": {
            "title": "Hasta / To",
            "type": "string",
            "description": "AAAA-MM-DD. Por defecto: hoy (hora de Chile)."
          },
          "latestOnly": {
            "title": "Solo el último valor / Latest value only",
            "type": "boolean",
            "description": "Entrega solo la observación más reciente con dato de cada serie (ideal para agentes).",
            "default": false
          },
          "skipEmpty": {
            "title": "Omitir días sin dato / Skip empty",
            "type": "boolean",
            "description": "La BDE devuelve NaN en fines de semana y feriados. Por defecto se omiten (y no se cobran).",
            "default": true
          },
          "frequency": {
            "title": "Frecuencia (búsqueda) / Frequency (search)",
            "enum": [
              "DAILY",
              "MONTHLY",
              "QUARTERLY",
              "ANNUAL"
            ],
            "type": "string",
            "description": "Solo operation=search.",
            "default": "MONTHLY"
          },
          "query": {
            "title": "Texto a buscar / Search text",
            "type": "string",
            "description": "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": {
            "title": "Máximo de resultados / Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Tope de registros entregados y cobrados (1-100000). Por defecto 1000.",
            "default": 1000
          },
          "requestIntervalMs": {
            "title": "Pausa entre solicitudes (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Mínimo 250 ms: los términos de la BDE permiten hasta 5 consultas por segundo por cuenta. Por defecto 300.",
            "default": 300
          },
          "maxRetries": {
            "title": "Reintentos / Retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Reintentos ante errores transitorios (red, 5xx). Por defecto 4.",
            "default": 4
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}