{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones públicas de Costa Rica (SICOP)",
    "description": "Carteles, adjudicaciones y perfiles de proveedores de SICOP, las compras públicas de Costa Rica. Filtre por palabra clave, institución, UNSPSC, monto y fecha, con montos en colones y dólares. El modo monitor entrega solo los carteles nuevos. Datos abiertos del Ministerio de Hacienda.",
    "version": "1.0",
    "x-build-id": "5iMs1aAY6bHICAZR8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/opendata-cr~costa-rica-sicop/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-opendata-cr-costa-rica-sicop",
        "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~costa-rica-sicop/runs": {
      "post": {
        "operationId": "runs-sync-opendata-cr-costa-rica-sicop",
        "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~costa-rica-sicop/run-sync": {
      "post": {
        "operationId": "run-sync-opendata-cr-costa-rica-sicop",
        "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",
              "proveedor"
            ],
            "type": "string",
            "description": "Qué devolver. licitaciones: un ítem por cartel. adjudicaciones: un ítem por línea adjudicada. proveedor: un ítem por cédula jurídica. What to return: one tender, one award line, or one company profile.",
            "default": "licitaciones"
          },
          "keywords": {
            "title": "Palabras clave / Keywords",
            "type": "array",
            "description": "Coincide si cualquiera aparece en el título o la descripción (sin distinguir mayúsculas ni tildes). Match if any keyword appears in the title or description. Case and accents are ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Excluir palabras / Exclude keywords",
            "type": "array",
            "description": "Se descarta el resultado si aparece cualquiera de estas palabras. Drop the result when any of these words appear.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "institutionIds": {
            "title": "Cédulas de institución / Institution IDs",
            "type": "array",
            "description": "Cédulas jurídicas. Ejemplo: 4000042147 es la CCSS y 4000042139 es el ICE. Se aceptan guiones. Legal entity IDs. Dashes are optional.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "institutionNameContains": {
            "title": "Nombre de institución contiene / Institution name contains",
            "type": "string",
            "description": "Texto contenido en el nombre de la institución, sin distinguir mayúsculas ni tildes. Accent- and case-insensitive match on the institution name."
          },
          "unspscPrefixes": {
            "title": "Prefijos UNSPSC / UNSPSC prefixes",
            "type": "array",
            "description": "Prefijos del código UNSPSC del bien o servicio (8 dígitos), por ejemplo 8210 o 82101501. UNSPSC product code prefixes (8-digit code), e.g. 8210 or 82101501.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "procedureTypes": {
            "title": "Tipo de procedimiento / Procedure type",
            "type": "array",
            "description": "Coincidencia exacta, sin distinguir mayúsculas ni tildes. Valores habituales: LICITACIÓN REDUCIDA, LICITACIÓN MENOR, LICITACIÓN MAYOR, PROCEDIMIENTO POR EXCEPCIÓN, PROCEDIMIENTOS ESPECIALES, REMATE, SUBASTA INVERSA ELECTRÓNICA. Exact match; case and accents are ignored.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyOpen": {
            "title": "Solo abiertas / Open tenders only",
            "type": "boolean",
            "description": "En licitaciones, deja solo estado Publicado o En recepción de ofertas con apertura en el futuro. Se ignora en adjudicaciones y proveedor. Tenders only: status is open and the closing time is still in the future. Ignored for awards and supplier profiles.",
            "default": true
          },
          "minAmountCRC": {
            "title": "Monto mínimo CRC / Minimum amount CRC",
            "type": "number",
            "description": "Monto mínimo en colones, inclusive. En licitaciones se compara con el monto estimado; en adjudicaciones y perfiles, con el monto adjudicado por línea. Inclusive minimum in CRC: estimated amount for tenders, awarded line amount for awards and profiles."
          },
          "maxAmountCRC": {
            "title": "Monto máximo CRC / Maximum amount CRC",
            "type": "number",
            "description": "Monto máximo en colones, inclusive. Inclusive maximum in CRC."
          },
          "dateFrom": {
            "title": "Desde / From",
            "type": "string",
            "description": "Inicio del rango (publicación o adjudicación en firme). También define qué ZIP mensuales se descargan. Si ambos extremos van vacíos, se usan los últimos 30 días en hora de Costa Rica. Start date. Also selects which monthly ZIPs are downloaded. Empty defaults to the last 30 days."
          },
          "dateTo": {
            "title": "Hasta / To",
            "type": "string",
            "description": "Fin del rango, inclusive. Si se deja vacío, se usa la fecha de hoy en hora de Costa Rica. Inclusive end date. Empty means today, Costa Rica time."
          },
          "supplierIds": {
            "title": "Cédulas de proveedor / Supplier IDs",
            "type": "array",
            "description": "Obligatorio en modo proveedor (cédulas jurídicas). En adjudicaciones, limita las líneas a esos proveedores. El modo proveedor no recorre el padrón entero. Required for supplier mode. Also filters award lines. Company IDs only; natural persons are omitted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeLines": {
            "title": "Incluir líneas / Include line items",
            "type": "boolean",
            "description": "En licitaciones, agrega cantidad, descripción, precio estimado y UNSPSC de cada línea. Aunque esté desactivado, las líneas se siguen usando para buscar palabras clave. Adds tender line items. Keyword search still checks them when this is off.",
            "default": true
          },
          "includeEvaluation": {
            "title": "Incluir criterios de evaluación / Include evaluation criteria",
            "type": "boolean",
            "description": "Agrega los factores de evaluación de ofertas y sus porcentajes. Adds the bid evaluation factors and their weights.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Solo nuevos desde la última ejecución / Only new since last run",
            "type": "boolean",
            "description": "Modo monitor. Guarda los identificadores ya devueltos en un Key-Value Store con nombre y no los vuelve a cobrar. Para adjudicaciones la clave es procedimiento + línea + proveedor, así una línea nueva de un cartel ya visto sí sale. Monitor mode. Stores seen ids in a named Key-Value Store. Award identity is procedure + line + supplier, so a new line on a known procedure is still returned.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Nombre del almacén del monitor / Monitor store name",
            "type": "string",
            "description": "Key-Value Store donde se guardan los resultados ya entregados. Use un nombre distinto para cada alerta. Named Key-Value Store for results already returned. Use a different name for each alert.",
            "default": "sicop-monitor"
          },
          "convertToUSD": {
            "title": "Convertir a USD / Convert to USD",
            "type": "boolean",
            "description": "Licitaciones: el monto estimado se convierte con el tipo de cambio de la línea o, si falta, con el tipo de cambio de venta del Ministerio de Hacienda. Adjudicaciones: se usa el monto en dólares publicado por el Observatorio. Tenders use the line's exchange rate, then the Ministry of Finance sell rate. Awards use the USD amount published by the Observatory.",
            "default": true
          },
          "maxResults": {
            "title": "Máximo de resultados / Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Máximo de resultados cobrados por ejecución. El formulario sugiere 25; si se omite, el límite es 1000. Si se alcanza el máximo a cobrar de la ejecución, esta termina con éxito. Maximum charged results per run. The form suggests 25; if omitted, the cap is 1000. If the run's maximum charge is reached, the run ends successfully.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}