{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss Commercial Register Scraper — Companies & Bankruptcies",
    "description": "Swiss company register events from the Official Gazette of Commerce (SHAB/FOSC): new company registrations, changes, deletions, bankruptcies and insolvency filings with name, UID, seat, legal form, purpose and capital. The daily event feed that Zefix snapshots do not give you.",
    "version": "0.1",
    "x-build-id": "3x0WYdKbc7dP2kXSL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/publicdata~shab-swiss-company-gazette/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-publicdata-shab-swiss-company-gazette",
        "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/publicdata~shab-swiss-company-gazette/runs": {
      "post": {
        "operationId": "runs-sync-publicdata-shab-swiss-company-gazette",
        "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/publicdata~shab-swiss-company-gazette/run-sync": {
      "post": {
        "operationId": "run-sync-publicdata-shab-swiss-company-gazette",
        "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": {
          "subRubrics": {
            "title": "Publication types (sub-rubrics)",
            "type": "array",
            "description": "Publication types to fetch, as sub-codes. Leave BOTH this and 'rubrics' empty to get the commercial-register default (HR01 new registrations, HR02 changes, HR03 deletions) - the same three codes this field is pre-filled with. Other business rubrics: KK bankruptcies, LS liquidation calls to creditors, NA composition proceedings, SR corporate-law calls, UP notices to shareholders, FM financial market, AB working-time permits, EK precious-metal marks. This filter and 'rubrics' are combined with OR by the API, so clear this list if you want whole rubrics only. THIS SELECTOR IS A CURATED SUBSET, NOT THE FULL CODE LIST: counted code by code against the live API on 2026-08-21, these nine rubrics hold 66 sub-rubric codes that carry publications and 37 of them are offered here. The 29 live codes you cannot tick include EK50 (13,615 publications archive-wide), AB04 (1,846), EK20 (954), EK30 (767), NA04 (765), NA11 (606), NA06 (543), KK08 (472), KK09 (133), KK11 (119), AB20 (114) and UP06 (97) - to include them, ask for the whole rubric in the 'rubrics' field (rubrics=[\"EK\"] covers EK50) instead of ticking boxes here. UP05 and FM08 are not offered because they had 0 publications archive-wide on 2026-08-21. Rare-but-real codes are kept - SR03 has 1 publication archive-wide, UP01 has 6, KK05 has 30.",
            "items": {
              "type": "string",
              "enum": [
                "HR01",
                "HR02",
                "HR03",
                "KK01",
                "KK02",
                "KK03",
                "KK04",
                "KK05",
                "KK06",
                "KK07",
                "KK10",
                "LS01",
                "LS02",
                "LS03",
                "LS04",
                "LS05",
                "NA01",
                "NA02",
                "NA03",
                "NA05",
                "NA07",
                "SR01",
                "SR02",
                "SR03",
                "SR04",
                "SR05",
                "UP01",
                "UP02",
                "UP04",
                "FM01",
                "FM02",
                "FM10",
                "FM12",
                "AB01",
                "AB02",
                "EK10",
                "EK40"
              ],
              "enumTitles": [
                "HR01 New registration",
                "HR02 Change (mutation)",
                "HR03 Deletion",
                "KK01 Preliminary bankruptcy notice",
                "KK02 Bankruptcy publication / call to creditors",
                "KK03 Suspension of bankruptcy proceedings",
                "KK04 Schedule of claims & inventory",
                "KK05 Distribution list & final account",
                "KK06 Closure of bankruptcy proceedings",
                "KK07 Revocation of bankruptcy",
                "KK10 Other bankruptcy notice",
                "LS01 Liquidation call — AG/SA",
                "LS02 Liquidation call — GmbH/Sagl",
                "LS03 Liquidation call — cooperative",
                "LS04 Liquidation call — association",
                "LS05 Liquidation call — foundation",
                "NA01 Provisional moratorium",
                "NA02 Definitive moratorium",
                "NA03 Call to creditors in composition",
                "NA05 Bankruptcy in composition proceedings",
                "NA07 Confirmation of composition agreement",
                "SR01 Call to creditors — merger",
                "SR02 Call to creditors — demerger",
                "SR03 Call to creditors — AG→GmbH conversion",
                "SR04 Call to creditors — seat moved abroad",
                "SR05 Call to creditors — capital reduction",
                "UP01 Capital increase",
                "UP02 Bond, dividend, distribution",
                "UP04 Invitation to general meeting",
                "FM01 Notice to holders of collective investments",
                "FM02 Balance sheet",
                "FM10 FINMA bankruptcy",
                "FM12 Other financial-market notice",
                "AB01 Working-time permit application",
                "AB02 Working-time permit granted",
                "EK10 Precious-metal mark registration",
                "EK40 Precious-metal mark deletion"
              ]
            }
          },
          "rubrics": {
            "title": "Whole rubrics (alternative to sub-rubrics)",
            "type": "array",
            "description": "Whole rubric codes such as HR, KK, LS, NA, SR, UP, FM, AB, EK, AW, AZ, ES. Combined with 'subRubrics' using OR (setting rubrics=[\"KK\"] while subRubrics still holds HR01 returns both), so clear 'subRubrics' to get these rubrics alone. Use this field to reach sub-rubric codes the 'subRubrics' selector does not offer.",
            "items": {
              "type": "string"
            }
          },
          "cantons": {
            "title": "Cantons",
            "type": "array",
            "description": "Two-letter canton codes (TI, ZH, GE, ...). Empty = all of Switzerland. The gazette matches every cantonal edition a publication is distributed to, so a bankruptcy published in both the Grisons and the Ticino gazette matches TI while its 'cantons' output field reads [\"GR\"]; the 'distributionCantons' output field shows the full set that was matched.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword (full text)",
            "type": "string",
            "description": "Optional full-text keyword, e.g. a company name, a town, a UID (CHE-123.456.789) or an industry word."
          },
          "publishedFrom": {
            "title": "Published from (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Default: 7 days ago. Must be a real calendar date; an impossible one (2026-13-45, 2026-02-30) fails the run with a message instead of silently widening or shifting the window."
          },
          "publishedUntil": {
            "title": "Published until (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Default: today. Must be a real calendar date, and not earlier than 'publishedFrom'."
          },
          "language": {
            "title": "Preferred language for titles",
            "enum": [
              "de",
              "fr",
              "it",
              "en"
            ],
            "type": "string",
            "description": "Titles are multilingual; the publication text itself is in the publication's original language.",
            "default": "de"
          },
          "includeContent": {
            "title": "Fetch structured content per publication",
            "type": "boolean",
            "description": "Fetch the official XML of each publication (one extra request per publication, ~5/s). For commercial-register publications (HR) this adds the full publication text and structured company data: name, UID, seat, legal form, address, purpose, capital, change flags, deletion date. Every other rubric has its own XML schema and no publication text; its payload is exported under 'contentFields' (for example a bankruptcy's debtor company, resolution date and filing deadline, or a general meeting's date, place and agenda). Where the debtor is a private individual, the structured person block (given/family name, date of birth, home address) is replaced by 'personalDataOmitted': true - but the gazette also prints that person's name in the publication title, and sometimes an address in a free-text field, and those are exported verbatim as published. This Actor does not redact the official text.",
            "default": true
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on exported publications (0 = no cap from this Actor). Publication days are searched newest-first, so a cap keeps the most recent publications and drops the older part of your date window. Measured on 2026-08-21 over the default 7-day window (2026-08-14..21): the HR default matched 6,406 publications nationwide, 1,310 for canton ZH alone and 243 for canton TI, and a run with maxItems=0 exported 6,406 / 1,310 / 243 - the complete window. Set 0, or raise the cap above the volume of your window, if a run must cover the window completely. One upstream limit is out of this Actor's hands: the gazette refuses search offsets beyond 10,000 rows, so a single publication day with more than ~9,000 matches cannot be read in full; the run then ends with an INCOMPLETE status message instead of failing. The busiest day in the 120 days to 2026-08-21 carried 3,046 publications across all rubrics.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}