# Swiss SHAB Monitor: Bankruptcy, Company Register, Tenders (`antndev/swiss-shab-amtsblatt-monitor`) Actor

Monitor the Swiss official gazette (SHAB / Amtsblattportal): bankruptcies and debt collection, commercial register changes, tenders and calls. Filter by rubric, canton, date and keyword, get full structured publication text, and receive only new records with webhook alerts.

- **URL**: https://apify.com/antndev/swiss-shab-amtsblatt-monitor.md
- **Developed by:** [Anton König](https://apify.com/antndev) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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 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

## Swiss SHAB Monitor: Bankruptcy, Company Register, Tenders

Read the **Swiss official gazette (SHAB / Amtsblattportal)** as structured data. Bankruptcies and debt collection, commercial register changes, cancellations, land notices and public procurement, filtered by rubric, canton, date and keyword, with full official publication text and a monitor mode that returns only records you have not seen yet.

Official public API only. No login, no scraping, no browser.

### What it is good for

- **Credit risk and KYB**: catch bankruptcy warnings, seizure orders and debt-collection notices against your customers, suppliers or portfolio companies, the day they are published.
- **Sales and lead generation**: new company registrations (HR01) and mutations (HR02) per canton, as a daily feed.
- **Public procurement**: tenders and awards without watching the portal by hand.
- **Compliance and research**: reproducible, dated records with the official publication number and a direct link.

### Why this actor

- **All rubrics, one actor.** Debt collection and bankruptcy (SB), commercial register (HR), cancellations and calls (KK), agriculture and land (LS), procurement and notices (AB), naturalisation (NA), federal and cantonal notices (BB).
- **Full official text, not just titles.** Turn on `includeFullText` and every record carries the parsed official XML as structured JSON plus a flattened `full_text` field, which is where the debtor names, addresses, amounts and deadlines actually live.
- **Real keyword search.** The gazette's own API ignores free-text queries, so this actor reads the detail record and matches your keywords across all four language titles, the office name and the full text.
- **Monitor mode.** Scheduled runs remember what they have already returned and emit only new publications, optionally pushed to your webhook.
- **Four languages.** German, French, Italian and English titles are returned side by side, which matters in a country that publishes in all of them.

### Example output row

```json
{
  "publication_date": "2026-07-29",
  "publication_number": "SB07-0000001234",
  "rubric": "SB",
  "sub_rubric": "SB07",
  "rubric_label": "Debt collection and bankruptcy (Schuldbetreibung und Konkurs)",
  "cantons": ["TI"],
  "title_de": "Konkursandrohung Binario Holding SA",
  "title_fr": "Commination de faillite Binario Holding SA",
  "office_name": "Ufficio esecuzione di Lugano",
  "office_town": "Lugano",
  "url": "https://www.shab.ch/#!/search/publications/detail/e9afb5c0-...",
  "xml_url": "https://www.shab.ch/api/v1/publications/e9afb5c0-.../xml",
  "is_new": true
}
```

### Typical setups

**Daily bankruptcy watch for your canton**
`rubrics: ["SB"]`, `cantons: ["ZH"]`, `lastDays: 1`, `monitorMode: true`, plus your `webhookUrl`. Schedule it once a day.

**Watch specific companies**
`rubrics: ["SB","HR"]`, `keywords: ["Muster AG","Beispiel GmbH"]`, `includeFullText: true`, `monitorMode: true`.

**New company registrations as leads**
`rubrics: ["HR"]`, `subRubrics: ["HR01"]`, `cantons: ["ZH","ZG"]`, `lastDays: 1`.

### Input

| Field | Default | Meaning |
|---|---|---|
| `rubrics` | `["SB"]` | which gazette sections to read |
| `subRubrics` | all | narrow further, e.g. `SB07`, `HR01` |
| `cantons` | all | two-letter canton codes |
| `lastDays` | 7 | convenience date window, overrides explicit dates |
| `dateFrom` / `dateTo` | none | explicit `YYYY-MM-DD` range |
| `keywords` | none | match company names or terms across titles and full text |
| `requireAllKeywords` | false | on: every keyword must appear |
| `includeFullText` | false | attach the parsed official XML and a flattened `full_text` |
| `monitorMode` | false | emit only publications not seen in earlier runs |
| `webhookUrl` | none | POST the emitted records as JSON |
| `maxResults` | 100 | cap per run |

### Pricing note

Keyword filtering and `includeFullText` both read each candidate's detail record, which is charged as a full-text event. Running without keywords and without full text is the cheapest mode and still returns dates, rubrics, cantons, titles, office and links.

### Honest limitations

- Keyword matching is literal substring matching, not fuzzy. Search for the distinctive part of a company name rather than its full legal form.
- The gazette publishes on business days; a daily monitor will find nothing on weekends and holidays.
- Publications expire from the portal after a legally defined period, so historical depth is limited by the source, not by this actor.
- This is official published data presented as-is. It is not a credit rating and not legal advice.

### Data source

Swiss Official Gazette of Commerce (SHAB / FOSC / SOGC) via the public Amtsblattportal API at `www.shab.ch/api/v1`.

### Keywords

swiss company register, shab, handelsregister schweiz, amtsblatt, bankruptcy monitor switzerland, konkurs, betreibung, insolvency alerts, kyb switzerland, credit risk monitoring, swiss tenders, company registrations switzerland, sogc, fosc

# Actor input Schema

## `rubrics` (type: `array`):

Which sections of the official gazette to read. SB = debt collection and bankruptcy, HR = commercial register, KK = cancellations and calls, LS = agriculture and land, AB = procurement and other notices.

## `subRubrics` (type: `array`):

Narrow further, for example SB07 for bankruptcy warnings or HR01 for new registrations. Leave empty for all sub-rubrics of the selected rubrics.

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

Two-letter canton codes, for example ZH, BE, VD. Leave empty for all of Switzerland.

## `lastDays` (type: `integer`):

Convenience date filter. Set to 1 for a daily monitor, 7 for a weekly sweep. Overrides the explicit dates below.

## `dateFrom` (type: `string`):

Explicit start date. Ignored when 'Last N days' is set.

## `dateTo` (type: `string`):

Explicit end date. Ignored when 'Last N days' is set.

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

Company names or terms to look for. Matched across the four language titles, the office name and the full publication text. Note: keyword filtering reads the detail record of each candidate, which costs one full-text event per record.

## `requireAllKeywords` (type: `boolean`):

On: a publication must contain every keyword. Off: any keyword is enough.

## `includeFullText` (type: `boolean`):

Fetch each publication's official XML record and include it as structured JSON plus a flattened full\_text field (debtor names, addresses, amounts, deadlines).

## `monitorMode` (type: `boolean`):

For scheduled runs: remembers publication IDs across runs and emits only records that were not seen before.

## `webhookUrl` (type: `string`):

POSTs the emitted publications as JSON to this URL, so you can alert into your own system.

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

Maximum number of publications to return per run.

## Actor input object example

```json
{
  "rubrics": [
    "SB"
  ],
  "lastDays": 7,
  "requireAllKeywords": false,
  "includeFullText": false,
  "monitorMode": false,
  "maxResults": 100
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("antndev/swiss-shab-amtsblatt-monitor").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 = { "rubrics": ["SB"] }

# Run the Actor and wait for it to finish
run = client.actor("antndev/swiss-shab-amtsblatt-monitor").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 '{
  "rubrics": [
    "SB"
  ]
}' |
apify call antndev/swiss-shab-amtsblatt-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=antndev/swiss-shab-amtsblatt-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/z7PYMAIt3VJVoaftG/builds/ugajrej41nOf2dIT7/openapi.json
