{
  "openapi": "3.0.1",
  "info": {
    "title": "Spanish Law Scraper (BOE) - Consolidated Legislation for RAG",
    "description": "Get Spanish consolidated laws from the official BOE API article by article: clean text, validity dates, version history and change alerts. Ready for legal RAG.",
    "version": "0.1",
    "x-build-id": "FY06EOk0apoqYSOfE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flets_sv~boe-legislacion-consolidada/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flets_sv-boe-legislacion-consolidada",
        "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/flets_sv~boe-legislacion-consolidada/runs": {
      "post": {
        "operationId": "runs-sync-flets_sv-boe-legislacion-consolidada",
        "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/flets_sv~boe-legislacion-consolidada/run-sync": {
      "post": {
        "operationId": "run-sync-flets_sv-boe-legislacion-consolidada",
        "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": {
          "normas": {
            "title": "Normas (id BOE o URL)",
            "type": "array",
            "description": "Identificadores BOE (por ejemplo BOE-A-1978-31229) o URLs de boe.es de la norma consolidada.",
            "items": {
              "type": "string"
            }
          },
          "codigosPredefinidos": {
            "title": "Codigos predefinidos",
            "uniqueItems": true,
            "type": "array",
            "description": "Atajos a las normas mas consultadas: Constitucion, Codigo Civil, Codigo Penal y otras.",
            "items": {
              "type": "string",
              "enum": [
                "constitucion",
                "codigo-civil",
                "codigo-penal",
                "codigo-comercio",
                "estatuto-trabajadores",
                "lec",
                "ley-general-tributaria",
                "ley-iva",
                "ley-irpf",
                "ley-sociedades-capital",
                "ley-39-2015",
                "lcsp",
                "lopdgdd",
                "lau"
              ]
            },
            "default": []
          },
          "tiposBloque": {
            "title": "Tipos de bloque",
            "type": "array",
            "description": "Tipos de bloque a emitir: precepto (articulos), encabezado, parte_dispositiva o firma.",
            "items": {
              "type": "string"
            },
            "default": [
              "precepto"
            ]
          },
          "fechaVigencia": {
            "title": "Fecha de vigencia (AAAA-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Si se indica, devuelve la version vigente en esa fecha. Vacio: version actual.",
            "default": ""
          },
          "incluirHistorico": {
            "title": "Incluir historico",
            "type": "boolean",
            "description": "Emite todas las versiones de cada articulo, no solo una.",
            "default": false
          },
          "soloCambios": {
            "title": "Solo cambios",
            "type": "boolean",
            "description": "Emite solo los articulos nuevos o modificados desde la ultima ejecucion.",
            "default": false
          },
          "incluirMaterias": {
            "title": "Incluir materias",
            "type": "boolean",
            "description": "Anade las materias del analisis oficial de la norma a cada registro.",
            "default": true
          },
          "formatoTexto": {
            "title": "Formato del texto",
            "enum": [
              "texto",
              "markdown",
              "html"
            ],
            "type": "string",
            "description": "Formato del campo texto: texto plano, markdown o html.",
            "default": "texto"
          },
          "maxArticulos": {
            "title": "Maximo de articulos",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Tope de registros emitidos en total, para controlar el coste.",
            "default": 1000
          },
          "pausaMs": {
            "title": "Pausa entre peticiones (ms)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Milisegundos de espera entre peticiones al BOE.",
            "default": 500
          },
          "diasRetencion": {
            "title": "Dias de retencion",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Dias que se conserva el estado de articulos vistos para detectar cambios.",
            "default": 365
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}