{
  "openapi": "3.0.1",
  "info": {
    "title": "SEACE Peru Public Procurement Scraper - Tenders, Awards & API",
    "description": "Scrape Peru government tenders and contracts from SEACE (OSCE/OECE open data). Get buyer entity and RUC, reference value, key dates, items (CUBSO/UNSPSC), bidders (postores), awards and suppliers with RUC, and documents. Licitaciones y contrataciones del estado Peru. JSON, CSV, Excel. No API key.",
    "version": "0.2",
    "x-build-id": "268WRkk0mmupeUQQq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~seace-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-seace-scraper",
        "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/scrapers_lat~seace-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-seace-scraper",
        "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/scrapers_lat~seace-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-seace-scraper",
        "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": {
          "descripcion": {
            "title": "Descripción / palabra clave (keyword)",
            "type": "string",
            "description": "Filter by text in the tender title, description or item descriptions (accent-insensitive). Example: ambulancia, mantenimiento vial."
          },
          "entidad": {
            "title": "Entidad contratante (buyer name)",
            "type": "string",
            "description": "Filter by the public entity / buyer name (substring match). Example: MUNICIPALIDAD PROVINCIAL DE HUARI."
          },
          "ruc": {
            "title": "RUC de la entidad (buyer RUC)",
            "type": "string",
            "description": "Filter by the buying entity's RUC (tax id)."
          },
          "proveedor": {
            "title": "Proveedor / postor (supplier name)",
            "type": "string",
            "description": "Filter by an awarded supplier or bidder (postor) name. Matches tenderers and award suppliers."
          },
          "supplierRuc": {
            "title": "RUC del proveedor (supplier RUC)",
            "type": "string",
            "description": "Filter by a supplier / bidder RUC (tax id)."
          },
          "categoria": {
            "title": "Categoría / objeto (category)",
            "enum": [
              "",
              "works",
              "goods",
              "services"
            ],
            "type": "string",
            "description": "Contract object category.",
            "default": ""
          },
          "metodo": {
            "title": "Método / tipo de proceso (procurement method)",
            "type": "string",
            "description": "Filter by procurement method text (substring). Example: Licitación Pública, Adjudicación Simplificada, Concurso Público."
          },
          "minValue": {
            "title": "Valor mínimo (min value)",
            "type": "integer",
            "description": "Only processes whose reference value is at least this amount (in the process currency, usually PEN)."
          },
          "maxValue": {
            "title": "Valor máximo (max value)",
            "type": "integer",
            "description": "Only processes whose reference value is at most this amount."
          },
          "fechaInicio": {
            "title": "Fecha desde (from date)",
            "type": "string",
            "description": "Only processes published on or after this date. Format dd/mm/yyyy or yyyy-mm-dd."
          },
          "fechaFin": {
            "title": "Fecha hasta (to date)",
            "type": "string",
            "description": "Only processes published on or before this date. Format dd/mm/yyyy or yyyy-mm-dd."
          },
          "anio": {
            "title": "Año (year)",
            "type": "string",
            "description": "Only processes published in this year, for example 2026."
          },
          "estado": {
            "title": "Etapa / estado (stage)",
            "enum": [
              "",
              "planning",
              "tender",
              "award",
              "contract"
            ],
            "type": "string",
            "description": "Filter by process stage.",
            "default": ""
          },
          "ocids": {
            "title": "OCIDs (direct lookup)",
            "type": "array",
            "description": "Fetch specific processes by OCID (for example ocds-dgv273-seacev3-1247367). Skips scanning and returns each full record.",
            "items": {
              "type": "string"
            }
          },
          "tenderIds": {
            "title": "IDs de proceso SEACE (tender IDs)",
            "type": "array",
            "description": "Fetch specific processes by numeric SEACE process id (for example 1247367). Skips scanning.",
            "items": {
              "type": "string"
            }
          },
          "withDetails": {
            "title": "Incluir detalle completo (full details)",
            "type": "boolean",
            "description": "Enrich each process with the full graph: every bidder (postor) and awarded supplier with RUC, awards, contracts, all parties with RUC/address/contact, and full items and documents. Paying plans only; billed as a 'details' event per enriched record.",
            "default": true
          },
          "maxTenders": {
            "title": "Máx. resultados (max results)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of procurement processes to return. Free Apify plans are capped at 10 per run.",
            "default": 50
          },
          "maxPagesScan": {
            "title": "Máx. páginas a revisar (advanced)",
            "minimum": 1,
            "type": "integer",
            "description": "When filtering, the maximum number of 20-process pages of the most recent SEACE data to scan. Raise it to reach further back in time.",
            "default": 60
          },
          "searchType": {
            "title": "Tipo (legacy, ignored)",
            "type": "string",
            "description": "Deprecated. Kept for backward compatibility; ignored. The actor now returns unified OCDS contracting processes."
          },
          "objetoContratacion": {
            "title": "Objeto (legacy code)",
            "type": "string",
            "description": "Deprecated legacy object code (64 Obra, 62 Bien, 65 Servicio, 63 Consultoría). Prefer 'categoria'."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}