{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain New Companies – BORME Alerts, Officers & Dissolutions",
    "description": "Spanish company events from the official BORME as clean JSON: new companies (objeto social, capital, address), officer appointments and resignations, capital changes, dissolutions, mergers, insolvency. Filter by province, act type, date, keyword; only-new monitoring.",
    "version": "0.1",
    "x-build-id": "AdSn1bTQWtNiiEfMn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~spain-borme-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-spain-borme-alerts",
        "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/gazidev~spain-borme-alerts/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-spain-borme-alerts",
        "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/gazidev~spain-borme-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-spain-borme-alerts",
        "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": {
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Spanish provinces of the Mercantile Registry, by name (`Madrid`, `Barcelona`, `Valencia`, `Málaga`, `Bizkaia`...) or INE code (`28`, `08`). Empty = all of Spain. Applies to Section A (registered acts).",
            "items": {
              "type": "string"
            }
          },
          "actTypes": {
            "title": "Act types (any of)",
            "type": "array",
            "description": "Return only registry entries containing at least one of these acts. Empty = all acts.",
            "items": {
              "type": "string",
              "enum": [
                "constitution",
                "appointments",
                "dismissals",
                "revocations",
                "reelections",
                "appointment_cancellations",
                "capital_increase",
                "capital_reduction",
                "address_change",
                "purpose_change",
                "name_change",
                "bylaws_change",
                "sole_shareholder",
                "dissolution",
                "extinction",
                "insolvency",
                "merger",
                "split",
                "transformation",
                "branch",
                "reactivation",
                "registry_closure",
                "correction",
                "other"
              ],
              "enumTitles": [
                "Constitución – new company",
                "Nombramientos – appointments",
                "Ceses/Dimisiones – dismissals & resignations",
                "Revocaciones – revocations (powers, officers)",
                "Reelecciones – re-elections",
                "Cancelaciones de oficio de nombramientos",
                "Ampliación de capital – capital increase",
                "Reducción de capital – capital reduction",
                "Cambio de domicilio social – address change",
                "Cambio/ampliación de objeto social – purpose change",
                "Cambio de denominación social – name change",
                "Modificaciones estatutarias – bylaws amendment",
                "Unipersonalidad – sole-shareholder change",
                "Disolución – dissolution",
                "Extinción – company closed",
                "Situación concursal / insolvency",
                "Fusión – merger",
                "Escisión / segregación – demerger",
                "Transformación – legal form change",
                "Sucursal – branch opened/closed",
                "Reactivación – reactivation",
                "Cierre/reapertura hoja registral",
                "Fe de erratas – correction",
                "Otros conceptos – other"
              ]
            }
          },
          "keywords": {
            "title": "Keywords (any of)",
            "type": "array",
            "description": "Accent- and case-insensitive match on company name and the full act text (objeto social, address, officers...), e.g. `software`, `restaurante`, `inmobiliaria`, `CNAE 6201`, `Málaga`.",
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Last N days",
            "minimum": 0,
            "maximum": 366,
            "type": "integer",
            "description": "0 = only the latest BORME issue (yesterday's registrations are published each weekday morning). N = today minus N days to today. Ignored when *From date* is set.",
            "default": 0
          },
          "dateFrom": {
            "title": "From date (publication)",
            "type": "string",
            "description": "YYYY-MM-DD. Overrides *Last N days*. Max 366 days per run."
          },
          "dateTo": {
            "title": "To date (publication)",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "includeSectionA": {
            "title": "Section A – registered acts",
            "type": "boolean",
            "description": "New companies, appointments, resignations, capital, address, dissolutions, mergers... one item per registry entry.",
            "default": true
          },
          "includeSectionC": {
            "title": "Section C – legal notices",
            "type": "boolean",
            "description": "Also return Section C announcements (shareholder meeting calls, mergers, demergers, capital reductions, dissolutions, transformations...), one item per notice with its full text. Not filtered by province or act type; use keywords to narrow them.",
            "default": false
          },
          "includeOfficers": {
            "title": "Include officer names",
            "type": "boolean",
            "description": "Names of appointed/dismissed officers and sole shareholders (personal data under GDPR - use only for a legitimate purpose). Off = roles only and no raw text.",
            "default": true
          },
          "includeRawText": {
            "title": "Include full act text",
            "type": "boolean",
            "description": "Add the original Spanish text of each entry/notice in `text`.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new items (monitoring)",
            "type": "boolean",
            "description": "Skip items returned by earlier runs with the same *State key*. Schedule daily (weekdays ~10:00 Madrid time) for an alert feed.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate 'already seen' lists for different monitors.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many items (0 = no limit). You pay per item saved.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}