{
  "openapi": "3.0.1",
  "info": {
    "title": "Aragon Public Contracts Registry Scraper",
    "description": "Registro de contratos publicos de la Comunidad Autonoma de Aragon (contratos mayores y menores), via el portal CKAN opendata.aragon.es. Aragon public procurement contracts registry.",
    "version": "0.1",
    "x-build-id": "7NQm2PLyt1SHEExce"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xamto1987~aragon-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xamto1987-aragon-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/xamto1987~aragon-tenders/runs": {
      "post": {
        "operationId": "runs-sync-xamto1987-aragon-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/xamto1987~aragon-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-xamto1987-aragon-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": {
          "tipoRegistro": {
            "title": "Tipo de registro / Register type",
            "enum": [
              "mayores",
              "menores"
            ],
            "type": "string",
            "description": "`mayores` = Contratos Mayores (expedientes de licitacion formal, con lotes y presupuesto de licitacion). `menores` = Contratos Menores (adjudicacion directa, sin licitacion previa). Son dos recursos CKAN distintos con columnas ligeramente distintas. / `mayores` = major contracts (formal tenders); `menores` = minor/direct-award contracts.",
            "default": "mayores"
          },
          "keywords": {
            "title": "Palabras clave / Keywords",
            "type": "array",
            "description": "Lista de terminos a buscar en TODAS las columnas de texto del registro (busqueda de texto libre `q` de CKAN, en servidor). Cada termino se consulta por separado y los resultados se combinan (cualquiera coincide, igual que en catalonia-tenders). Vacio = sin filtro de texto. / Server-side full-text search (CKAN `q`); each keyword queried separately and merged (OR).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tipoContrato": {
            "title": "Tipo de contrato / Contract type",
            "enum": [
              "",
              "Suministros",
              "Servicios",
              "Obras",
              "Mixto",
              "Concesión de servicios",
              "Administrativo especial"
            ],
            "type": "string",
            "description": "Filtra por `TIPO DE CONTRATO`, en servidor (igualdad exacta). Valores reales verificados con curl sobre una muestra de 1000 filas de Contratos Mayores. Vacio = todos. / Server-side exact-match filter; empty = all types.",
            "default": ""
          },
          "ano": {
            "title": "Año / Year",
            "type": "string",
            "description": "Filtra por columna `ANO`, en servidor (igualdad exacta). El registro cubre desde 2023. Vacio = todos los años disponibles. / Server-side exact-match filter on the `ANO` column; empty = all years."
          },
          "importeMinimo": {
            "title": "Importe mínimo (EUR) / Minimum amount",
            "type": "integer",
            "description": "Filtra por el importe de adjudicación sin IVA (o, si no existe, el presupuesto de licitación sin IVA). ⚠️ CKAN `datastore_search` solo admite igualdad exacta en `filters` (no rangos): este filtro se aplica EN CLIENTE, tras traer cada página del servidor. / CKAN's datastore filters only support exact match, not ranges — applied CLIENT-SIDE after each server page."
          },
          "importeMaximo": {
            "title": "Importe máximo (EUR) / Maximum amount",
            "type": "integer",
            "description": "Igual que `importeMinimo` pero como cota superior (también en cliente). / Same as `importeMinimo`, upper bound (also client-side)."
          },
          "incluirContactosNominales": {
            "title": "Incluir datos nominales de personas físicas / Include named individuals' data",
            "type": "boolean",
            "description": "DESACTIVADO POR DEFECTO. El campo `NIF ADJUDICATARIO` del registro incluye NIFs sin enmascarar de personas físicas (autónomos) en una parte de los contratos menores y mayores — verificado con curl (muestra real: NIFs con máscara `***NNNN**` igual que en BDNS). Con esta opción desactivada, si el adjudicatario no es inequívocamente una persona jurídica, `adjudicatario.nif` y `.razonSocial` se anulan y solo queda `.tipoPersona`. Activarla incluye datos personales: su tratamiento y redifusión quedan bajo tu responsabilidad (RGPD / LOPDGDD). / OFF by default — sole-trader awardees' name/tax-ID are nulled unless enabled.",
            "default": false
          },
          "maxItems": {
            "title": "Máximo de resultados / Max items",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Número máximo de contratos a guardar en el dataset. El actor para limpiamente al alcanzarlo. / Hard cap on dataset items.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}