{
  "openapi": "3.0.1",
  "info": {
    "title": "Alertas de licitaciones de España (PLACSP) y Europa (TED)",
    "description": "Recibe cada día las licitaciones públicas nuevas de España (PLACSP) y de la UE (TED) filtradas para tu negocio: palabras clave, CPV, comunidad autónoma, presupuesto, tipo de contrato y estado. Alertas diarias por email o webhook con el modo solo novedades. Datos oficiales, sin scraping.",
    "version": "0.0",
    "x-build-id": "U8TzVp3r8cHdvDd7L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/inforwebpyme~placsp-licitaciones-alertas/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-inforwebpyme-placsp-licitaciones-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/inforwebpyme~placsp-licitaciones-alertas/runs": {
      "post": {
        "operationId": "runs-sync-inforwebpyme-placsp-licitaciones-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/inforwebpyme~placsp-licitaciones-alertas/run-sync": {
      "post": {
        "operationId": "run-sync-inforwebpyme-placsp-licitaciones-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": {
          "fuente": {
            "title": "Fuente de licitaciones",
            "enum": [
              "PLACSP",
              "TED",
              "AMBAS"
            ],
            "type": "string",
            "description": "PLACSP = licitaciones de España (Plataforma de Contratación). TED = licitaciones de toda la Unión Europea (Tenders Electronic Daily, solo avisos por encima de los umbrales europeos). AMBAS = las dos fuentes.",
            "default": "PLACSP"
          },
          "palabrasClave": {
            "title": "Palabras clave",
            "type": "array",
            "description": "La licitación debe contener al menos una de estas palabras en el título, el objeto o el organismo (sin distinguir mayúsculas ni tildes). Deja la lista vacía para no filtrar por texto.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cpv": {
            "title": "Códigos CPV (prefijos)",
            "type": "array",
            "description": "Prefijos de códigos CPV 2008. Ejemplos: 72 (servicios TI), 48 (paquetes de software), 302 (equipos informáticos), 45 (construcción). Vacío = todos los CPV.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nuts": {
            "title": "Comunidad autónoma / provincia (prefijos NUTS)",
            "type": "array",
            "description": "Prefijos NUTS del lugar de ejecución. Ejemplos: ES70 (Canarias), ES701 (Las Palmas), ES61 (Andalucía), ES30 (Madrid). Vacío = toda España.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "importeMin": {
            "title": "Presupuesto mínimo (€, sin IVA)",
            "type": "number",
            "description": "Presupuesto base de licitación mínimo sin IVA. 0 = sin mínimo.",
            "default": 0
          },
          "importeMax": {
            "title": "Presupuesto máximo (€, sin IVA)",
            "type": "number",
            "description": "Presupuesto base de licitación máximo sin IVA. 0 = sin máximo.",
            "default": 0
          },
          "tiposContrato": {
            "title": "Tipos de contrato",
            "type": "array",
            "description": "Tipos de contrato a incluir. Por defecto se incluyen todos.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "21",
                "22",
                "31",
                "32",
                "40",
                "7",
                "8",
                "50"
              ],
              "enumTitles": [
                "Suministros",
                "Servicios",
                "Obras",
                "Gestión de servicios públicos",
                "Concesión de servicios",
                "Concesión de obras públicas",
                "Concesión de obras",
                "Colaboración público-privada",
                "Administrativo especial",
                "Privado",
                "Patrimonial"
              ]
            },
            "default": []
          },
          "estados": {
            "title": "Estado de la licitación",
            "type": "array",
            "description": "Estados a incluir. Por defecto solo las licitaciones en plazo de presentación de ofertas (PUB).",
            "items": {
              "type": "string",
              "enum": [
                "PUB",
                "EV",
                "ADJ",
                "FOR",
                "RES",
                "ANUL",
                "PRE"
              ],
              "enumTitles": [
                "En plazo (abierta)",
                "Pendiente de adjudicación",
                "Adjudicada",
                "Formalizada",
                "Resuelta",
                "Anulada",
                "Anuncio previo"
              ]
            },
            "default": [
              "PUB"
            ]
          },
          "incluirContratosMenores": {
            "title": "Incluir contratos menores",
            "type": "boolean",
            "description": "Incluye también los contratos menores publicados en la Plataforma (feed oficial separado).",
            "default": false
          },
          "soloNuevas": {
            "title": "Solo novedades",
            "type": "boolean",
            "description": "Si está activado, solo devuelve licitaciones no vistas en ejecuciones anteriores de este actor (ideal para alertas periódicas programadas).",
            "default": true
          },
          "maxResultados": {
            "title": "Máximo de resultados",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Número máximo de licitaciones devueltas en esta ejecución.",
            "default": 100
          },
          "paisesTED": {
            "title": "Países compradores (solo TED)",
            "type": "array",
            "description": "Códigos ISO de 3 letras del país del organismo comprador. Ejemplos: ESP (España), PRT (Portugal), FRA (Francia), DEU (Alemania). Vacío = toda la UE. Se aplican también tus filtros de palabras clave, CPV, NUTS e importe.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "diasTED": {
            "title": "Días hacia atrás (solo TED)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Antigüedad máxima de los avisos TED a consultar (1-60 días).",
            "default": 7
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}