{
  "openapi": "3.0.1",
  "info": {
    "title": "Ecuador SERCOP Tenders Scraper: Compras Públicas OCDS Data",
    "description": "Scrape Ecuador public procurement from SERCOP's open OCDS data: tenders, auctions and direct buys with buyer, province, items, bidders and winners.",
    "version": "0.1",
    "x-build-id": "6fk1l7Fldq5LaPkci"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mrslm_data~ecuador-sercop-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mrslm_data-ecuador-sercop-tenders",
        "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/mrslm_data~ecuador-sercop-tenders/runs": {
      "post": {
        "operationId": "runs-sync-mrslm_data-ecuador-sercop-tenders",
        "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/mrslm_data~ecuador-sercop-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-mrslm_data-ecuador-sercop-tenders",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words in the process description (Spanish), e.g. computadoras, medicamentos, ambulancia. One per line.",
            "items": {
              "type": "string"
            }
          },
          "year": {
            "title": "Year",
            "minimum": 0,
            "type": "integer",
            "description": "Procurement year. Default (0): the current year. The SERCOP search needs one year per run.",
            "default": 0
          },
          "procedureType": {
            "title": "Procedure type",
            "enum": [
              "Subasta Inversa Electrónica",
              "Licitación",
              "Catálogo electrónico - Compra directa",
              "Catálogo electrónico - Mejor oferta",
              "Concurso publico",
              "Licitación de Seguros",
              "Contratos entre Entidades Públicas o sus subsidiarias",
              "Bienes y Servicios únicos",
              "Repuestos o Accesorios",
              "Comunicación Social – Contratación Directa",
              "Asesoría y Patrocinio Jurídico",
              "Obra artística, científica o literaria"
            ],
            "type": "string",
            "description": "Default: all types."
          },
          "methods": {
            "title": "Methods",
            "type": "array",
            "description": "OCDS procurement method. Default: all.",
            "items": {
              "type": "string",
              "enum": [
                "open",
                "selective",
                "limited",
                "direct"
              ],
              "enumTitles": [
                "Open",
                "Selective",
                "Limited",
                "Direct"
              ]
            }
          },
          "buyerName": {
            "title": "Buyer name",
            "type": "string",
            "description": "Part of the buyer name, e.g. MUNICIPIO, HOSPITAL, IESS."
          },
          "supplierName": {
            "title": "Supplier name",
            "type": "string",
            "description": "Part of a winning company's name, e.g. CONECEL, S.A."
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Ecuadorian provinces, e.g. Pichincha, Guayas, Azuay (accents ignored).",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From",
            "type": "string",
            "description": "Only processes dated on or after this day (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "To",
            "type": "string",
            "description": "Only processes dated on or before this day (YYYY-MM-DD)."
          },
          "includeDetails": {
            "title": "Include details",
            "type": "boolean",
            "description": "Add stage, estimated value, lots, items with CPC codes, deadlines, bidder companies, winners and contracts. One extra request per process.",
            "default": true
          },
          "maxPagesPerSearch": {
            "title": "Max pages per keyword",
            "minimum": 0,
            "type": "integer",
            "description": "Each page holds 10 processes. Stops long scans when filters are narrow. 0 = no cap.",
            "default": 50
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on saved processes. 0 = no cap. Your max cost per run is always respected.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}