{
  "openapi": "3.0.1",
  "info": {
    "title": "Bolsa de Santiago – IPSA, Acciones y Renta Fija (Brain Data)",
    "description": "Bolsa de Santiago API Brain Data as clean JSON: IPSA/IGPA indices, stock instruments, quotes, trades, dividends, fixed income, financial intermediation and clearing data, using your own key (free trial or paid plan). Read-only. Not affiliated with Bolsa de Santiago.",
    "version": "0.1",
    "x-build-id": "NYbfD8s30V1RiAXee"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/better-llama~bolsa-santiago-brain-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-better-llama-bolsa-santiago-brain-data",
        "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~bolsa-santiago-brain-data/runs": {
      "post": {
        "operationId": "runs-sync-better-llama-bolsa-santiago-brain-data",
        "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~bolsa-santiago-brain-data/run-sync": {
      "post": {
        "operationId": "run-sync-better-llama-bolsa-santiago-brain-data",
        "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": {
          "apiKey": {
            "title": "API Key de API Brain Data (opcional)",
            "type": "string",
            "description": "Opcional. Sin clave, el Actor usa una clave compartida del operador cuando está configurada (solo plan gratuito, con tope de 25 solicitudes y 2.000 filas por ejecución). Ingresa tu propia API Key (https://api-braindata.bolsadesantiago.com → plan «API Free trial» gratis o un plan pagado) para mayor cuota y planes pagados. Cifrada; nunca se registra en logs. / Optional: your own key for higher quota."
          },
          "operation": {
            "title": "Operación / Operation",
            "enum": [
              "indices",
              "instrumentos",
              "precios",
              "puntas",
              "transacciones",
              "resumen_accion",
              "variaciones_capital",
              "rf_instrumentos",
              "rf_indices",
              "rf_transacciones",
              "rf_resumen_transacciones",
              "rf_benchmark",
              "if_instrumentos",
              "if_transacciones",
              "if_resumen_transacciones",
              "cg_saldo_neto",
              "cg_posicion_neta",
              "cg_garantia"
            ],
            "type": "string",
            "description": "Qué consultar. El plan gratuito incluye índices, instrumentos, puntas, transacciones, resumen de acción y variaciones de capital (renta variable, fin de día).",
            "default": "indices"
          },
          "product": {
            "title": "Producto contratado / Product",
            "enum": [
              "free_trial",
              "mercado_valores",
              "compensacion"
            ],
            "type": "string",
            "description": "Producto de tu suscripción. Por defecto: «free_trial» si la operación lo ofrece; si no, «mercado_valores» (renta variable, renta fija e intermediación financiera) o «compensacion»."
          },
          "nemos": {
            "title": "Nemotécnicos / Tickers",
            "type": "array",
            "description": "Ej. SQM-B, CHILE, COPEC. Requerido en transacciones, resumen_accion, variaciones_capital, precios y rf_transacciones; se consulta uno por uno.",
            "items": {
              "type": "string"
            }
          },
          "fechaDesde": {
            "title": "Desde / From",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "AAAA-MM-DD. Por defecto: 7 días antes de «Hasta»."
          },
          "fechaHasta": {
            "title": "Hasta / To",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "AAAA-MM-DD. Por defecto: hoy (Chile)."
          },
          "fecha": {
            "title": "Fecha / Date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "AAAA-MM-DD. Para índices (plan pagado), rf_benchmark y cg_garantia."
          },
          "indice": {
            "title": "Índice",
            "type": "string",
            "description": "Código del índice (p. ej. IPSA) para índices del plan pagado, rf_indices y rf_benchmark."
          },
          "periodo": {
            "title": "Período",
            "type": "string",
            "description": "Período tal como lo define la API (resumen_accion, índices, resúmenes)."
          },
          "mercado": {
            "title": "Mercado",
            "type": "string",
            "description": "Mercado para instrumentos del plan pagado (p. ej. ACC, CFI)."
          },
          "dividendo": {
            "title": "Índice con dividendos",
            "type": "boolean",
            "description": "Solo índices del plan pagado.",
            "default": false
          },
          "condicionLiquidacion": {
            "title": "Condición de liquidación",
            "type": "string",
            "description": "Opcional para puntas (plan pagado)."
          },
          "familia": {
            "title": "Familia (renta fija)",
            "type": "string",
            "description": "Requerida en rf_instrumentos y rf_resumen_transacciones."
          },
          "emisor": {
            "title": "Emisor (intermediación)",
            "type": "string",
            "description": "Requerido en if_transacciones e if_resumen_transacciones."
          },
          "camara": {
            "title": "Cámara (compensación)",
            "type": "string",
            "description": "Requerida en cg_saldo_neto y cg_posicion_neta."
          },
          "codigoCorredor": {
            "title": "Código de corredor",
            "type": "string",
            "description": "Opcional en compensación."
          },
          "grupo": {
            "title": "Grupo (garantías)",
            "type": "string",
            "description": "Requerido en cg_garantia."
          },
          "maxItems": {
            "title": "Máximo de resultados / Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Tope de filas a entregar (se cobra por fila).",
            "default": 1000
          },
          "pageSize": {
            "title": "Filas por página",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "numeroFilas (máx. 500) en planes pagados.",
            "default": 500
          },
          "maxPages": {
            "title": "Máximo de páginas",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Tope de páginas por consulta.",
            "default": 20
          },
          "requestIntervalMs": {
            "title": "Intervalo entre solicitudes (ms)",
            "minimum": 250,
            "maximum": 60000,
            "type": "integer",
            "description": "Pausa mínima entre llamadas para respetar la cuota de tu plan.",
            "default": 1000
          },
          "maxRetries": {
            "title": "Reintentos",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Reintentos con espera exponencial ante 429/5xx.",
            "default": 4
          },
          "includeRaw": {
            "title": "Incluir respuesta original",
            "type": "boolean",
            "description": "Agrega «raw» con la fila tal como la entrega la API.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}