{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain Public Tenders Alerts (PLACSP) – Licitaciones",
    "description": "New Spanish public tenders and status changes from PLACSP (contrataciondelestado.es). Filter by CPV, region (NUTS), amount and keywords. Deduplicated across runs: you only get, and pay for, what's new. Licitaciones públicas España con alertas.",
    "version": "0.1",
    "x-build-id": "dDWdOfvJsXej6foNx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cloudblondotter~placsp-alertas/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cloudblondotter-placsp-alertas",
        "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/cloudblondotter~placsp-alertas/runs": {
      "post": {
        "operationId": "runs-sync-cloudblondotter-placsp-alertas",
        "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/cloudblondotter~placsp-alertas/run-sync": {
      "post": {
        "operationId": "run-sync-cloudblondotter-placsp-alertas",
        "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": {
          "perfil": {
            "title": "Perfil de alerta",
            "type": "string",
            "description": "Nombre de esta alerta. Cada perfil recuerda por separado qué licitaciones ya te entregó. Usa uno distinto por cada combinación de filtros.",
            "default": "default"
          },
          "estados": {
            "title": "Estados a seguir",
            "type": "array",
            "description": "PRE = anuncio previo, PUB = en plazo, EV = pendiente de adjudicación, ADJ = adjudicada, RES = resuelta, ANUL = anulada. Si una licitación ya entregada pasa a otro estado de la lista, se entrega de nuevo como cambio.",
            "items": {
              "type": "string",
              "enum": [
                "PRE",
                "PUB",
                "EV",
                "ADJ",
                "RES",
                "ANUL"
              ],
              "enumTitles": [
                "Anuncio previo",
                "En plazo",
                "Pendiente de adjudicación",
                "Adjudicada",
                "Resuelta",
                "Anulada"
              ]
            },
            "default": [
              "PUB"
            ]
          },
          "cpv": {
            "title": "Códigos CPV (prefijos)",
            "type": "array",
            "description": "Prefijos CPV. Ej.: 72 (servicios TI), 4500 (obras), 15981 (agua mineral). Se comparan también los CPV de cada lote.",
            "items": {
              "type": "string"
            }
          },
          "nuts": {
            "title": "Lugar de ejecución (prefijos NUTS)",
            "type": "array",
            "description": "Ej.: ES3 (Comunidad de Madrid), ES61 (Andalucía), ES511 (Barcelona).",
            "items": {
              "type": "string"
            }
          },
          "tiposContrato": {
            "title": "Tipos de contrato",
            "type": "array",
            "description": "Tipos de contrato a incluir. Vacío = todos.",
            "items": {
              "type": "string",
              "enum": [
                "obras",
                "servicios",
                "suministros",
                "gestion_servicios",
                "concesion_servicios",
                "concesion_obras",
                "colaboracion_publico_privada",
                "administrativo_especial",
                "privado",
                "patrimonial",
                "otros"
              ]
            }
          },
          "importeMin": {
            "title": "Importe mínimo (€, sin IVA)",
            "minimum": 0,
            "type": "integer",
            "description": "Sobre el presupuesto base sin IVA (o el valor estimado si no hay presupuesto). Basta con que la licitación o uno de sus lotes esté en el rango."
          },
          "importeMax": {
            "title": "Importe máximo (€, sin IVA)",
            "minimum": 0,
            "type": "integer",
            "description": "Sobre el presupuesto base sin IVA (o el valor estimado si no hay presupuesto). Basta con que la licitación o uno de sus lotes esté en el rango."
          },
          "palabrasClave": {
            "title": "Palabras clave (cualquiera)",
            "type": "array",
            "description": "Busca en el título, el resumen y el objeto de los lotes, sin distinguir mayúsculas ni acentos.",
            "items": {
              "type": "string"
            }
          },
          "excluirPalabras": {
            "title": "Excluir si contiene",
            "type": "array",
            "description": "Descarta la licitación si alguna de estas palabras aparece en el título, el resumen o el objeto de un lote (sin distinguir mayúsculas ni acentos).",
            "items": {
              "type": "string"
            }
          },
          "soloConPlazoAbierto": {
            "title": "Solo con plazo abierto",
            "type": "boolean",
            "description": "Para PRE y PUB, descarta las licitaciones cuyo plazo de presentación ya venció.",
            "default": true
          },
          "excluirReservados": {
            "title": "Excluir contratos reservados",
            "type": "boolean",
            "description": "Descarta contratos reservados a centros especiales de empleo o empresas de inserción.",
            "default": true
          },
          "soloSubcontratacionPermitida": {
            "title": "Solo si permite subcontratación",
            "type": "boolean",
            "description": "Solo licitaciones cuyos pliegos indican que se permite subcontratar.",
            "default": false
          },
          "diasAtras": {
            "title": "Días hacia atrás en la primera ejecución",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Solo se usa la primera vez (o tras reiniciar la memoria). Cada día añade ~10-15 páginas (~15-20 min) a esa primera ejecución.",
            "default": 1
          },
          "reiniciarMemoria": {
            "title": "Reiniciar memoria",
            "type": "boolean",
            "description": "Olvida lo ya entregado en este perfil y vuelve a empezar.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}