{
  "openapi": "3.0.1",
  "info": {
    "title": "Swiss Company Register Zefix & New Registrations Scraper (SHAB)",
    "description": "Official Swiss company data without an API key: search Zefix by name, purpose, UID, canton and legal form, or get daily new company registrations, changes and deletions from SHAB. Clean rows with UID, address, purpose and register office.",
    "version": "0.1",
    "x-build-id": "toxTFzInAhWej0YKo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clearfeed-labs~swiss-company-register-zefix/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clearfeed-labs-swiss-company-register-zefix",
        "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/clearfeed-labs~swiss-company-register-zefix/runs": {
      "post": {
        "operationId": "runs-sync-clearfeed-labs-swiss-company-register-zefix",
        "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/clearfeed-labs~swiss-company-register-zefix/run-sync": {
      "post": {
        "operationId": "run-sync-clearfeed-labs-swiss-company-register-zefix",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "shabPublications"
            ],
            "type": "string",
            "description": "<b>search</b>: look up active companies in Zefix by name, keyword, UID, canton or legal form. <b>shabPublications</b>: list commercial-register publications from the Swiss Official Gazette of Commerce (SHAB/SOGC) for a date range – ideal for monitoring newly founded companies.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Company name / keywords",
            "type": "array",
            "description": "Case-insensitive 'contains' match on the company name (or purpose, see below). Each term runs as a separate search. In SHAB mode, terms filter publications by name or purpose.",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "name",
              "purpose",
              "nameAndPurpose"
            ],
            "type": "string",
            "description": "Search mode only. Purpose search lets you find companies by activity, e.g. 'software', 'Treuhand', 'photovoltaik'.",
            "default": "name"
          },
          "uids": {
            "title": "UIDs (company IDs)",
            "type": "array",
            "description": "Swiss company identification numbers, e.g. CHE-105.829.940 or CHE105829940. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "cantons": {
            "title": "Cantons",
            "type": "array",
            "description": "Limit results to these cantons (2-letter codes). Leave empty for 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"
              ]
            }
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Limit results to these legal forms.",
            "items": {
              "type": "string",
              "enum": [
                "0101",
                "0103",
                "0104",
                "0105",
                "0106",
                "0107",
                "0108",
                "0109",
                "0110",
                "0111",
                "0113",
                "0114",
                "0115",
                "0116",
                "0117",
                "0151"
              ],
              "enumTitles": [
                "Sole proprietorship (Einzelunternehmen)",
                "General partnership (Kollektivgesellschaft)",
                "Limited partnership (Kommanditgesellschaft)",
                "Partnership limited by shares",
                "Corporation – AG / SA",
                "Limited liability company – GmbH / Sàrl",
                "Cooperative (Genossenschaft)",
                "Association (Verein)",
                "Foundation (Stiftung)",
                "Branch of a foreign company",
                "Special legal form",
                "Limited partnership for collective investment",
                "SICAV",
                "SICAF",
                "Public-law institution",
                "Swiss branch (Zweigniederlassung)"
              ]
            }
          },
          "municipality": {
            "title": "Town / locality",
            "type": "string",
            "description": "Search mode only. Exact town name of the company address, e.g. 'Zürich', 'Genève', 'Zug'."
          },
          "publicationTypes": {
            "title": "SHAB publication types",
            "type": "array",
            "description": "SHAB mode only.",
            "items": {
              "type": "string",
              "enum": [
                "HR01",
                "HR02",
                "HR03"
              ],
              "enumTitles": [
                "New registrations (HR01)",
                "Changes / mutations (HR02)",
                "Deletions (HR03)"
              ]
            },
            "default": [
              "HR01"
            ]
          },
          "registeredSince": {
            "title": "Published since (YYYY-MM-DD)",
            "type": "string",
            "description": "SHAB mode only. First SHAB publication date to include. Default: 7 days ago. Use this to monitor new registrations, e.g. schedule daily with 'yesterday'."
          },
          "registeredUntil": {
            "title": "Published until (YYYY-MM-DD)",
            "type": "string",
            "description": "SHAB mode only. Last publication date to include. Default: today. Max range 366 days."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of companies to return.",
            "default": 100
          },
          "includePurpose": {
            "title": "Include purpose (Zweck)",
            "type": "boolean",
            "description": "Include the registered business purpose text.",
            "default": true
          },
          "includePublicationText": {
            "title": "Include full SHAB publication text",
            "type": "boolean",
            "description": "SHAB mode only. Adds the full publication text, which can contain names of registered persons (personal data – make sure your use complies with the Swiss FADP / GDPR).",
            "default": false
          },
          "enrichWithZefix": {
            "title": "Add Zefix ID & link (SHAB mode)",
            "type": "boolean",
            "description": "Looks up each published company in Zefix open data to add its EHRA ID and a direct Zefix link.",
            "default": true
          },
          "language": {
            "title": "Legal form labels",
            "enum": [
              "en",
              "de"
            ],
            "type": "string",
            "description": "Language of the human-readable legal form.",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel requests to the public APIs. Kept low on purpose to be polite to government servers.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}