{
  "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": "phi3gxW7GcZEfkeXW"
  },
  "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": "Keywords / Palabras clave",
            "type": "array",
            "description": "Terms to watch for in each BOE document's title (substring match, case- and accent-insensitive). Empty together with 'identificadores' = everything published in the selected sections is delivered (or the whole BOE if no sections are set). / ES: términos a vigilar en el título de cada documento del BOE.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "secciones": {
            "title": "Sections / Secciones",
            "type": "array",
            "description": "BOE section scope. Empty = all sections. / ES: ámbito de búsqueda por sección del BOE; vacío = todas.",
            "items": {
              "type": "string",
              "enum": [
                "I",
                "II-A",
                "II-B",
                "III",
                "IV",
                "V-A",
                "V-B",
                "V-C",
                "T"
              ],
              "enumTitles": [
                "I — General provisions (Disposiciones generales)",
                "II-A — Appointments (Nombramientos, situaciones e incidencias)",
                "II-B — Public job calls (Oposiciones y concursos)",
                "III — Other provisions (Otras disposiciones)",
                "IV — Justice administration (Administración de Justicia)",
                "V-A — Public procurement (Contratación del Sector Público)",
                "V-B — Other official notices (Otros anuncios oficiales)",
                "V-C — Private notices (Anuncios particulares)",
                "T — Constitutional Court (Tribunal Constitucional)"
              ]
            },
            "default": []
          },
          "identificadores": {
            "title": "Tax IDs to watch / NIF-CIF a vigilar",
            "type": "array",
            "description": "Spanish tax IDs (NIF/CIF) to look for in the FULL TEXT of every document in scope, not just the title. Expensive: it downloads the XML of each candidate document at 1 request/second. Narrow 'secciones' and 'diasHaciaAtras' when you use this filter. / ES: busca el NIF/CIF en el texto íntegro; coste alto, acota secciones y días.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "diasHaciaAtras": {
            "title": "Days back / Días hacia atrás",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only used on the FIRST run (it defines the initial window) or when 'soloNuevos' is off. On later runs with 'soloNuevos: true' the Actor resumes automatically from the last processed date, with no need to touch this value. Maximum 30. / ES: solo en la primera ejecución o con el modo delta desactivado; máximo 30.",
            "default": 1
          },
          "soloNuevos": {
            "title": "New items only (delta mode) / Solo nuevos",
            "type": "boolean",
            "description": "ON BY DEFAULT. The Actor remembers in its key-value store which document IDs it already delivered and never pushes them again: every run brings only what was published since the previous one. Turn it off to dump the whole 'diasHaciaAtras' window again, ignoring history. / ES: activado por defecto; cada ejecución trae solo lo nuevo desde la anterior.",
            "default": true
          },
          "incluirTextoCompleto": {
            "title": "Include full text / Incluir texto íntegro",
            "type": "boolean",
            "description": "OFF BY DEFAULT. Adds the document's full text (extracted from the official XML) to every dataset item. Legal note: the BOE's own API links to a path (/diario_boe/xml.php) that the site's robots.txt blocks for search crawlers; Spanish Law 37/2007 does allow commercial re-use, which is why this option is off by default rather than removed (see README). / ES: desactivado por defecto; añade el texto íntegro del XML oficial.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}