# Swiss Company Events Feed: SHAB New Firms & Bankruptcies (`moment-data/swiss-shab-company-events-feed`) Actor

Daily Swiss company events from the official SHAB/FOSC gazette API: new registrations, liquidations, bankruptcies, liquidation creditor calls, moratoriums and deletions. UID, legal form, capital, canton, purpose. Legal entities only. No API key.

- **URL**: https://apify.com/moment-data/swiss-shab-company-events-feed.md
- **Developed by:** [Luke Miller](https://apify.com/moment-data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 notice 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

## Swiss Company Events Feed: SHAB New Firms & Bankruptcies

Every Swiss business day the **Swiss Official Gazette of Commerce (SHAB / FOSC / FUSC)** publishes hundreds of company events: about 200-250 new companies, dozens of companies entering liquidation, bankruptcy openings and closures, calls to creditors and debt-restructuring moratoriums. This Actor turns that gazette into a **clean, structured, filterable daily feed of company-level events** using the gazette's **official open REST API** (amtsblattportal.ch, operated by SECO). No API key, no login, no scraping of web pages.

Each record gives you the **company name, UID (CHE-xxx.xxx.xxx), legal form, seat, canton, postal code, town, statutory purpose, share capital (CHF)**, the event stage (e.g. bankruptcy opened, suspended for lack of assets, closed), claim deadlines and links to the official PDF and XML.

### Who uses it

- **B2B sales & agencies**: reach newly founded AG/GmbH/Sàrl companies in your canton and industry within days of registration (keyword filter on name + purpose).
- **Credit, collections & risk teams**: monitor bankruptcies, liquidations and moratoriums for your customers or suppliers by UID; file claims before the deadline.
- **Distressed-asset buyers, insolvency practitioners, M\&A scouts**: daily list of companies dissolved, in liquidation or in composition proceedings.
- **Data & CRM enrichment**: keep Swiss company records current (deletions, liquidation status) using the UID as join key.

### Event types

| eventType | Source rubric | What it means |
|---|---|---|
| `newRegistration` | HR01 | A company was entered in the commercial register (capital, purpose, legal form). |
| `liquidation` | HR02 | A company was dissolved and is now "in Liquidation / en liquidation / in liquidazione". `liquidationReason`: dissolvedByBankruptcy, dissolvedVoluntarily, dissolvedByCourtOr731b, dissolvedByRegistryHregv153b, compositionWithAssignmentOfAssets, bankruptcySuspended, unspecified. |
| `bankruptcy` | KK01-KK12 | Bankruptcy notices with `stage`: provisionalNotice, opened, suspendedNoAssets, collocationPlan, distributionList, closed, revoked, ... plus `claimDeadline` and `proceedingType` (summary/ordinary). |
| `liquidationCreditorCall` | LS01-LS08 | Liquidators' call to creditors (Liquidationsschuldenruf) with claim deadline. |
| `moratorium` | NA01-NA12 | Debt-restructuring moratorium / composition proceedings (Nachlassstundung). |
| `deletion` | HR03 | Company deleted from the commercial register. |
| `companyChange` (opt-in) | HR02 | Other changes: `changes` lists name, seat, address, purpose, capitalNominal, legalForm, reentry, ... with `previousName` / `previousSeat`. |

### Quick start

1. Click **Start** with the default input `{}`: you get ~30 events from the latest SHAB issue, mixed round-robin across all event types (except companyChange), in ~15 seconds.
2. To build a lead list: `{"eventTypes":["newRegistration"],"cantons":["ZH","ZG"],"keywords":["software","informatik","consulting"],"daysBack":5,"maxItems":200}`
3. For a daily risk watch: schedule `{"mode":"sinceLastRun","eventTypes":["bankruptcy","liquidation","moratorium"],"cantons":["GE","VD"],"maxItems":500}` and connect a webhook/Slack/Sheets integration. Each run only returns notices not delivered before.

### Input

| Field | Default | Notes |
|---|---|---|
| `eventTypes` | all except companyChange | See table above. |
| `daysBack` | 1 (3 in sinceLastRun) | Publication days ending on the newest SHAB issue. |
| `fromDate` / `toDate` | - | Explicit publication-date window (max 93 days). |
| `cantons` | all | Two-letter codes (ZH, GE, TI ...). |
| `legalForms` | all legal entities | ag, gmbh, cooperative, association, foundation, foreignBranch, swissBranch, fund, partnership, limitedPartnership, other. |
| `keywords` / `excludeKeywords` | - | Word-start match on company name and purpose, accents ignored (DE/FR/IT). |
| `minCapitalChf` | 0 | Commercial-register events only. |
| `bankruptcyStages` | all | e.g. `["opened","suspendedNoAssets"]`. |
| `changeTypes` | all | For companyChange, e.g. `["seat","name","capitalNominal"]`. |
| `includePartnerships` | false | KlG/KmG/SNC are often named after partners. |
| `includePersonNamedCompanies` | false | Skips firms named only after a person ("Firstname Lastname GmbH"). |
| `maxItems` | 30 | Max records (each is one charged event). |
| `maxDetailRequests` | 300 | Safety cap on notice downloads. |
| `mode` / `stateKey` | stateless / default | `sinceLastRun` remembers delivered notice ids for 60 days in the named key-value store `swiss-shab-company-events-feed-state`. |

### Output example

```json
{
  "eventType": "bankruptcy",
  "stage": "opened",
  "subRubric": "KK02",
  "noticeType": "Bankruptcy publication / call to creditors",
  "publicationDate": "2026-10-30",
  "publicationNumber": "KK02-0000062201",
  "companyName": "Terry's Haushaltsgeräte GmbH",
  "uid": "CHE-238.241.257",
  "legalForm": "Limited liability company (from name)",
  "legalFormKey": "gmbh",
  "canton": "ZH",
  "postalCode": "8707",
  "town": "Uetikon am See",
  "resolutionDate": "2026-10-14",
  "claimDeadline": "2026-11-30",
  "proceedingType": "summary",
  "authority": "Notariat, Grundbuchamt und Konkursamt Männedorf",
  "language": "de",
  "pdfUrl": "https://amtsblattportal.ch/api/v1/publications/9fb8d0f7-15a7-415e-b467-964c2924bd4d/pdf"
}
```

New registrations additionally carry `purpose`, `capitalNominalChf`, `capitalPaidChf`, `seat`, `legalFormCode` (eCH-0097) and `registryJournalDate`. See `sample-output.json` for full records. A run summary (window, counts, notes) is saved as the `OUTPUT` record.

### Pricing

Pay-per-event, you only pay for records delivered:

| Event | Price | Charged |
|---|---|---|
| Actor start | $0.005 | Once per run |
| Notice record | $0.003 | Per company event pushed to the dataset |

The default run (`{}`, 30 records) costs **$0.095**. A daily canton watch returning ~15 events costs about $0.05/day. No separate platform-usage charges: the prices above are all you pay. Set a maximum cost per run and the Actor stops delivering before exceeding it.

### Data source, licence & privacy

- Data comes from the **official SHAB API** (https://amtsblattportal.ch/docs/api/), which SECO documents as "freely accessible for anyone to use" for productive use. Requests are polite (max ~3 per second, declared User-Agent). Only the signed PDF of a publication is legally binding; always check the linked PDF before acting. This Actor is **not affiliated** with SECO, the SHAB or any commercial register or bankruptcy office.
- **Legal entities only.** Notices about natural persons (personal bankruptcies, sole proprietorships, estates) are screened out by title and never downloaded or output. The free-text notice body, which names board members, liquidators and administrators, is **never copied**. Addresses are reduced to postal code and town (no street, no c/o lines). Firms named only after a person and partnerships are skipped by default.

### Tips & FAQ

- **When is new data available?** SHAB publishes every Swiss business day (Mon-Fri) shortly after midnight CET. Schedule daily at e.g. 07:00 Europe/Zurich.
- **Why fewer records than expected with filters?** Keyword, legal-form and capital filters need each notice's detail; raise `maxDetailRequests` or `daysBack` for broad windows.
- **Languages:** names and purposes are in the publication language (de/fr/it); `language` tells you which.

# Actor input Schema

## `eventTypes` (type: `array`):

Which SHAB company events to return. Default: everything except companyChange.

## `daysBack` (type: `integer`):

Publication days to cover, ending on the newest SHAB publication day. 1 = the latest issue (default; 3 in sinceLastRun mode). Ignored when fromDate/toDate are set.

## `fromDate` (type: `string`):

Optional explicit window start (publication date).

## `toDate` (type: `string`):

Optional explicit window end (publication date). Max 93-day window.

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

Only these cantons (empty = all of Switzerland).

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

Only these legal forms (empty = all legal entities). Sole proprietorships are never returned.

## `keywords` (type: `array`):

Keep events whose company name or statutory purpose contains any of these words (word-start match, accents ignored), e.g. software, immobilien, restaurant, fiduciaire.

## `excludeKeywords` (type: `array`):

Drop events whose name or purpose contains any of these words.

## `minCapitalChf` (type: `integer`):

Only commercial-register events (new registrations, liquidations, deletions, changes) with at least this nominal capital. Bankruptcy/LS/NA notices carry no capital and are dropped when set.

## `bankruptcyStages` (type: `array`):

Only these bankruptcy (KK) stages, e.g. opened + suspendedNoAssets. Empty = all.

## `changeTypes` (type: `array`):

For companyChange events, keep only notices with at least one of these changes.

## `includePartnerships` (type: `boolean`):

Partnerships are often named after their partners, so they are off by default.

## `includePersonNamedCompanies` (type: `boolean`):

By default firms like 'Firstname Lastname GmbH' are skipped as a privacy screen.

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

Maximum events to return (round-robin across event types). Each returned event is one charged notice-record.

## `maxDetailRequests` (type: `integer`):

Safety cap on per-notice XML downloads (filters on keywords/legal form/capital need the notice detail).

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

sinceLastRun remembers delivered notice ids (60 days) in the named key-value store swiss-shab-company-events-feed-state.

## `stateKey` (type: `string`):

Separate memory per saved watch/filter set in sinceLastRun mode.

## Actor input object example

```json
{
  "eventTypes": [
    "newRegistration",
    "liquidation",
    "bankruptcy",
    "liquidationCreditorCall",
    "moratorium",
    "deletion"
  ],
  "includePartnerships": false,
  "includePersonNamedCompanies": false,
  "maxItems": 30,
  "maxDetailRequests": 300,
  "mode": "stateless",
  "stateKey": "default"
}
```

# Actor output Schema

## `events` (type: `string`):

No description

## `summary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("moment-data/swiss-shab-company-events-feed").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("moment-data/swiss-shab-company-events-feed").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 '{}' |
apify call moment-data/swiss-shab-company-events-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moment-data/swiss-shab-company-events-feed"
        }
    }
}
```

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/adHOgMWyFDyVEyO5a/builds/WkN6TUHoO7VYkekgk/openapi.json
