{
  "openapi": "3.0.1",
  "info": {
    "title": "Licitaciones de energía en España (PLACSP)",
    "description": "Licitaciones públicas de energía en España (PLACSP): fotovoltaica, alumbrado, climatización, recarga y eficiencia. Filtra por comunidad, sector e importe.\nSpain energy public tenders: solar PV, street lighting, HVAC, EV charging, efficiency. Daily alerts.",
    "version": "0.0",
    "x-build-id": "QF64Yq0FRb58zd9BH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/natxey~licitaciones-energia/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-natxey-licitaciones-energia",
        "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/natxey~licitaciones-energia/runs": {
      "post": {
        "operationId": "runs-sync-natxey-licitaciones-energia",
        "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/natxey~licitaciones-energia/run-sync": {
      "post": {
        "operationId": "run-sync-natxey-licitaciones-energia",
        "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": {
          "sectores": {
            "title": "Sectores energéticos",
            "type": "array",
            "description": "Qué tipos de licitación buscar. Si no eliges ninguno se buscan todos menos la compra de vehículos eléctricos, que es opcional.",
            "items": {
              "type": "string",
              "enum": [
                "fotovoltaica_autoconsumo",
                "eficiencia_energetica",
                "alumbrado",
                "climatizacion",
                "suministro_energia",
                "instalaciones_electricas",
                "movilidad_electrica",
                "almacenamiento_renovables",
                "consultoria_energetica",
                "vehiculos_electricos"
              ],
              "enumTitles": [
                "Fotovoltaica y autoconsumo",
                "Eficiencia energética",
                "Alumbrado público e iluminación",
                "Climatización, calefacción y bombas de calor",
                "Suministro de electricidad y gas",
                "Instalaciones eléctricas (BT/MT)",
                "Movilidad eléctrica y puntos de recarga",
                "Almacenamiento y otras renovables",
                "Ingeniería y consultoría energética",
                "Compra de vehículos eléctricos (opcional)"
              ]
            },
            "default": []
          },
          "comunidades": {
            "title": "Comunidades autónomas",
            "type": "array",
            "description": "Filtra por lugar de ejecución. Vacío = toda España.",
            "items": {
              "type": "string",
              "enum": [
                "ES11",
                "ES12",
                "ES13",
                "ES21",
                "ES22",
                "ES23",
                "ES24",
                "ES30",
                "ES41",
                "ES42",
                "ES43",
                "ES51",
                "ES52",
                "ES53",
                "ES61",
                "ES62",
                "ES63",
                "ES64",
                "ES70"
              ],
              "enumTitles": [
                "Galicia",
                "Asturias",
                "Cantabria",
                "País Vasco",
                "Navarra",
                "La Rioja",
                "Aragón",
                "Madrid",
                "Castilla y León",
                "Castilla-La Mancha",
                "Extremadura",
                "Cataluña",
                "Comunitat Valenciana",
                "Illes Balears",
                "Andalucía",
                "Región de Murcia",
                "Ceuta",
                "Melilla",
                "Canarias"
              ]
            },
            "default": []
          },
          "estados": {
            "title": "Estado de la licitación",
            "type": "array",
            "description": "Por defecto solo las que están en plazo de presentación de ofertas.",
            "items": {
              "type": "string",
              "enum": [
                "PRE",
                "PUB",
                "EV",
                "ADJ",
                "RES",
                "ANUL"
              ],
              "enumTitles": [
                "Anuncio previo",
                "En plazo",
                "Pendiente de adjudicación",
                "Adjudicada",
                "Resuelta",
                "Anulada"
              ]
            },
            "default": [
              "PUB"
            ]
          },
          "presupuestoMinimo": {
            "title": "Presupuesto mínimo (€ sin IVA)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitaciones por debajo de este importe."
          },
          "presupuestoMaximo": {
            "title": "Presupuesto máximo (€ sin IVA)",
            "minimum": 0,
            "type": "integer",
            "description": "Descarta licitaciones por encima de este importe (útil para pymes)."
          },
          "diasAtras": {
            "title": "Días hacia atrás",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Revisa las publicaciones y cambios de los últimos N días, contados desde la última actualización que haya publicado la Plataforma (su feed suele ir con algún día de retraso). Para un aviso diario, 1 o 2.",
            "default": 2
          },
          "excluirVencidas": {
            "title": "Excluir las de plazo vencido",
            "type": "boolean",
            "description": "Quita las licitaciones cuya fecha límite ya ha pasado.",
            "default": true
          },
          "soloNuevasDesdeUltimaEjecucion": {
            "title": "Solo nuevas o modificadas desde la última ejecución",
            "type": "boolean",
            "description": "Ideal para una tarea programada diaria: no repite licitaciones ya entregadas salvo que cambien.",
            "default": false
          },
          "incluirContratosMenores": {
            "title": "Incluir contratos menores",
            "type": "boolean",
            "description": "Añade el feed de contratos menores (importes pequeños, interesante para instaladores locales).",
            "default": false
          },
          "usarPalabrasClave": {
            "title": "Detectar también por palabras del título",
            "type": "boolean",
            "description": "Además de los códigos CPV, busca términos como \"fotovoltaica\", \"alumbrado\" o \"punto de recarga\" en el título. Encuentra licitaciones mal clasificadas.",
            "default": true
          },
          "cpvExtra": {
            "title": "Códigos CPV adicionales",
            "type": "array",
            "description": "Códigos o prefijos CPV extra que quieras incluir, por ejemplo 45315000.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "palabrasClaveExtra": {
            "title": "Palabras clave adicionales",
            "type": "array",
            "description": "Términos extra a buscar en el título.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultados": {
            "title": "Máximo de resultados",
            "minimum": 1,
            "type": "integer",
            "description": "Límite de licitaciones a devolver en esta ejecución.",
            "default": 1000
          },
          "maxPaginas": {
            "title": "Máximo de páginas del feed",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cada página tiene hasta 500 actualizaciones. Límite de seguridad.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}