{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain BOE Scraper — Official Gazette Monitor & Alerts",
    "description": "Scrape the Spanish Official Gazette (BOE) by keyword, section and tax ID (NIF/CIF). Stateful delta mode: every run returns only what is new, ideal for daily alerts. Monitor del BOE por palabra clave, sección y NIF, con filtro de derecho al olvido.",
    "version": "0.1",
    "x-build-id": "3LqGzBwqcrSJjl6Ux"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xamto1987~spain-boe-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xamto1987-spain-boe-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/xamto1987~spain-boe-monitor/runs": {
      "post": {
        "operationId": "runs-sync-xamto1987-spain-boe-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/xamto1987~spain-boe-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-xamto1987-spain-boe-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": "Palabras clave / Keywords",
            "type": "array",
            "description": "Terminos a vigilar en el titulo de cada documento del BOE (busqueda por substring, sin distinguir mayusculas ni acentos). Vacio junto con `identificadores` = se entrega TODO lo publicado en las secciones seleccionadas (o todo el BOE si tampoco hay secciones). / Terms to watch for in each BOE document's title.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "secciones": {
            "title": "Secciones / Sections",
            "type": "array",
            "description": "Ambito de busqueda por seccion del BOE. Vacio = todas. Valores validos: I (Disposiciones generales), II-A (Nombramientos, situaciones e incidencias), II-B (Oposiciones y concursos), III (Otras disposiciones), IV (Administracion de Justicia), V-A (Contratacion del Sector Publico), V-B (Otros anuncios oficiales), V-C (Anuncios particulares), T (Tribunal Constitucional). / BOE section scope; empty = all sections.",
            "items": {
              "type": "string",
              "enum": [
                "I",
                "II-A",
                "II-B",
                "III",
                "IV",
                "V-A",
                "V-B",
                "V-C",
                "T"
              ]
            },
            "default": []
          },
          "identificadores": {
            "title": "NIF/CIF a vigilar / Tax IDs to watch",
            "type": "array",
            "description": "Lista de NIF/CIF a buscar en el TEXTO INTEGRO de cada documento del ambito (no solo el titulo). Coste alto: exige descargar el XML de cada documento candidato a 1 peticion/segundo. Acota `secciones` y `diasHaciaAtras` si usas este filtro. / Spanish tax IDs to watch for in each document's full text. Expensive: fetches the full XML per candidate document.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "diasHaciaAtras": {
            "title": "Dias hacia atras / Days back",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Solo se usa en la PRIMERA ejecucion (define la ventana inicial) o cuando `soloNuevos` esta desactivado. En ejecuciones posteriores con `soloNuevos: true`, el actor continua automaticamente desde la ultima fecha procesada, sin necesidad de tocar este valor. Maximo 30. / Only used on the first run (defines the initial window) or when `soloNuevos` is off; later runs resume automatically from the last processed date.",
            "default": 1
          },
          "soloNuevos": {
            "title": "Solo nuevos (modo delta) / New items only (delta mode)",
            "type": "boolean",
            "description": "ACTIVADO POR DEFECTO. El actor recuerda (KV store) que identificadores ya entrego y no los vuelve a empujar: cada ejecucion trae solo lo publicado desde la anterior. Desactivalo para volcar de nuevo toda la ventana de `diasHaciaAtras`, ignorando el historial. / ON by default: the actor remembers what it already delivered and only emits new documents each run.",
            "default": true
          },
          "incluirTextoCompleto": {
            "title": "Incluir texto integro / Include full text",
            "type": "boolean",
            "description": "DESACTIVADO POR DEFECTO. Anade el texto integro del documento (extraido del XML oficial) a cada item del dataset. Nota legal: la propia API del BOE enlaza a una ruta (`/diario_boe/xml.php`) que el robots.txt del sitio bloquea para rastreadores de busqueda; la licencia Ley 37/2007 autoriza la reutilizacion comercial, pero por eso esta opcion queda desactivada por defecto (ver README). / OFF by default: adds the document's full text to each item.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}