# Zefix Company & Director Scraper (`dariomory/zefix-company-director-scraper`) Actor

Search the official Swiss company registry and extract CHE UIDs, legal details, addresses, SHAB notices, relationships, and management changes.

- **URL**: https://apify.com/dariomory/zefix-company-director-scraper.md
- **Developed by:** [Dario Mory](https://apify.com/dariomory) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Zefix Company & Director Scraper

Search Switzerland's official Zefix company index by company name, CHE UID, or direct EHRAID. Export registry status, legal form, address, business purpose, SHAB publications, audit firms, branches, company relationships, and official management-change notices.

The Actor uses the structured REST endpoint used by the public Zefix website. It needs no browser, proxy, or Zefix API credentials.

Mobile proxies are intentionally not used for Zefix. The public structured endpoint works directly, and routing it through a paid mobile network would add cost and latency without improving the normal extraction path. If the endpoint's behavior changes in the future, proxy failover should be added only after production evidence shows it is needed.

### What can you extract?

- Company name, translations, and former names
- CHE UID, CHID, EHRAID, and registry status
- Legal form in English, German, French, or Italian
- Registered address and legal seat
- Business purpose
- Latest and historical SHAB/FOSC publications
- Official management and governing-body change notices
- Audit firms, branches, main offices, mergers, and takeovers
- Cantonal registry excerpt and canonical Zefix links

### Director data: an important distinction

Zefix does not expose a complete current director roster as a structured field. It publishes multilingual SHAB notices describing appointments, resignations, signing authority, and governing-body changes. This Actor returns those notices in `managementChanges` with their dates and source text. It does not guess a current director list from historical notices.

### Input

```json
{
  "searchTerms": ["Nestle"],
  "uids": ["CHE-107.028.276"],
  "searchType": "contains",
  "language": "en",
  "activeOnly": true,
  "includeDetails": true,
  "includeShab": true,
  "shabLimit": 20,
  "maxItems": 25
}
```

- `searchTerms` searches company names.
- `uids` performs exact CHE UID searches.
- `ehraids` fetches known Zefix entity IDs directly.
- `cantons` optionally filters searches using two-letter canton codes.
- `includeDetails` adds the complete entity record.
- `shabLimit` controls returned publication history per company.

### Output

```json
{
  "companyName": "Fondation Nestlé pour l'étude des problèmes de l'alimentation dans le monde",
  "translatedNames": ["Nestlé Foundation for the study of the problems of nutrition in the world"],
  "ehraid": 284234,
  "uid": "CHE107028276",
  "uidFormatted": "CHE-107.028.276",
  "legalForm": "Foundation",
  "status": "EXISTIEREND",
  "isActive": true,
  "legalSeat": "Lausanne",
  "address": {
    "street": "Avenue de Rosemont",
    "houseNumber": "5",
    "postalCode": "1006",
    "town": "Lausanne",
    "country": "CH"
  },
  "purpose": "Company purpose from the registry",
  "latestShabDate": "2025-06-25",
  "managementChanges": [
    {
      "date": "2024-12-06",
      "mutationTypes": ["aenderungorgane"],
      "message": "Official publication text describing a management change."
    }
  ],
  "cantonalExcerptUrl": "https://prestations.vd.ch/...",
  "zefixUrl": "https://www.zefix.ch/en/search/entity/list/firm/284234",
  "source": "Zefix public website REST API",
  "scrapedAt": "2026-07-29T12:00:00.000Z"
}
```

### Pay-per-event pricing

Configure these events in Apify Console:

| Event name | Title | Description | Recommended price |
| --- | --- | --- | --- |
| `company-result` | Company result | One structured Zefix company registry record saved to the dataset. | `$0.001` |

Keep `apify-actor-start` at `$0.00005`. Remove `apify-default-dataset-item` to avoid charging twice for the same record.

### API

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("dariomory/zefix-company-director-scraper").call(run_input={
    "searchTerms": ["Nestle"],
    "maxItems": 10,
    "includeDetails": True,
})

print(run["defaultDatasetId"])
```

### Limits

- Zefix search pages return at most 30 records per API request; the Actor paginates automatically.
- Registry publication text can be German, French, Italian, or Romansh depending on the canton.
- `activeOnly` excludes deleted entities after retrieval.
- Be considerate when requesting large datasets from this public government service.

This Actor is independent and is not affiliated with or endorsed by Zefix or the Swiss federal commercial-register authorities.

# Actor input Schema

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

Company names or partial names to search in Zefix.

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

Swiss enterprise identifiers such as CHE-107.028.276.

## `ehraids` (type: `array`):

Direct numeric Zefix entity IDs for the fastest detail lookup.

## `searchType` (type: `string`):

Contains is the best default. Phonetic finds similar spellings. Exact requires a complete name or UID.

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

Language used for legal-form names, Zefix links, and registry search responses.

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

Optional two-letter canton filters, such as ZH, VD, GE, or ZG.

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

Exclude deleted or dissolved registry entities.

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

Add purpose, address, SHAB notices, audit firms, branches, and company relationships.

## `includeShab` (type: `boolean`):

Return cleaned Swiss Official Gazette publication text.

## `shabLimit` (type: `integer`):

Maximum number of recent SHAB publications and management-change notices returned for each company.

## `maxItems` (type: `integer`):

Maximum number of unique company records to save across all searches.

## Actor input object example

```json
{
  "searchTerms": [
    "Nestle"
  ],
  "searchType": "contains",
  "language": "en",
  "activeOnly": true,
  "includeDetails": true,
  "includeShab": true,
  "shabLimit": 20,
  "maxItems": 100
}
```

# 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 = {
    "searchTerms": [
        "Nestle"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dariomory/zefix-company-director-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 = { "searchTerms": ["Nestle"] }

# Run the Actor and wait for it to finish
run = client.actor("dariomory/zefix-company-director-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "Nestle"
  ]
}' |
apify call dariomory/zefix-company-director-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dariomory/zefix-company-director-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/q5Z7ujPJIhVTAVaIb/builds/25UN9adY921WebHhZ/openapi.json
