# Swiss Company Register Zefix & New Registrations Scraper (SHAB) (`clearfeed-labs/swiss-company-register-zefix`) Actor

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.

- **URL**: https://apify.com/clearfeed-labs/swiss-company-register-zefix.md
- **Developed by:** [Clearfeed Labs](https://apify.com/clearfeed-labs) (community)
- **Categories:** Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 company results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Swiss Company Register (Zefix) & New Registrations Scraper (SHAB)

Get **official Swiss company data** from the federal commercial register **Zefix** and the **Swiss Official Gazette of Commerce (SHAB / SOGC / FOSC)**. You don't need an API key, a login, or a Zefix account. Search companies by **name, business purpose, UID, canton, town and legal form**, or **monitor newly founded Swiss companies** (Neueintragungen), changes (Mutationen) and deletions (Löschungen) day by day.

Results are clean, flat rows: company name, UID (CHE-xxx.xxx.xxx), legal form, seat, canton, status, address, purpose, register office, SHAB publication info and a direct Zefix link. Export them to Excel, CSV, JSON or Google Sheets, or connect them to your CRM through the Apify API, Make, Zapier or n8n.

### What can this Swiss company scraper do?

- 🔎 **Company search (Zefix):** find active Swiss companies whose **name** or **purpose (Zweck)** contains a keyword, e.g. "Treuhand", "software" or "photovoltaik".
- 🆔 **UID lookup:** verify many UIDs at once (KYB / KYC, supplier onboarding, invoice checks). Both `CHE-105.829.940` and `CHE105829940` work.
- 🗺️ **Filters:** canton (ZH, BE, GE, ZG …), town, and legal form (AG, GmbH, sole proprietorship, cooperative, association, foundation, branch …).
- 🆕 **New company registrations feed (SHAB HR01):** every company entered in the Swiss commercial register within a date range, with address, purpose, share capital and register office.
- ✏️ **Changes and 🗑️ deletions (HR02 / HR03):** catch address moves, renamings, liquidations and deletions.
- ⏰ **Monitoring:** schedule the Actor daily and get only yesterday's new companies in your canton or industry.

### Use cases

- **B2B lead generation:** newly founded GmbHs and AGs need a bank, accountant (Treuhand), insurance, IT, website, office space and a phone contract. Reach them first.
- **Sales territory lists:** all active companies in a canton or town, filtered by legal form or purpose keyword.
- **KYB / compliance / data enrichment:** validate UIDs and enrich CRM records with the official name, legal form, seat and address.
- **Market research:** count new registrations by canton, legal form or industry over time.
- **Credit and risk monitoring:** watch liquidations and deletions.

### Input

| Field | Description |
|---|---|
| `mode` | `search` (company register, active companies) or `shabPublications` (gazette publications in a date range) |
| `searchTerms` | Names or keywords (case-insensitive "contains"). In SHAB mode, they filter results by name or purpose |
| `searchIn` | `name`, `purpose` or `nameAndPurpose` (search mode) |
| `uids` | List of UIDs to look up (search mode) |
| `cantons` | 2-letter canton codes, e.g. `["ZH","ZG"]` |
| `legalForms` | eCH-0097 codes: `0106` AG, `0107` GmbH, `0101` sole proprietorship, `0108` cooperative, `0109` association, `0110` foundation … |
| `municipality` | Exact town of the company address (search mode) |
| `publicationTypes` | `HR01` new registrations, `HR02` changes, `HR03` deletions (SHAB mode) |
| `registeredSince` / `registeredUntil` | SHAB publication date range, `YYYY-MM-DD` (default: last 7 days, max 366 days) |
| `maxResults` | Maximum companies to return (default 100) |
| `includePurpose` | Include purpose text (default `true`) |
| `includePublicationText` | Add the full SHAB text (default `false`). It may contain names of registered persons |

#### Example: new GmbHs and AGs registered in Zurich and Zug last week

```json
{
  "mode": "shabPublications",
  "publicationTypes": ["HR01"],
  "registeredSince": "2026-10-16",
  "registeredUntil": "2026-10-23",
  "cantons": ["ZH", "ZG"],
  "legalForms": ["0106", "0107"],
  "maxResults": 500
}
```

#### Example: solar companies in canton Bern

```json
{ "mode": "search", "searchTerms": ["photovoltaik", "solar"], "searchIn": "nameAndPurpose", "cantons": ["BE"], "maxResults": 200 }
```

#### Example: UID check

```json
{ "mode": "search", "uids": ["CHE-105.829.940", "CHE-387.320.460"] }
```

### Output

Each result is one company:

```json
{
  "name": "Ownward GmbH",
  "uid": "CHE-387.320.460",
  "chid": "CH27040105481",
  "ehraid": "1773034",
  "legalFormCode": "0107",
  "legalForm": "Limited liability company (GmbH/Sàrl)",
  "seat": "Basel",
  "canton": "BS",
  "status": "ACTIVE",
  "street": "Innere Margarethenstrasse 7",
  "postalCode": "4051",
  "city": "Basel",
  "address": "Innere Margarethenstrasse 7, 4051 Basel",
  "purpose": "Die Gesellschaft bezweckt die Erbringung von Engineering-, Beratungs- und Projektdienstleistungen …",
  "capitalNominalChf": 20000,
  "registerOffice": "Handelsregisteramt des Kantons Basel-Stadt",
  "shabPublicationType": "NEW_REGISTRATION",
  "shabPublicationNumber": "HR01-1006789992",
  "shabPublicationDate": "2026-10-22",
  "shabPublicationUrl": "https://www.shab.ch/#!/search/publications/detail/f06b4045-2709-4f66-b601-b0d80709d9fd",
  "zefixUrl": "https://www.zefix.ch/en/search/entity/list/firm/1773034",
  "source": "Swiss Official Gazette of Commerce (SHAB/SOGC), SECO – shab.ch / amtsblattportal.ch",
  "scrapedAt": "2026-10-24T12:40:00+00:00"
}
```

`status` is `ACTIVE`, `IN_LIQUIDATION` (based on the company name) or `DELETED` (HR03). Register-search rows leave the SHAB fields, `capitalNominalChf` and `registerOffice` empty, because the open register dataset doesn't contain them.

### Data sources and legal notes

- **Zefix open data** from the Federal Commercial Registry Office (EHRA/FCRO), published on [opendata.swiss](https://opendata.swiss/dataset/dataset/zefix-zentraler-firmenindex) through the LINDAS linked-data service. Terms: *"Open use. Must provide the source."* Every row includes a `source` field. Keep it when you redistribute the data.
- **SHAB / SOGC publications** from the open [Official Gazettes Portal API](https://amtsblattportal.ch/docs/api/) (SECO): *"The API is freely accessible for anyone to use."* Only the signed PDF of a publication is legally binding.
- The Actor uses only these official open interfaces. It doesn't scrape websites, bypass logins or use proxies. Requests are rate-limited (default 3 in parallel, with a pause between requests) and retried with backoff.
- Register data has no legal effect (Art. 14 HRegV). Always check critical facts against the official register excerpt.
- Personal data: sole proprietorship names and the optional publication text can identify individuals. You are responsible for using them in line with the Swiss FADP / GDPR, e.g. for unsolicited marketing.

### Limitations

- **Search mode covers active entities only.** The open Zefix dataset doesn't include deleted companies, registration dates, share capital or board members. Use SHAB mode for registration events and deletions.
- Name search is a substring match ("contains"), not fuzzy matching. Results are sorted by Zefix ID, not by relevance.
- Search terms in SHAB mode filter after download, so they don't reduce the number of publications fetched.
- Zefix links for deleted companies fall back to a UID search link.

### FAQ

**Do I need a Zefix API account?** No. Both sources are open and need no credentials.

**How fresh is the data?** The Zefix open data is updated daily, and SHAB publications appear on their publication day.

**Can I get all companies in a canton?** Yes. Set `cantons` with no search term and a high `maxResults`.

**Is scraping Zefix legal?** This Actor doesn't scrape Zefix. It queries the officially published open-data endpoints under their terms of use (see above).

# Actor input Schema

## `mode` (type: `string`):

<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.

## `searchTerms` (type: `array`):

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.

## `searchIn` (type: `string`):

Search mode only. Purpose search lets you find companies by activity, e.g. 'software', 'Treuhand', 'photovoltaik'.

## `uids` (type: `array`):

Swiss company identification numbers, e.g. CHE-105.829.940 or CHE105829940. Search mode only.

## `cantons` (type: `array`):

Limit results to these cantons (2-letter codes). Leave empty for all of Switzerland.

## `legalForms` (type: `array`):

Limit results to these legal forms.

## `municipality` (type: `string`):

Search mode only. Exact town name of the company address, e.g. 'Zürich', 'Genève', 'Zug'.

## `publicationTypes` (type: `array`):

SHAB mode only.

## `registeredSince` (type: `string`):

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` (type: `string`):

SHAB mode only. Last publication date to include. Default: today. Max range 366 days.

## `maxResults` (type: `integer`):

Maximum number of companies to return.

## `includePurpose` (type: `boolean`):

Include the registered business purpose text.

## `includePublicationText` (type: `boolean`):

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).

## `enrichWithZefix` (type: `boolean`):

Looks up each published company in Zefix open data to add its EHRA ID and a direct Zefix link.

## `language` (type: `string`):

Language of the human-readable legal form.

## `maxConcurrency` (type: `integer`):

Parallel requests to the public APIs. Kept low on purpose to be polite to government servers.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "Bieri"
  ],
  "searchIn": "name",
  "publicationTypes": [
    "HR01"
  ],
  "maxResults": 100,
  "includePurpose": true,
  "includePublicationText": false,
  "enrichWithZefix": true,
  "language": "en",
  "maxConcurrency": 3
}
```

# Actor output Schema

## `companies` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "Bieri"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearfeed-labs/swiss-company-register-zefix").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searchTerms": ["Bieri"] }

# Run the Actor and wait for it to finish
run = client.actor("clearfeed-labs/swiss-company-register-zefix").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "Bieri"
  ]
}' |
apify call clearfeed-labs/swiss-company-register-zefix --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearfeed-labs/swiss-company-register-zefix"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ucazmvblAt127fJKP/builds/toxTFzInAhWej0YKo/openapi.json
