{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain BORME Corporate Monitor",
    "version": "0.1",
    "x-build-id": "TNh8ZDiOT2WwKvlXF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goobertje~spain-borme-corporate-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goobertje-spain-borme-corporate-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/goobertje~spain-borme-corporate-monitor/runs": {
      "post": {
        "operationId": "runs-sync-goobertje-spain-borme-corporate-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/goobertje~spain-borme-corporate-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-goobertje-spain-borme-corporate-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": {
          "dateFrom": {
            "title": "Published from",
            "type": "string",
            "description": "First BORME publication date to include (YYYY-MM-DD, Madrid time). Defaults to today. dateFrom and dateTo together may cover at most 31 days per run. Example: \"2026-11-10\"."
          },
          "dateTo": {
            "title": "Published until",
            "type": "string",
            "description": "Last BORME publication date to include (YYYY-MM-DD, Madrid time). Defaults to today. Days without a BORME (weekends, holidays) are counted and skipped, not treated as errors. Example: \"2026-11-12\"."
          },
          "sections": {
            "title": "BORME sections",
            "type": "array",
            "description": "Which BORME sections to read. A = registered acts per province, B = other acts published in the Commercial Registry, C = legal notices and announcements. Default: all three. Example: [\"A\", \"B\"].",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C"
              ],
              "enumTitles": [
                "Section A - Empresarios. Actos inscritos (registered acts)",
                "Section B - Otros actos publicados en el Registro Mercantil (other acts)",
                "Section C - Anuncios y avisos legales (legal notices)"
              ]
            },
            "default": [
              "A",
              "B",
              "C"
            ]
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Keep Section A/B documents from these provinces, matched against the published document title ignoring case and accents (\"Barcelona\" = \"BARCELONA\"; bilingual titles also match either part, so \"Alicante\" matches \"ALICANTE/ALACANT\"). Up to 100. Empty means all of Spain. Section C has no province and is not affected. Example: [\"Madrid\", \"Barcelona\"].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "actTypes": {
            "title": "Act types",
            "type": "array",
            "description": "Keep only Section A/B acts whose published paragraph carries at least one of these labels. Acts with an unlisted label are still returned when this filter is empty. Section C notices carry no act type. Example: [\"Constitución\", \"Nombramientos\"].",
            "items": {
              "type": "string",
              "enum": [
                "Constitución",
                "Nombramientos",
                "Ceses/Dimisiones",
                "Revocaciones",
                "Reelecciones",
                "Cambio de domicilio social",
                "Cambio de denominación social",
                "Cambio de objeto social",
                "Ampliación del objeto social",
                "Ampliación de capital",
                "Reducción de capital",
                "Modificaciones estatutarias",
                "Declaración de unipersonalidad",
                "Pérdida del carácter de unipersonalidad",
                "Socio único",
                "Disolución",
                "Extinción",
                "Fusión por absorción",
                "Escisión",
                "Transformación de sociedad",
                "Situación concursal",
                "Declaración de concurso",
                "Otros conceptos",
                "Depósito de libros",
                "Nombramiento de auditor",
                "Emisión de obligaciones",
                "Primera inscripción",
                "Cierre provisional",
                "Reapertura hoja registral"
              ],
              "enumTitles": [
                "Constitución (incorporation)",
                "Nombramientos (appointments)",
                "Ceses/Dimisiones (resignations)",
                "Revocaciones (revocations)",
                "Reelecciones (re-elections)",
                "Cambio de domicilio social (registered office change)",
                "Cambio de denominación social (company name change)",
                "Cambio de objeto social (corporate purpose change)",
                "Ampliación del objeto social (corporate purpose extension)",
                "Ampliación de capital (capital increase)",
                "Reducción de capital (capital reduction)",
                "Modificaciones estatutarias (articles of association changes)",
                "Declaración de unipersonalidad (sole-shareholder declaration)",
                "Pérdida del carácter de unipersonalidad (end of sole-shareholder status)",
                "Socio único (sole shareholder)",
                "Disolución (dissolution)",
                "Extinción (striking off)",
                "Fusión por absorción (merger by absorption)",
                "Escisión (spin-off)",
                "Transformación de sociedad (company conversion)",
                "Situación concursal (insolvency)",
                "Declaración de concurso (insolvency declaration)",
                "Otros conceptos (other matters)",
                "Depósito de libros (books filing)",
                "Nombramiento de auditor (auditor appointment)",
                "Emisión de obligaciones (bond issue)",
                "Primera inscripción (first registration)",
                "Cierre provisional (provisional closure)",
                "Reapertura hoja registral (registry page reopening)"
              ]
            },
            "default": []
          },
          "companyNameContains": {
            "title": "Company name contains",
            "type": "string",
            "description": "Keep acts and notices whose published company name contains these words, ignoring case and accents. Empty means any. Example: \"construcciones\"."
          },
          "deltaMode": {
            "title": "Only new announcements (delta mode)",
            "type": "boolean",
            "description": "Remember every delivered announcement id in a named key-value store and skip them on later runs, so a daily schedule only returns announcements not delivered before. Skipped announcements are not billed. The first run returns everything that matches.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
            "minLength": 3,
            "maxLength": 63,
            "type": "string",
            "description": "Name of the persistent key-value store that holds the delta state. Use a different name per feed (for example per section or province set). Only lowercase letters, digits and hyphens are allowed (not at the start or end). Default: \"borme-monitor-state\".",
            "default": "borme-monitor-state"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of announcements (dataset items, each one billed) a run outputs; the run stops once reached. Free status rows for unreadable documents are not counted and not billed, and neither are announcements skipped in delta mode. Default: 1000.",
            "default": 1000
          },
          "requestDelaySecs": {
            "title": "Delay between requests (seconds)",
            "minimum": 1,
            "maximum": 30,
            "type": "number",
            "description": "Pause between requests to the BOE API, to stay polite. Minimum 1, maximum 30. Default: 1.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}