{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones de Guatemala, Panamá y República Dominicana",
    "description": "Licitaciones y adjudicaciones de Guatemala (Guatecompras), Panamá (PanamaCompra) y República Dominicana (DGCP) en un solo formato. Filtre por país, palabra clave, institución, monto y fecha, con montos en dólares. El modo monitor entrega solo los procesos nuevos.",
    "version": "1.0",
    "x-build-id": "K82g6D4kbIadc1YJp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendata-cr~licitaciones-centroamerica/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendata-cr-licitaciones-centroamerica",
        "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/opendata-cr~licitaciones-centroamerica/runs": {
      "post": {
        "operationId": "runs-sync-opendata-cr-licitaciones-centroamerica",
        "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/opendata-cr~licitaciones-centroamerica/run-sync": {
      "post": {
        "operationId": "run-sync-opendata-cr-licitaciones-centroamerica",
        "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": {
          "mode": {
            "title": "Modo / Mode",
            "enum": [
              "licitaciones",
              "adjudicaciones"
            ],
            "type": "string",
            "description": "licitaciones: un ítem por procedimiento. adjudicaciones: un ítem por contrato o adjudicación. licitaciones returns one item per tender; adjudicaciones returns one item per contract or award.",
            "default": "licitaciones"
          },
          "countries": {
            "title": "Países / Countries",
            "type": "array",
            "description": "GT Guatemala, DO República Dominicana, PA Panamá. Si se deja vacío, se consultan los tres. Si un país no responde, los demás continúan. Leave empty for all three.",
            "default": [
              "GT",
              "DO",
              "PA"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Palabras clave / Keywords",
            "type": "array",
            "description": "Basta con que una aparezca en el título, la descripción o la institución. No distingue mayúsculas ni tildes. En GT y PA también se busca en las líneas. Any keyword is enough.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Excluir palabras / Exclude keywords",
            "type": "array",
            "description": "Se descarta el resultado si aparece alguna de estas palabras. Results containing any of these words are dropped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "institutionIds": {
            "title": "ID de institución / Institution IDs",
            "type": "array",
            "description": "Identificador del comprador: NIT en Guatemala, código de unidad de compra en RD, RUC en Panamá. Solo se comparan los dígitos. Buyer ID; only digits are compared.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "institutionNameContains": {
            "title": "Nombre de institución contiene / Institution name contains",
            "type": "string",
            "description": "Texto que debe aparecer en el nombre del comprador. No distingue mayúsculas ni tildes. Text contained in the buyer name."
          },
          "procedureTypes": {
            "title": "Tipo de procedimiento / Procedure type",
            "type": "array",
            "description": "Coincide si el texto aparece en el tipo o la modalidad del procedimiento, por ejemplo Cotización, Licitación Pública o Compra menor. Matches the procedure type or method.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Estado / Status",
            "type": "array",
            "description": "Estados del portal, por ejemplo Vigente, Proceso publicado, Abierta o Adjudicado. Si tiene valores, reemplaza a onlyOpen. Portal status values; overrides onlyOpen.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOpen": {
            "title": "Solo abiertas / Open tenders only",
            "type": "boolean",
            "description": "Solo licitaciones en estado Vigente (GT), Proceso publicado (DO) o Abierta (PA). No se aplica a adjudicaciones ni cuando statuses tiene valores. Tenders only.",
            "default": true
          },
          "minAmount": {
            "title": "Monto mínimo / Minimum amount",
            "type": "number",
            "description": "Monto mínimo, inclusive, en la moneda original del ítem (GTQ, DOP o PAB), no en dólares. Inclusive minimum in the item's own currency."
          },
          "maxAmount": {
            "title": "Monto máximo / Maximum amount",
            "type": "number",
            "description": "Monto máximo, inclusive, en la moneda original del ítem (GTQ, DOP o PAB). Inclusive maximum in the item's own currency."
          },
          "dateFrom": {
            "title": "Desde / From",
            "type": "string",
            "description": "Inicio del rango, inclusive. Si ambas fechas están vacías, se usan los últimos recentDays días en hora de Guatemala. Start date, inclusive."
          },
          "dateTo": {
            "title": "Hasta / To",
            "type": "string",
            "description": "Fin del rango, inclusive. Si está vacío, es hoy en hora de Guatemala. End date, inclusive; defaults to today."
          },
          "recentDays": {
            "title": "Días recientes / Recent days",
            "minimum": 1,
            "maximum": 93,
            "type": "integer",
            "description": "Se usa cuando dateFrom y dateTo están vacíos. 7 incluye hoy y los seis días anteriores. Máximo 93. Used when both dates are empty.",
            "default": 7
          },
          "includeLines": {
            "title": "Incluir líneas / Include line items",
            "type": "boolean",
            "description": "Agrega las líneas de cada procedimiento con cantidad, descripción y código UNSPSC. Adds line items with quantity, description and UNSPSC code.",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Solo nuevos desde la última ejecución / Only new since last run",
            "type": "boolean",
            "description": "Modo monitor: solo entrega y cobra resultados que no se entregaron antes con el mismo almacén. Una licitación que cambia de estado se entrega de nuevo. Monitor mode: only new results.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Nombre del almacén del monitor / Monitor store name",
            "type": "string",
            "description": "Almacén (Key-Value Store) donde se guardan los resultados ya entregados. Use un nombre distinto para cada alerta. Use a different name for each alert.",
            "default": "ca-licitaciones-monitor"
          },
          "convertToUSD": {
            "title": "Convertir a USD / Convert to USD",
            "type": "boolean",
            "description": "PAB equivale 1 a 1 al dólar. GTQ y DOP usan un tipo de cambio de referencia, que no es el oficial de cada banco central. Si no está disponible, el monto en USD queda vacío. Adds USD amounts.",
            "default": true
          },
          "maxResults": {
            "title": "Máximo de resultados / Maximum results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Cantidad máxima de resultados (y de cobros) por ejecución. Con varios países, el límite se reparte entre ellos. Si se omite, el límite es 200. Si antes se alcanza el máximo a cobrar de la ejecución, esta termina con éxito. Maximum results per run, shared across countries.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}