{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Public Tenders Scraper & Alerts (Licitaciones PLACSP)",
    "description": "Daily alerts of new Spanish public tenders (licitaciones) from PLACSP and the regional platforms of Andalucía, Madrid, Cataluña, Euskadi, Galicia, Navarra and La Rioja. Filter by CPV, province, region, budget and keywords. Only new tenders since your last run.",
    "version": "1.1",
    "x-build-id": "Dqx5FmzcSc7eUyTnr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hispadata~spain-public-tenders-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hispadata-spain-public-tenders-monitor",
        "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/hispadata~spain-public-tenders-monitor/runs": {
      "post": {
        "operationId": "runs-sync-hispadata-spain-public-tenders-monitor",
        "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/hispadata~spain-public-tenders-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-hispadata-spain-public-tenders-monitor",
        "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": "Returns tenders whose title contains ANY of these words. Accents and case are ignored. Example: ciberseguridad, software, limpieza.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords / Excluir palabras",
            "type": "array",
            "description": "Skip tenders whose title contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "cpvCodes": {
            "title": "CPV codes (prefixes) / Códigos CPV",
            "type": "array",
            "description": "CPV prefixes to match, e.g. 72 (IT services), 48 (software), 30 (office and computer equipment), 45 (construction), 90 (cleaning and waste). A prefix matches every code that starts with it.",
            "items": {
              "type": "string"
            }
          },
          "contractTypes": {
            "title": "Contract type / Tipo de contrato",
            "type": "array",
            "description": "Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "servicios",
                "suministros",
                "obras",
                "concesiones",
                "otros"
              ],
              "enumTitles": [
                "Services / Servicios",
                "Supplies / Suministros",
                "Works / Obras",
                "Concessions / Concesiones",
                "Other / Otros"
              ]
            }
          },
          "statuses": {
            "title": "Status / Estado",
            "type": "array",
            "description": "Default: only tenders open for bids. Add Awarded to see who won contracts.",
            "items": {
              "type": "string",
              "enum": [
                "PRE",
                "PUB",
                "EV",
                "ADJ",
                "RES",
                "ANUL"
              ],
              "enumTitles": [
                "Prior notice / Anuncio previo",
                "Open for bids / En plazo",
                "Under evaluation / Pendiente de adjudicación",
                "Awarded / Adjudicada",
                "Resolved / Resuelta",
                "Cancelled / Anulada"
              ]
            },
            "default": [
              "PUB"
            ]
          },
          "provinces": {
            "title": "Provinces / Provincias",
            "type": "array",
            "description": "Place where the contract is carried out. Leave empty for all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "A Coruña",
                "Álava",
                "Albacete",
                "Alicante",
                "Almería",
                "Asturias",
                "Ávila",
                "Badajoz",
                "Barcelona",
                "Bizkaia",
                "Burgos",
                "Cantabria",
                "Castellón",
                "Ceuta",
                "Ciudad Real",
                "Cuenca",
                "Cáceres",
                "Cádiz",
                "Córdoba",
                "Gipuzkoa",
                "Girona",
                "Granada",
                "Guadalajara",
                "Huelva",
                "Huesca",
                "Illes Balears",
                "Jaén",
                "La Rioja",
                "Las Palmas",
                "León",
                "Lleida",
                "Lugo",
                "Madrid",
                "Melilla",
                "Murcia",
                "Málaga",
                "Navarra",
                "Ourense",
                "Palencia",
                "Pontevedra",
                "Salamanca",
                "Santa Cruz de Tenerife",
                "Segovia",
                "Sevilla",
                "Soria",
                "Tarragona",
                "Teruel",
                "Toledo",
                "Valencia",
                "Valladolid",
                "Zamora",
                "Zaragoza"
              ]
            }
          },
          "regions": {
            "title": "Regions / Comunidades autónomas",
            "type": "array",
            "description": "Leave empty for all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "Andalucía",
                "Aragón",
                "Asturias",
                "Canarias",
                "Cantabria",
                "Castilla y León",
                "Castilla-La Mancha",
                "Cataluña",
                "Ceuta",
                "Comunidad de Madrid",
                "Comunitat Valenciana",
                "Extremadura",
                "Galicia",
                "Illes Balears",
                "La Rioja",
                "Melilla",
                "Navarra",
                "País Vasco",
                "Región de Murcia"
              ]
            }
          },
          "contractingAuthorityContains": {
            "title": "Contracting authority contains / Órgano de contratación contiene",
            "type": "string",
            "description": "Text that the buyer name (or its parent body) must contain, e.g. Ayuntamiento de Sevilla, Universidad, Servicio Andaluz de Salud."
          },
          "minBudget": {
            "title": "Minimum budget € (without VAT) / Importe mínimo",
            "minimum": 0,
            "type": "integer",
            "description": "Budget without VAT. Tenders without a budget are skipped when you set this."
          },
          "maxBudget": {
            "title": "Maximum budget € (without VAT) / Importe máximo",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum budget € (without VAT) / Importe máximo"
          },
          "minDaysToDeadline": {
            "title": "Minimum days left to bid / Días mínimos hasta el fin de plazo",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tenders that close sooner than this. Example: 5 leaves out tenders closing in the next 4 days."
          },
          "includeExpiredDeadlines": {
            "title": "Include tenders whose deadline has passed / Incluir plazos vencidos",
            "type": "boolean",
            "description": "The official feed keeps some tenders as 'open' for a while after the deadline. By default they are left out. Turn this on to receive them too (they come with statusLabel 'Plazo terminado').",
            "default": false
          },
          "onlyNew": {
            "title": "Only new tenders since last run / Solo novedades",
            "type": "boolean",
            "description": "Remembers what you already received with these same filters and never sends (or charges) it twice. Keep it on for daily alerts.",
            "default": true
          },
          "includeStatusChanges": {
            "title": "Also send status changes / Enviar cambios de estado",
            "type": "boolean",
            "description": "When on, a tender you already received is sent again if its status changes (for example from open to awarded).",
            "default": false
          },
          "lookbackDays": {
            "title": "Days to look back on the first run / Días hacia atrás",
            "minimum": 1,
            "maximum": 14,
            "type": "integer",
            "description": "How far back the first run reads. Later runs continue from where the previous one stopped.",
            "default": 2
          },
          "maxResults": {
            "title": "Maximum tenders per run / Máximo por ejecución",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on results (and on what you pay) per run.",
            "default": 1000
          },
          "sources": {
            "title": "Sources / Fuentes",
            "type": "array",
            "description": "PLACSP and the regional platforms never overlap, so keep both for full coverage.",
            "items": {
              "type": "string",
              "enum": [
                "placsp",
                "agregadas",
                "menores"
              ],
              "enumTitles": [
                "PLACSP (State, councils and most bodies)",
                "Regional platforms (Andalucía, Madrid, Cataluña, Euskadi, Galicia, Navarra, La Rioja)",
                "Minor contracts / Contratos menores (high volume)"
              ]
            },
            "default": [
              "placsp",
              "agregadas"
            ]
          },
          "includeDocuments": {
            "title": "Include tender document links / Incluir pliegos",
            "type": "boolean",
            "description": "Include tender document links / Incluir pliegos",
            "default": true
          },
          "maxPagesPerSource": {
            "title": "Max feed pages per source (advanced)",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Safety limit. Each feed page holds a few hours of updates.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}