{
  "openapi": "3.0.1",
  "info": {
    "title": "Compra Ágil Monitor Chile | Mercado Público & ChileCompra",
    "description": "Alerts for new open Compra Ágil purchases on Mercado Público (ChileCompra), filtered by region and keyword, verified and deduplicated. Official API.",
    "version": "0.1",
    "x-build-id": "vokDYSYI1KOr3Xnle"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foremost_sideboard~compra-agil-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foremost_sideboard-compra-agil-monitor",
        "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/foremost_sideboard~compra-agil-monitor/runs": {
      "post": {
        "operationId": "runs-sync-foremost_sideboard-compra-agil-monitor",
        "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/foremost_sideboard~compra-agil-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-foremost_sideboard-compra-agil-monitor",
        "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": [
          "ticket"
        ],
        "properties": {
          "ticket": {
            "title": "Ticket API Mercado Público (ChileCompra)",
            "type": "string",
            "description": "Tu ticket personal de la API de Mercado Público. Solicítalo gratis con tu ClaveÚnica en https://www.chilecompra.cl/api/ . Se guarda cifrado y nunca se muestra en los registros. / Your personal ChileCompra API ticket (encrypted, never logged)."
          },
          "regions": {
            "title": "Regiones",
            "type": "array",
            "description": "Regiones del organismo comprador. Vacío = todas las regiones (más lento: se recomienda dejar activa la búsqueda q). Ejemplo: 14 = Los Ríos.",
            "items": {
              "type": "string",
              "enum": [
                "15",
                "1",
                "2",
                "3",
                "4",
                "5",
                "13",
                "6",
                "7",
                "16",
                "8",
                "9",
                "14",
                "10",
                "11",
                "12"
              ],
              "enumTitles": [
                "15 - Arica y Parinacota",
                "1 - Tarapacá",
                "2 - Antofagasta",
                "3 - Atacama",
                "4 - Coquimbo",
                "5 - Valparaíso",
                "13 - Metropolitana",
                "6 - O'Higgins",
                "7 - Maule",
                "16 - Ñuble",
                "8 - Biobío",
                "9 - Araucanía",
                "14 - Los Ríos",
                "10 - Los Lagos",
                "11 - Aysén",
                "12 - Magallanes y Antártica"
              ]
            },
            "default": []
          },
          "keywords": {
            "title": "Palabras clave",
            "type": "array",
            "description": "Se buscan en el nombre (y en descripción/productos vía búsqueda q + detalle). Sin distinguir mayúsculas ni tildes; acepta plural y masculino/femenino. Una palabra en MAYÚSCULAS (p.ej. PIE) se busca como sigla exacta. Lista vacía = todas las compras de la ventana.",
            "items": {
              "type": "string"
            }
          },
          "dias": {
            "title": "Días hacia atrás (publicación)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Ventana de fecha de publicación. Solo se consideran compras aún abiertas (estado publicada).",
            "default": 2
          },
          "maxDetalles": {
            "title": "Máximo de detalles",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Tope de consultas de detalle por corrida (cada una tarda 8-25 s). Sirven para verificar coincidencias en la descripción y obtener monto estimado y dirección de entrega. 0 = sin detalles.",
            "default": 25
          },
          "incluirBusquedaQ": {
            "title": "Incluir búsqueda q (descripción)",
            "type": "boolean",
            "description": "Usa el buscador q de la API con variantes con/sin tilde y singular/plural para encontrar la palabra clave en la descripción. Más completo, pero consume más cuota del ticket.",
            "default": true
          },
          "soloNuevos": {
            "title": "Solo nuevos",
            "type": "boolean",
            "description": "Recuerda lo ya visto en un key-value store con nombre y entrega solo compras nuevas desde la corrida anterior (ideal para corridas programadas).",
            "default": true
          },
          "incluirSinVerificar": {
            "title": "Incluir posibles sin verificar",
            "type": "boolean",
            "description": "Incluye hits de la búsqueda q cuyo detalle no se pudo obtener (verified = false).",
            "default": true
          },
          "presupuestoSegundos": {
            "title": "Presupuesto de tiempo (s)",
            "minimum": 30,
            "maximum": 3300,
            "type": "integer",
            "description": "Tiempo máximo total de consultas. Al agotarse se entrega lo obtenido y el resumen OUTPUT marca parcial = true.",
            "default": 270
          },
          "maxPaginas": {
            "title": "Máximo de páginas del listado",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Páginas de 10 ítems (la API da 504 con páginas mayores).",
            "default": 60
          },
          "concurrencia": {
            "title": "Requests en paralelo",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "La API tolera ~6-11 requests concurrentes.",
            "default": 6
          },
          "stateStoreName": {
            "title": "Nombre del key-value store de estado",
            "type": "string",
            "description": "Store con nombre (persistente) donde se guardan los códigos ya vistos. La clave depende de regiones + palabras clave.",
            "default": "compra-agil-seen"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}