{
  "openapi": "3.0.1",
  "info": {
    "title": "Catalonia Tenders Scraper — Licitacions Públiques PSCP",
    "description": "Scrape Catalonia public procurement tenders and awards from the Generalitat's official PSCP open-data dataset, with optional full tender-record enrichment (contracting body, lots, awardees). Licitacions i adjudicacions públiques de Catalunya, dataset oficial PSCP.",
    "version": "0.1",
    "x-build-id": "NW3cHd2Htn180lbIn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xamto1987~catalonia-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xamto1987-catalonia-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~catalonia-tenders/runs": {
      "post": {
        "operationId": "runs-sync-xamto1987-catalonia-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~catalonia-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-xamto1987-catalonia-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 / Palabras clave",
            "type": "array",
            "description": "Terms to search for in the contract object ('objecte_contracte') and the publication title ('denominacio'). ONE server-side query is fired with all terms combined by OR; any term matches. Empty = no text filter (the full dataset is paged, sorted by date). / ES: búsqueda en servidor sobre objeto y título; vacío = sin filtro.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "tipoContrato": {
            "title": "Contract type / Tipo de contrato",
            "enum": [
              "",
              "Serveis",
              "Subministraments",
              "Obres",
              "Concessió de serveis",
              "Concessió d'obres",
              "Administratiu especial",
              "Altra legislació sectorial",
              "Contracte de serveis especials (annex IV)",
              "Privat d'Administració Pública",
              "Concessió de serveis especials (annex IV)",
              "Col·laboració Públic-Privat"
            ],
            "type": "string",
            "description": "Filters by 'tipus_contracte' exactly as the dataset publishes it (real values verified with a '$group' query, in Catalan). Empty = all types. / ES: filtra por el valor real del dataset, en catalán; vacío = todos.",
            "default": ""
          },
          "estado": {
            "title": "Status / Estado",
            "enum": [
              "",
              "anuncio",
              "adjudicacion",
              "formalizacion"
            ],
            "type": "string",
            "description": "Publication phase of the tender record ('fase_publicacio' in the dataset). 'anuncio' = open for bids; 'adjudicacion' = already awarded; 'formalizacion' = contract signed. Empty = all phases (which also includes execution, cancellations and quarterly aggregate publications). / ES: fase de publicación del expediente; vacío = todas.",
            "default": ""
          },
          "importeMinimo": {
            "title": "Minimum amount (EUR) / Importe mínimo",
            "type": "integer",
            "description": "Server-side filter on the tender budget excluding VAT (or, failing that, the award amount excluding VAT). / ES: filtro en servidor sobre el presupuesto de licitación sin IVA."
          },
          "importeMaximo": {
            "title": "Maximum amount (EUR) / Importe máximo",
            "type": "integer",
            "description": "Same as 'importeMinimo', as an upper bound. / ES: igual que importeMinimo, como cota superior."
          },
          "fechaDesde": {
            "title": "Date from / Fecha desde",
            "type": "string",
            "description": "Only records published on or after this date. It applies to the publication date of the phase chosen in 'estado' (anuncio/adjudicacion/formalizacion); with no 'estado', it applies to the announcement date. ISO format 'YYYY-MM-DD'. Recommended for daily incremental runs (the dataset updates daily). / ES: fecha ISO; recomendada para ejecuciones incrementales diarias."
          },
          "conDetalle": {
            "title": "With full tender detail / Con detalle del expediente",
            "type": "boolean",
            "description": "OFF BY DEFAULT. When on, for every saved tender the Actor makes ONE EXTRA REQUEST to the full tender record on the portal, adding the contracting body, lots and per-lot awardees. WARNING: this MULTIPLIES the number of HTTP requests (roughly x2) and therefore run time, because the Actor keeps to ~1 request/second. / ES: desactivado por defecto; duplica aproximadamente las peticiones y el tiempo de ejecución.",
            "default": false
          },
          "incluirContactosNominales": {
            "title": "Include named individuals' data / Incluir datos nominales de personas físicas",
            "type": "boolean",
            "description": "OFF BY DEFAULT. It guards TWO different things under one flag, because they are the same data category (a named natural person's identity): (1) ALWAYS, in the base listing: when the awardee is a sole trader (persona física) instead of a company, the source masks the tax ID but NOT the full name — while this option is off, 'adjudicatario.nif' and '.razonSocial' are nulled and only '.tipoPersona' remains; (2) only when 'conDetalle' is on: the detail record lists, for each contracting body, contact people WITH NAME, SURNAME, ROLE, PHONE AND EMAIL (public staff) — while this option is off, those fields never reach the dataset. Turning it on includes personal data: its processing and redistribution are your responsibility (GDPR / LOPDGDD). / ES: desactivado por defecto; protege el nombre del adjudicatario autónomo y los contactos nominales del órgano de contratación.",
            "default": false
          },
          "maxItems": {
            "title": "Max items / Máximo de resultados",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Hard cap on the number of tenders saved to the dataset. The Actor stops cleanly when it is reached. / ES: tope de licitaciones del dataset.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}