# Switzerland Company Scraper - Zefix, Handelsregister & UID (`angaba92/switzerland-zefix-company-scraper`) Actor

Extract official Swiss company register records from Zefix (Central Business Name Index / Handelsregister). Search by company name, Swiss UID (CHE-xxx.xxx.xxx), canton (ZH, ZG, GE, VD, BS), and legal form (AG, GmbH) with address, purpose, CHF capital & SHAB filings.

- **URL**: https://apify.com/angaba92/switzerland-zefix-company-scraper.md
- **Developed by:** [Andres Garcia-Baquero Leon](https://apify.com/angaba92) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.50 / 1,000 swiss company records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Switzerland Company Scraper - Zefix, Handelsregister & UID

Extract official **Swiss company register records** directly from **Zefix (Central Business Name Index / Schweizerisches Handelsregister)** via structured JSON endpoints. Search active Swiss corporations by **company name, prefix wildcard (`Cloud*`, `FinTech*`), or Swiss UID (`CHE-xxx.xxx.xxx`)**, filtered accurately across **all 26 cantons (`ZH`, `ZG`, `GE`, `VD`, `BS`, `BE`, etc.)** and **legal forms (`AG` / `SA`, `GmbH` / `Sàrl` / `Sagl`)**, with full registered address, corporate purpose (`Zweck` / `But`), former names, cantonal excerpt links, and optional **SHAB / FOSC CHF share capital & signatory notices**.

### Why Use This Swiss Zefix & Handelsregister Scraper?

| Capability | Generic Zefix Wrappers | Manual Cantonal Lookups | **Switzerland Company Scraper (Zefix & UID)** |
|---|---|---|---|
| **Exact 26-Canton Filtering (`ZH`, `ZG`, `GE`, `VS`...)** | Often broken (Zefix ignores raw `canton` string) | One canton at a time | **Mapped to official `registryOffices` IDs (incl. 3-office Valais)** |
| **Formatted Swiss UID Lookup (`CHE-103.867.266 MWST`)** | Fails with `HTTP 404` on hyphens/dots | Manual | **Auto-normalized (`CHE103867266`)** |
| **Full Street Address, Purpose & Former Names** | Summary row only | Click per firm | **Included (`withoutShabPub` detail merge)** |
| **SHAB Share Capital (CHF) & Signatory Notices** | No | Manual PDF reading | **Optional `includeShabPublications` (`capitalChf`, `registeredPersonsSummary`)** |
| **Pricing** | $10-$25 / 1,000 + start fee | Hours of manual work | **$0.00 start fee + $0.0075 / company ($7.50 / 1,000)** |

### High-ROI B2B & KYB Workflows

1. **Zug ("Crypto Valley") & Zürich B2B Tech Prospecting:** Query `queries: ["Cloud*", "AI*", "Bio*", "FinTech*"]` across `cantons: ["ZG", "ZH"]` and `legalForms: ["AG", "GmbH"]`, then enrich corporate domains, verified `info@`/`contact@` emails, MX records, and tech stacks with **[Website Email, Contact & Tech Stack Scraper](https://apify.com/angaba92/website-email-contact-tech-stack-scraper)**.
2. **Swiss KYB & Supplier Onboarding (`CHE-...` UID Verification):** Pass vendor UIDs (`["CHE-103.867.266", "CHE-116.281.710"]`) with `includeShabPublications: true` to verify active `EXISTIEREND` status, legal seat, registered street address, auditor (`auditFirms`), CHF capital, and cantonal excerpt URL in seconds.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `queries` | `string[]` | `["Cloud*", "FinTech*"]` | Company names, wildcard prefixes (`*` supported), or Swiss UIDs (`CHE-xxx.xxx.xxx`). |
| `cantons` | `string[]` | `["ZH", "ZG"]` | 2-letter Swiss canton codes (`ZH`, `ZG`, `GE`, `VD`, `BS`, `BE`, `LU`, `TI`, etc.). Empty = all Switzerland. |
| `legalForms` | `string[]` | `["AG", "GmbH"]` | Legal form codes: `AG` (`SA`), `GmbH` (`Sàrl` / `Sagl`), `EIU`, `KlG`, `Gen`, `Verein`, `Stift`, `ZN`. |
| `activeOnly` | `boolean` | `true` | Only emit active (`EXISTIEREND`) legal entities. |
| `excludeSoleProprietors` | `boolean` | `true` | GDPR-friendly corporate default: skips sole proprietorships (`Einzelunternehmen`). |
| `includeDetails` | `boolean` | `true` | Fetch full street address, postal code, corporate purpose, former names & audit firms. |
| `includeShabPublications` | `boolean` | `false` | Parse SHAB / FOSC gazette notices for `capitalChf` and `registeredPersonsSummary`. |
| `concurrency` | `integer` | `5` | Parallel detail requests (`1` to `10`). |
| `maxResults` | `integer` | `20` | Maximum Swiss company records to emit (`1` to `2000`). |

#### Example Input

```json
{
  "queries": ["FinTech*", "Cyber*"],
  "cantons": ["ZH", "ZG", "GE"],
  "legalForms": ["AG", "GmbH"],
  "activeOnly": true,
  "includeDetails": true,
  "includeShabPublications": true,
  "maxResults": 25
}
```

#### Example Output Item

```json
{
  "uid": "CHE199897819",
  "uidFormatted": "CHE-199.897.819",
  "swissVatId": "CHE-199.897.819 MWST",
  "chidFormatted": "CH-020-4058721-9",
  "ehraId": 1278411,
  "companyName": "1Way2Cloud GmbH",
  "translations": [],
  "formerNames": ["EntArchs GmbH"],
  "status": "active",
  "rawStatus": "EXISTIEREND",
  "legalFormId": 4,
  "legalFormCode": "GmbH",
  "legalFormName": "Limited Liability Company (GmbH / Sàrl / Sagl)",
  "canton": "ZH",
  "legalSeat": "Zürich",
  "registerOfficeId": 20,
  "streetAddress": "Bachmannweg 41",
  "postalCode": "8046",
  "city": "Zürich",
  "country": "CH",
  "fullAddress": "Bachmannweg 41, 8046 Zürich",
  "purpose": "Die Gesellschaft bezweckt die Erbringung von Dienstleistungen im Bereich IT-Architektur...",
  "capitalChf": 20000.0,
  "shabLastDate": "2019-11-05",
  "deleteDate": null,
  "shabPublicationCount": 4,
  "latestShabMessage": "EntArchs GmbH, in Zürich, CHE-199.897.819...",
  "registeredPersonsSummary": "Kostic, Nemanja, von Zürich, in Zürich, Gesellschafter und Geschäftsführer, mit Einzelunterschrift",
  "auditFirms": [],
  "branchCount": 0,
  "cantonalExcerptUrl": "https://zh.chregister.ch/cr-portal/auszug/auszug.xhtml?uid=CHE-199.897.819",
  "zefixUrl": "https://www.zefix.ch/en/search/entity/list/firm/1278411",
  "scrapedAt": "2026-11-23T20:30:00+00:00"
}
```

### Pricing (Pay Per Event)

- **Actor start fee:** `$0.00`
- **Per emitted company (`swiss-company`):** `$0.0075` (`$7.50` per 1,000 companies)
- Queries returning `0` matching companies cost **$0.00**.

### European & US Official Corporate Registry Suite

- **[Website Email, Contact & Tech Stack Scraper](https://apify.com/angaba92/website-email-contact-tech-stack-scraper):** Enrich Swiss `.ch` / `.com` company domains with verified corporate emails, DNS MX/DMARC status, and detected tech stacks.
- **[France SIRENE Company Scraper](https://apify.com/angaba92/france-sirene-company-scraper):** Official French INSEE SIREN/SIRET, EUR financials, RGE/Qualiopi & EU VAT registry.
- **[UK Companies House Scraper](https://apify.com/angaba92/uk-companies-house-scraper):** Official British corporate registry, SIC codes, active directors & PSCs.
- **[UK Tenders Scraper - Contracts Finder & Find a Tender](https://apify.com/angaba92/uk-government-tenders-scraper):** Official UK public sector tenders and contract awards.

### Compliance & FAQ

1. **Do I need an API key or Swiss proxies?**
   No. This Actor queries public Zefix JSON endpoints directly without credentials or proxy configuration.
2. **How are personal data & GDPR / Swiss FADP handled?**
   By default, `excludeSoleProprietors: true` and `includeShabPublications: false` restrict output strictly to corporate legal-entity metadata (`AG`, `GmbH`, address, purpose, UID). If you enable `includeShabPublications` for KYB/signatory checks, you are responsible for complying with the Swiss Federal Act on Data Protection (FADP / revDSG) and GDPR where applicable.
3. **Why did a UID with dots/hyphens work here when Zefix search normally returns 404?**
   The Actor automatically normalizes `CHE-103.867.266` or `CHE-103.867.266 MWST` into Zefix's canonical `CHE103867266` format before querying.

# Actor input Schema

## `queries` (type: `array`):

List of company names, prefix wildcards (e.g. 'Cloud\*', 'Crypto\*', 'Bio\*'), or Swiss UIDs ('CHE-103.867.266' or 'CHE103867266').

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

2-letter Swiss canton codes, e.g. \['ZH', 'ZG', 'GE', 'VD', 'BS', 'BE', 'LU', 'TI']. Leave empty for all 26 cantons.

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

Filter by Swiss legal form code: 'AG' (Corporation / SA), 'GmbH' (LLC / Sarl / Sagl), 'EIU' (Sole proprietorship), 'KlG', 'Gen', 'Verein', 'Stift', 'ZN'.

## `activeOnly` (type: `boolean`):

Return only active registered entities (status EXISTIEREND).

## `excludeSoleProprietors` (type: `boolean`):

Skip individual sole proprietorships (Einzelunternehmen / Entreprise individuelle) unless explicitly disabled.

## `includeDetails` (type: `boolean`):

Fetch full registered street address, postal code, corporate purpose (Zweck / But), former names, and cantonal excerpt URL.

## `includeShabPublications` (type: `boolean`):

Also fetch SHAB / FOSC official gazette notices to extract registered CHF share capital and latest signatory/officer notices.

## `concurrency` (type: `integer`):

Parallel HTTP requests when fetching company detail/SHAB records (1 to 10).

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

Maximum number of unique Swiss company records to emit. Each emitted company counts as 1 swiss-company event.

## Actor input object example

```json
{
  "queries": [
    "Cloud*",
    "FinTech*"
  ],
  "cantons": [
    "ZH",
    "ZG"
  ],
  "legalForms": [
    "AG",
    "GmbH"
  ],
  "activeOnly": true,
  "excludeSoleProprietors": true,
  "includeDetails": true,
  "includeShabPublications": false,
  "concurrency": 5,
  "maxResults": 15
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "Cloud*",
        "FinTech*"
    ],
    "cantons": [
        "ZH",
        "ZG"
    ],
    "legalForms": [
        "AG",
        "GmbH"
    ],
    "maxResults": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("angaba92/switzerland-zefix-company-scraper").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 = {
    "queries": [
        "Cloud*",
        "FinTech*",
    ],
    "cantons": [
        "ZH",
        "ZG",
    ],
    "legalForms": [
        "AG",
        "GmbH",
    ],
    "maxResults": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("angaba92/switzerland-zefix-company-scraper").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 '{
  "queries": [
    "Cloud*",
    "FinTech*"
  ],
  "cantons": [
    "ZH",
    "ZG"
  ],
  "legalForms": [
    "AG",
    "GmbH"
  ],
  "maxResults": 15
}' |
apify call angaba92/switzerland-zefix-company-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,angaba92/switzerland-zefix-company-scraper"
        }
    }
}
```

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/pR3bw9TaJVSytDdoV/builds/x8nfIrbpmRMKuBnol/openapi.json
