# Switzerland Zefix Scraper - Companies, Auditors, SHAB Events (`jungle_synthesizer/switzerland-zefix-shab-moneyhouse-scraper`) Actor

Scrape the Swiss Federal Registry of Commerce (Zefix) for companies: UID, legal name, form, seat, purpose, address, auditors, branches, and full SHAB legal-events feed. Search by name, UID, or canton. KYC/KYB for banks, family offices, crypto, traders.

- **URL**: https://apify.com/jungle\_synthesizer/switzerland-zefix-shab-moneyhouse-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Switzerland Zefix Scraper - Companies, Auditors, SHAB Events

Scrape the Swiss Federal Registry of Commerce ([Zefix](https://www.zefix.ch)) for company records: UID, legal form, registered seat, business purpose, address, audit firm, branch offices, and the full SHAB legal-events feed. Search by company name, single UID, or canton — covers every legally registered entity in all 26 Swiss cantons.

---

### Switzerland Zefix Scraper Features

- Searches Zefix by company name, exact UID (CHE-XXX.XXX.XXX), or canton.
- Returns the canonical legal name, all language translations, and historical names — Switzerland is a four-language country, and the registry takes that seriously.
- Pulls the full address, registered seat (Sitz), legal form, and cantonal registry-office link straight from the official source.
- Embeds the company's SHAB (Schweizerisches Handelsamtsblatt) publication history — every board change, capital increase, merger, and liquidation event with a configurable lookback window.
- Flags `has_recent_change` for any entity with a SHAB event in the last 365 days. Useful if you're running KYC alerting and care more about the diff than the snapshot.
- Lists audit firms (Revisionsstelle), branch offices, and merger relationships so you can map a corporate group without hitting another data source.
- Pure JSON API. No browser, no proxy, no captcha.

---

### Who Uses Swiss Zefix Data?

- **Banks and family offices** — Run KYB on Swiss counterparties before opening accounts. The address, legal form, and audit-firm fields cover most onboarding checks.
- **Fintechs and crypto firms in Zug** — Verify counterparty registration and pull the SHAB feed to catch board changes that move signing authority.
- **Commodity traders (Geneva, Zug, Lugano)** — Pre-fill compliance files for trading partners with structured registry data instead of PDF excerpts.
- **AML and sanctions screening** — Combine `legal_name`, `translated_names`, and `old_names` with watchlist matching so a name change doesn't break the screen.
- **DACH-region prospecting** — Pair with a Bundesanzeiger crawler to cover Germany + Switzerland in one workflow.
- **Researchers and journalists** — Map Swiss corporate ownership chains by walking branch offices and merger relationships.

---

### How Switzerland Zefix Scraper Works

1. Pick a mode. `by_name` for keyword search, `by_uid` for a direct lookup, or `by_canton` to walk every active company in a canton.
2. The scraper warms a session with Zefix and runs the search. For multi-result modes it pages through the registry until it has enough candidates.
3. Each candidate gets a single detail fetch that returns the company record plus its embedded SHAB feed. Address, audit firms, branch offices, and merger relationships flatten into the schema.
4. Records stream into the Apify dataset. Stop the run any time — what's already saved is yours.

---

### Input

```json
{
  "mode": "by_name",
  "query": "Nestle",
  "canton": "",
  "activeOnly": true,
  "includeShab": true,
  "shabLookbackYears": 3,
  "maxItems": 10
}
````

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | string | `"by_name"` | `by_name` searches the Zefix name index, `by_uid` fetches one company by its CHE UID, `by_canton` walks active companies in a canton. |
| `query` | string | `"Nestle"` | Search term for `by_name` (e.g. `Glencore`). For `by_uid`, paste a UID like `CHE-105.909.036` or `CHE105909036`. Ignored for `by_canton`. |
| `canton` | string | `""` | Two-letter Swiss canton code. For `by_name` it is an optional filter. For `by_canton` it drives the lookup. |
| `activeOnly` | boolean | `true` | Drops companies marked deleted or in liquidation. |
| `includeShab` | boolean | `true` | Embeds the SHAB legal-events feed. Set false for lighter records. |
| `shabLookbackYears` | integer | `3` | Lookback window for SHAB publications. `0` keeps all history (capped at 25 years). |
| `maxItems` | integer | `10` | Maximum records to save. Apify's tester has a 5-min hard timeout — keep this at 15 or below for tester runs. |

#### Single UID lookup

```json
{
  "mode": "by_uid",
  "query": "CHE-105.909.036",
  "includeShab": true,
  "maxItems": 1
}
```

#### Walk every active company in canton Zug

```json
{
  "mode": "by_canton",
  "canton": "ZG",
  "activeOnly": true,
  "includeShab": false,
  "maxItems": 1000
}
```

#### Find Vaud-based companies matching a name

```json
{
  "mode": "by_name",
  "query": "Holding",
  "canton": "VD",
  "activeOnly": true,
  "maxItems": 200
}
```

***

### Switzerland Zefix Scraper Output Fields

```json
{
  "uid": "CHE105909036",
  "uid_formatted": "CHE-105.909.036",
  "chid": "CH55000672935",
  "chid_formatted": "CH-550-0067293-5",
  "ehraid": 126288,
  "legal_name": "Nestlé S.A.",
  "translated_names": ["Nestlé AG", "Nestlé Ltd."],
  "old_names": [],
  "legal_form_id": 3,
  "legal_form": "Ltd",
  "legal_form_name": "Corporation",
  "status": "EXISTIEREND",
  "is_active": true,
  "delete_date": "",
  "shab_date": "2026-04-21",
  "legal_seat": "Vevey",
  "legal_seat_id": 5890,
  "register_office_id": 550,
  "canton": "VD",
  "cantonal_excerpt_url": "https://prestations.vd.ch/pub/101266/extract?lang=FR&companyOfsUid=CHE-105.909.036",
  "address_organisation": "Nestlé S.A.",
  "address_street": "Avenue Nestlé",
  "address_house_number": "55",
  "address_zip": "1800",
  "address_town": "Vevey",
  "address_country": "CH",
  "purpose": "La participation à des entreprises industrielles, de services, commerciales et financières en Suisse et à l'étranger…",
  "audit_firms": ["Ernst & Young SA (CHE-294.400.879)"],
  "main_offices": [],
  "branch_offices": [],
  "taken_over_by": "",
  "taken_over": [],
  "shab_publications": [
    "2026-04-21 — VD — Nestlé S.A., à Vevey + Cham, CHE-105.909.036 (FOSC du 02.03.2026, p. 0/1006583861). Freixe Laurent, inscrit sans signature, n'est plus administrateur…"
  ],
  "shab_publication_count": 12,
  "has_recent_change": true,
  "zefix_url": "https://www.zefix.ch/de/search/entity/list/firm/CHE-105.909.036",
  "scraped_at": "2026-04-30T10:06:00.000Z"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `uid` | string | Swiss Unique Enterprise Identifier without separators (e.g. `CHE105909036`). |
| `uid_formatted` | string | UID in canonical display format `CHE-XXX.XXX.XXX`. |
| `chid` | string | Legacy Swiss commercial-register ID without separators. |
| `chid_formatted` | string | Legacy CHID in display format `CH-XXX-XXXXXXX-X`. |
| `ehraid` | number | Internal Zefix entity ID. Stable per company; usable to refetch. |
| `legal_name` | string | Canonical legal name as registered (one of DE/FR/IT/RM depending on canton). |
| `translated_names` | string\[] | Other-language translations of the legal name. |
| `old_names` | string\[] | Historical legal names this company has used. |
| `legal_form_id` | number | Numeric legal-form code (1=SP, 3=Corporation/AG, 4=GmbH, 5=Cooperative, 6=Association, 7=Foundation, etc.). |
| `legal_form` | string | Legal-form short code in English. |
| `legal_form_name` | string | Legal-form full English name. |
| `status` | string | Registry status (`EXISTIEREND`, `GELOESCHT`, `IN_AUFLOESUNG`). |
| `is_active` | boolean | True when status is `EXISTIEREND`. |
| `delete_date` | string | Date the company was struck from the register. |
| `shab_date` | string | Date of the most recent SHAB publication. |
| `legal_seat` | string | Town/municipality of the registered seat. |
| `legal_seat_id` | number | Internal Zefix municipality ID. |
| `register_office_id` | number | Cantonal registry-office ID. |
| `canton` | string | Two-letter Swiss canton code derived from `register_office_id`. |
| `cantonal_excerpt_url` | string | Direct URL to the cantonal commercial-register excerpt (the official PDF source). |
| `address_organisation` | string | Organisation name on the registered address line. |
| `address_care_of` | string | c/o line on the registered address. |
| `address_street` | string | Street name. |
| `address_house_number` | string | Street number. |
| `address_addon` | string | Address line 2 / addon. |
| `address_po_box` | string | Post-office box. |
| `address_zip` | string | Swiss four-digit postal code. |
| `address_town` | string | Town/city of the registered address. |
| `address_country` | string | Country code (`CH` for Swiss-domiciled). |
| `purpose` | string | Business purpose / Zweck text as registered (in registration language). |
| `audit_firms` | string\[] | Audit firms (Revisionsstelle), formatted as `NAME (CHE-XXX.XXX.XXX)`. |
| `main_offices` | string\[] | Main / head office linkage. Empty for top-level companies. |
| `branch_offices` | string\[] | Branch offices (Zweigniederlassungen) with town. |
| `taken_over_by` | string | Successor entity that absorbed this company after a merger. |
| `taken_over` | string\[] | Predecessor entities this company absorbed. |
| `shab_publications` | string\[] | SHAB legal events, newest-first, formatted as `YYYY-MM-DD — CANTON — message`. Honours `shabLookbackYears`. |
| `shab_publication_count` | number | Number of SHAB publications kept after the lookback filter. |
| `has_recent_change` | boolean | True if any SHAB publication in the last 365 days. |
| `zefix_url` | string | Direct link to the company's record on zefix.ch. |
| `scraped_at` | string | ISO 8601 timestamp of when this record was fetched. |

***

### FAQ

#### How do I scrape Swiss company data from Zefix?

Switzerland Zefix Scraper handles the lookup for you. Pick `by_name`, `by_uid`, or `by_canton`, supply the query, and the actor returns flat JSON records — no PDF parsing, no language detection in your pipeline, no per-canton excerpt downloads.

#### What data can I get from Zefix?

Switzerland Zefix Scraper returns 35+ fields per company: UID, legal form, registered seat, full address, business purpose, audit firm, branch offices, merger relationships, every language translation of the legal name, and the SHAB legal-events feed with configurable lookback.

#### How much does Switzerland Zefix Scraper cost to run?

Switzerland Zefix Scraper uses Apify's pay-per-event pricing: $0.10 per actor start plus $0.001 per record. A 1,000-company run lands at roughly $1.10. The Zefix API itself is free Swiss open-government data — there are no third-party fees behind that price.

#### Can I filter by canton?

Switzerland Zefix Scraper supports canton in two ways. Set `mode: "by_canton"` with a two-letter code (`ZH`, `BE`, `GE`, `VD`, `ZG`, `BS`…) to walk every active company registered in that canton. For name-based searches, set `canton` as an additional filter to keep only matches whose registered seat is in that canton.

#### Does Switzerland Zefix Scraper need proxies?

Switzerland Zefix Scraper does not need proxies. Zefix is Swiss federal open data and the actor hits it at a polite cadence with a valid session cookie. There are no captchas, no Cloudflare layer, and no rate-limit pushback in normal use.

#### Does the actor return officers and directors?

Not as structured fields. Switzerland's federal registry does not publish the board roster as a separate data column — director changes appear inside SHAB publication messages. Those messages are returned in `shab_publications` with HTML stripped and prose cleaned. Parsing names out of multilingual SHAB text is left to the caller.

***

### Need More Features?

Need beneficial-ownership data, structured officer extraction from SHAB messages, or a different Swiss source? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use Switzerland Zefix Scraper?

- **First on Apify** — There is no other dedicated Zefix actor. Switzerland is a top-tier KYC/AML jurisdiction and the registry has been free for years; the gap was just engineering.
- **Clean output** — 35+ flat fields per company, language-translated names rolled up, SHAB events as readable strings instead of HTML soup. The JSON is ready to ship to a CRM, a screening engine, or a Snowflake warehouse without a cleanup pass.
- **Affordable** — ~$0.001 per record on Apify's standard PPE profile. A full DACH KYC pull pairs cleanly with a Bundesanzeiger crawler for the German side.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

Please describe how you plan to use the data extracted by this crawler.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

Provide your email address so we can get in touch with you.

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

How to look up companies. by\_name searches the registry name index (default), by\_uid fetches one company by its CHE UID, by\_canton lists active companies in a canton (paginated by name).

## `query` (type: `string`):

Search term for mode=by\_name (e.g. 'Nestle', 'Glencore'). For mode=by\_uid, paste the UID like CHE-105.909.036 or CHE105909036. Ignored for mode=by\_canton.

## `canton` (type: `string`):

Canton filter. For mode=by\_name this is an OPTIONAL filter applied to results. For mode=by\_canton this drives the lookup.

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

If true, exclude companies with status DELETED or LIQUIDATION. Defaults to true.

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

If true (default), each output record carries the SHAB legal-events feed (incorporation, board changes, mergers, liquidation). Set false to keep payloads small when you only need core registry data.

## `shabLookbackYears` (type: `integer`):

When includeShab is true, only keep SHAB publications newer than N years. 0 = keep all history. Capped at 25.

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

Maximum number of company records to scrape. Apify's tester has a 5-minute hard timeout — keep this at 15 or below for the default tester run.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "by_name",
  "query": "Nestle",
  "canton": "",
  "activeOnly": true,
  "includeShab": true,
  "shabLookbackYears": 3,
  "maxItems": 10
}
```

# 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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "by_name",
    "query": "Nestle",
    "canton": "",
    "activeOnly": true,
    "includeShab": true,
    "shabLookbackYears": 3,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/switzerland-zefix-shab-moneyhouse-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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "mode": "by_name",
    "query": "Nestle",
    "canton": "",
    "activeOnly": True,
    "includeShab": True,
    "shabLookbackYears": 3,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/switzerland-zefix-shab-moneyhouse-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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "mode": "by_name",
  "query": "Nestle",
  "canton": "",
  "activeOnly": true,
  "includeShab": true,
  "shabLookbackYears": 3,
  "maxItems": 10
}' |
apify call jungle_synthesizer/switzerland-zefix-shab-moneyhouse-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Switzerland Zefix Scraper - Companies, Auditors, SHAB Events",
        "description": "Scrape the Swiss Federal Registry of Commerce (Zefix) for companies: UID, legal name, form, seat, purpose, address, auditors, branches, and full SHAB legal-events feed. Search by name, UID, or canton. KYC/KYB for banks, family offices, crypto, traders.",
        "version": "0.1",
        "x-build-id": "rmbADqoo3dDagu58K"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jungle_synthesizer~switzerland-zefix-shab-moneyhouse-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jungle_synthesizer-switzerland-zefix-shab-moneyhouse-scraper",
                "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/jungle_synthesizer~switzerland-zefix-shab-moneyhouse-scraper/runs": {
            "post": {
                "operationId": "runs-sync-jungle_synthesizer-switzerland-zefix-shab-moneyhouse-scraper",
                "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/jungle_synthesizer~switzerland-zefix-shab-moneyhouse-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-jungle_synthesizer-switzerland-zefix-shab-moneyhouse-scraper",
                "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": {
                    "sp_intended_usage": {
                        "title": "What is the intended usage of this data?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Please describe how you plan to use the data extracted by this crawler."
                    },
                    "sp_improvement_suggestions": {
                        "title": "How can we improve this crawler for you?",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide any feedback or suggestions for improvements."
                    },
                    "sp_contact": {
                        "title": "Contact Email",
                        "minLength": 1,
                        "type": "string",
                        "description": "Provide your email address so we can get in touch with you."
                    },
                    "mode": {
                        "title": "Query Mode",
                        "enum": [
                            "by_name",
                            "by_uid",
                            "by_canton"
                        ],
                        "type": "string",
                        "description": "How to look up companies. by_name searches the registry name index (default), by_uid fetches one company by its CHE UID, by_canton lists active companies in a canton (paginated by name).",
                        "default": "by_name"
                    },
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search term for mode=by_name (e.g. 'Nestle', 'Glencore'). For mode=by_uid, paste the UID like CHE-105.909.036 or CHE105909036. Ignored for mode=by_canton.",
                        "default": "Nestle"
                    },
                    "canton": {
                        "title": "Canton",
                        "enum": [
                            "",
                            "ZH",
                            "BE",
                            "GE",
                            "VD",
                            "AG",
                            "SG",
                            "ZG",
                            "BS",
                            "BL",
                            "FR",
                            "TI",
                            "LU",
                            "VS",
                            "NE",
                            "TG",
                            "GR",
                            "SO",
                            "SZ",
                            "JU",
                            "OW",
                            "NW",
                            "AR",
                            "AI",
                            "GL",
                            "UR",
                            "SH"
                        ],
                        "type": "string",
                        "description": "Canton filter. For mode=by_name this is an OPTIONAL filter applied to results. For mode=by_canton this drives the lookup.",
                        "default": ""
                    },
                    "activeOnly": {
                        "title": "Active Companies Only",
                        "type": "boolean",
                        "description": "If true, exclude companies with status DELETED or LIQUIDATION. Defaults to true.",
                        "default": true
                    },
                    "includeShab": {
                        "title": "Include SHAB Publications",
                        "type": "boolean",
                        "description": "If true (default), each output record carries the SHAB legal-events feed (incorporation, board changes, mergers, liquidation). Set false to keep payloads small when you only need core registry data.",
                        "default": true
                    },
                    "shabLookbackYears": {
                        "title": "SHAB Lookback Years",
                        "minimum": 0,
                        "maximum": 25,
                        "type": "integer",
                        "description": "When includeShab is true, only keep SHAB publications newer than N years. 0 = keep all history. Capped at 25.",
                        "default": 3
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of company records to scrape. Apify's tester has a 5-minute hard timeout — keep this at 15 or below for the default tester run.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
