{
  "openapi": "3.0.1",
  "info": {
    "title": "Spain BORME Company Acts: Spanish Company Register Feed",
    "description": "Spanish company register acts from the official BORME: new companies with object, CNAE, address and capital, board changes (counts only, no personal names), address and capital changes, dissolutions, insolvency. Daily feed, delta, filters, company timeline. $2 per 1,000 acts.",
    "version": "0.1",
    "x-build-id": "9T4cfYAWOI6rNWGnA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cprussin~spain-borme-acts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cprussin-spain-borme-acts",
        "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/cprussin~spain-borme-acts/runs": {
      "post": {
        "operationId": "runs-sync-cprussin-spain-borme-acts",
        "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/cprussin~spain-borme-acts/run-sync": {
      "post": {
        "operationId": "run-sync-cprussin-spain-borme-acts",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "daily",
              "sinceLastRun",
              "company"
            ],
            "type": "string",
            "description": "<b>Daily</b>: every act published in the BORME on the given days (default: the latest BORME). <b>Since last run</b>: only acts published since the previous run with the same state key (schedule it daily for a delta feed). <b>Company</b>: the timeline of the named companies over a date range.",
            "default": "daily"
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "First BORME day (YYYY-MM-DD). Empty: the latest published BORME (daily mode) or the last 7 days (company mode). BORME is published Monday to Friday."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Last BORME day, inclusive. Defaults to today. At most 92 days per run."
          },
          "companyNames": {
            "title": "Company names",
            "type": "array",
            "description": "Company mode: names to follow, e.g. <code>TELEFONICA</code>. Accents, punctuation and legal-form suffixes (SL, SA...) are ignored; matches whole words of the registered or new name.",
            "items": {
              "type": "string"
            }
          },
          "actTypes": {
            "title": "Act types",
            "type": "array",
            "description": "Keep only entries containing at least one of these acts. Empty: all acts.",
            "items": {
              "type": "string",
              "enum": [
                "constitution",
                "appointments",
                "resignations",
                "reelections",
                "revocations",
                "bylawAmendments",
                "addressChange",
                "nameChange",
                "objectChange",
                "capitalIncrease",
                "capitalReduction",
                "dissolution",
                "extinction",
                "soleShareholderDeclaration",
                "soleShareholderLoss",
                "soleShareholderChange",
                "soleShareholderCompany",
                "insolvency",
                "merger",
                "spinOff",
                "transformation",
                "globalTransfer",
                "accountsNotApproved",
                "registryClosure",
                "registryReopening",
                "exOfficioCancellation",
                "website",
                "durationChange",
                "powersModification",
                "reactivation",
                "capitalPayment",
                "bondIssue",
                "branch",
                "adaptation",
                "firstRegistration",
                "uncollectibleCredit",
                "correction",
                "otherConcepts"
              ],
              "enumTitles": [
                "Constitución",
                "Nombramientos",
                "Ceses/Dimisiones",
                "Reelecciones",
                "Revocaciones",
                "Modificaciones estatutarias",
                "Cambio de domicilio social",
                "Cambio de denominación social",
                "Cambio de objeto social",
                "Ampliación de capital",
                "Reducción de capital",
                "Disolución",
                "Extinción",
                "Declaración de unipersonalidad",
                "Pérdida del caracter de unipersonalidad",
                "Cambio de identidad del socio único",
                "Sociedad unipersonal",
                "Situación concursal",
                "Fusión",
                "Escisión",
                "Transformación de sociedad",
                "Cesión global de activo y pasivo",
                "Artículo 378.5 RRM (cuentas no aprobadas)",
                "Cierre provisional hoja registral",
                "Reapertura hoja registral",
                "Cancelaciones de oficio de nombramientos",
                "Página web de la sociedad",
                "Modificación de duración",
                "Modificación de poderes",
                "Reactivación de la sociedad",
                "Desembolso de dividendos pasivos",
                "Emisión de obligaciones",
                "Sucursal",
                "Adaptación",
                "Primera inscripción",
                "Crédito incobrable",
                "Fe de erratas",
                "Otros conceptos"
              ]
            }
          },
          "cnaePrefixes": {
            "title": "CNAE prefixes",
            "type": "array",
            "description": "Keep only entries whose company object mentions a CNAE code starting with one of these, e.g. <code>62</code> (IT services) or <code>6831</code>. Many incorporations state no CNAE code, so this filter is strict.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "Keep only these registry provinces, e.g. <code>MADRID</code>, <code>BARCELONA</code>, <code>VALENCIA</code>. Other provinces are not downloaded.",
            "items": {
              "type": "string"
            }
          },
          "minCapital": {
            "title": "Min capital (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only entries with a share capital (new companies) or resulting capital (capital changes) of at least this many euros."
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Since-last-run mode: name of the saved position. Use a different key for each schedule or filter set.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many act records. Each record is billed once.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}