{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss Company Events Feed: SHAB New Firms & Bankruptcies",
    "description": "Daily Swiss company events from the official SHAB/FOSC gazette API: new registrations, liquidations, bankruptcies, liquidation creditor calls, moratoriums and deletions. UID, legal form, capital, canton, purpose. Legal entities only. No API key.",
    "version": "0.1",
    "x-build-id": "WkN6TUHoO7VYkekgk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moment-data~swiss-shab-company-events-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moment-data-swiss-shab-company-events-feed",
        "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/moment-data~swiss-shab-company-events-feed/runs": {
      "post": {
        "operationId": "runs-sync-moment-data-swiss-shab-company-events-feed",
        "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/moment-data~swiss-shab-company-events-feed/run-sync": {
      "post": {
        "operationId": "run-sync-moment-data-swiss-shab-company-events-feed",
        "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": {
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "Which SHAB company events to return. Default: everything except companyChange.",
            "items": {
              "type": "string",
              "enum": [
                "newRegistration",
                "liquidation",
                "bankruptcy",
                "liquidationCreditorCall",
                "moratorium",
                "deletion",
                "companyChange"
              ],
              "enumTitles": [
                "New registrations (HR01)",
                "Newly in liquidation (HR02 dissolution)",
                "Bankruptcy notices (KK, all stages)",
                "Liquidation calls to creditors (LS)",
                "Debt-restructuring moratoriums (NA)",
                "Deletions from the register (HR03)",
                "Other company changes: name, seat, capital, purpose (HR02, opt-in)"
              ]
            },
            "default": [
              "newRegistration",
              "liquidation",
              "bankruptcy",
              "liquidationCreditorCall",
              "moratorium",
              "deletion"
            ]
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Publication days to cover, ending on the newest SHAB publication day. 1 = the latest issue (default; 3 in sinceLastRun mode). Ignored when fromDate/toDate are set."
          },
          "fromDate": {
            "title": "From date (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional explicit window start (publication date)."
          },
          "toDate": {
            "title": "To date (YYYY-MM-DD)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional explicit window end (publication date). Max 93-day window."
          },
          "cantons": {
            "title": "Cantons",
            "type": "array",
            "description": "Only these cantons (empty = all of Switzerland).",
            "items": {
              "type": "string",
              "enum": [
                "AG",
                "AI",
                "AR",
                "BE",
                "BL",
                "BS",
                "FR",
                "GE",
                "GL",
                "GR",
                "JU",
                "LU",
                "NE",
                "NW",
                "OW",
                "SG",
                "SH",
                "SO",
                "SZ",
                "TG",
                "TI",
                "UR",
                "VD",
                "VS",
                "ZG",
                "ZH"
              ],
              "enumTitles": [
                "AG - Aargau",
                "AI - Appenzell Innerrhoden",
                "AR - Appenzell Ausserrhoden",
                "BE - Bern",
                "BL - Basel-Landschaft",
                "BS - Basel-Stadt",
                "FR - Fribourg",
                "GE - Geneva",
                "GL - Glarus",
                "GR - Graubünden",
                "JU - Jura",
                "LU - Lucerne",
                "NE - Neuchâtel",
                "NW - Nidwalden",
                "OW - Obwalden",
                "SG - St. Gallen",
                "SH - Schaffhausen",
                "SO - Solothurn",
                "SZ - Schwyz",
                "TG - Thurgau",
                "TI - Ticino",
                "UR - Uri",
                "VD - Vaud",
                "VS - Valais",
                "ZG - Zug",
                "ZH - Zurich"
              ]
            }
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Only these legal forms (empty = all legal entities). Sole proprietorships are never returned.",
            "items": {
              "type": "string",
              "enum": [
                "ag",
                "gmbh",
                "cooperative",
                "association",
                "foundation",
                "foreignBranch",
                "swissBranch",
                "fund",
                "partnership",
                "limitedPartnership",
                "other"
              ],
              "enumTitles": [
                "AG / SA (incl. KmAG)",
                "GmbH / Sàrl / Sagl",
                "Cooperative",
                "Association (Verein)",
                "Foundation (Stiftung)",
                "Branch of a foreign company",
                "Swiss branch",
                "Collective investment (SICAV/SICAF/KmGK)",
                "General partnership (needs includePartnerships)",
                "Limited partnership (needs includePartnerships)",
                "Other / public-law"
              ]
            }
          },
          "keywords": {
            "title": "Keywords (name or purpose)",
            "type": "array",
            "description": "Keep events whose company name or statutory purpose contains any of these words (word-start match, accents ignored), e.g. software, immobilien, restaurant, fiduciaire.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop events whose name or purpose contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "minCapitalChf": {
            "title": "Minimum share capital (CHF)",
            "minimum": 0,
            "type": "integer",
            "description": "Only commercial-register events (new registrations, liquidations, deletions, changes) with at least this nominal capital. Bankruptcy/LS/NA notices carry no capital and are dropped when set."
          },
          "bankruptcyStages": {
            "title": "Bankruptcy stages",
            "type": "array",
            "description": "Only these bankruptcy (KK) stages, e.g. opened + suspendedNoAssets. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "provisionalNotice",
                "opened",
                "suspendedNoAssets",
                "collocationPlan",
                "distributionList",
                "closed",
                "revoked",
                "propertyAuction",
                "encumbranceList",
                "otherNotice",
                "foreignRecognised",
                "foreignWaived"
              ]
            }
          },
          "changeTypes": {
            "title": "Change types (companyChange only)",
            "type": "array",
            "description": "For companyChange events, keep only notices with at least one of these changes.",
            "items": {
              "type": "string",
              "enum": [
                "name",
                "seat",
                "address",
                "purpose",
                "capitalNominal",
                "capitalPaid",
                "legalForm",
                "uid",
                "dissolvedByBankruptcy",
                "bankruptcySuspended",
                "bankruptcyRevoked",
                "liquidationRevoked",
                "reentry",
                "other"
              ]
            }
          },
          "includePartnerships": {
            "title": "Include partnerships (KlG/KmG/SNC)",
            "type": "boolean",
            "description": "Partnerships are often named after their partners, so they are off by default.",
            "default": false
          },
          "includePersonNamedCompanies": {
            "title": "Include companies named only after a person",
            "type": "boolean",
            "description": "By default firms like 'Firstname Lastname GmbH' are skipped as a privacy screen.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum events to return (round-robin across event types). Each returned event is one charged notice-record.",
            "default": 30
          },
          "maxDetailRequests": {
            "title": "Max notice downloads",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "Safety cap on per-notice XML downloads (filters on keywords/legal form/capital need the notice detail).",
            "default": 300
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "stateless",
              "sinceLastRun"
            ],
            "type": "string",
            "description": "sinceLastRun remembers delivered notice ids (60 days) in the named key-value store swiss-shab-company-events-feed-state.",
            "default": "stateless"
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate memory per saved watch/filter set in sinceLastRun mode.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}