# Swiss Zefix Company Search (`scrapingmonkey/zefix-company-scraper`) Actor

Scrape Zefix company and business records. Search and collect record details. Export available fields to Excel, CSV or JSON.

- **URL**: https://apify.com/scrapingmonkey/zefix-company-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

Extract Zefix company and business records for company discovery, business research and directory exports. **Swiss Zefix Company Search** collects public information into one complete dataset table, ready to export as Excel, CSV or JSON.

Use search filters or individual public record links, set how many results you need and start the Actor. Search finds matching records; Details retrieves the available information for records you already know.

| At a glance | Details |
|---|---|
| 📥 Input | Search filters or individual public record links |
| 📋 Collection modes | Search companies; Get company details |
| 📤 Output | One row per record, or a failed row for an unsuccessful input |
| 📄 Pagination | Automatic, up to `maxResults` while more records are available |
| 🔐 Website login | Not required |
| 💾 Export | One dataset view with all fields; Excel, CSV and JSON |

### What the Zefix scraper collects 📋

| Mode | What you receive |
|---|---|
| **Search companies** | Matching company and business records and the fields published in the search results. |
| **Get company details** | Available public information for each supplied record. The full output example below shows its actual fields. |

The field table and complete examples below show the information this Actor returns. Optional values depend on what the source publishes for the selected record.

Coverage for this Actor:

- Swiss companies listed in Zefix. Cantonal extracts are linked, not downloaded. Gazette and historical fields vary by company.

### How to scrape Zefix 🚀

1. Choose **Search companies** or **Get company details**.
2. Complete the search filters or individual public record links.
3. Set **Maximum results**. The minimum is 1.
4. Start the Actor and review the saved dataset.
5. Export the results or connect them to your workflow.

#### Search companies — input example

```json
{
  "mode": "search",
  "keywords": "auto",
  "maxResults": 100
}
```

#### Get company details — input example

```json
{
  "mode": "details",
  "recordUrls": [
    "https://www.zefix.ch/en/search/entity/list/firm/1603308"
  ],
  "maxResults": 1
}
```

`maxResults` limits all saved rows for each search or supplied record, including a failed row. It does not guarantee that the source has that many matching records. A detail lookup normally returns one record, although sources with multiple revisions or establishments can return more.

### Zefix data fields and complete output 📦

Each result stays in one row. Every returned field appears in the same dataset view, including list fields and additional published facts. Fields unavailable for a particular record remain empty.

| Field | Included data |
|---|---|
| `result_type` | Selected collection mode. |
| `input` | Submitted search settings, record link or record number. |
| `status` | Record processing status. |
| `error_code` | Failure category for an unsuccessful input. |
| `error_message` | Readable explanation for an unsuccessful input. |
| `record_id` | Stable source identifier. |
| `url` | Public source record URL. |
| `name` | Registered or published name. |
| `register_id` | Register id, when published. |
| `uid` | Uid, when published. |
| `uid_formatted` | Uid formatted, when published. |
| `commercial_register_number` | Commercial register number, when published. |
| `registered_municipality` | Registered municipality, when published. |
| `municipality_code` | Municipality code, when published. |
| `register_office_code` | Register office code, when published. |
| `legal_form_code` | Legal form code, when published. |
| `company_status` | Company status, when published. |
| `publication_date` | Publication date, when published. |
| `cantonal_extract_url` | Cantonal extract url, when published. |
| `additional_fields.name` | Names of additional published fields, when present. |
| `additional_fields.value` | Their corresponding values in the same order. |
| `business_purpose` | Business purpose, when published. |
| `gazette_publications.shabDate` | Gazette publications / shab date, when published. |
| `gazette_publications.shabNr` | Gazette publications / shab nr, when published. |
| `gazette_publications.shabPage` | Gazette publications / shab page, when published. |
| `gazette_publications.shabId` | Gazette publications / shab id, when published. |
| `gazette_publications.shabMutationStatus` | Gazette publications / shab mutation status, when published. |
| `gazette_publications.registryOfficeId` | Gazette publications / registry office id, when published. |
| `gazette_publications.registryOfficeCanton` | Gazette publications / registry office canton, when published. |
| `gazette_publications.registryOfficeJournalId` | Gazette publications / registry office journal id, when published. |
| `gazette_publications.registryOfficeJournalDate` | Gazette publications / registry office journal date, when published. |
| `gazette_publications.message` | Gazette publications / message, when published. |
| `gazette_publications.mutationTypes.id` | Gazette publications / mutation types / id, when published. |
| `gazette_publications.mutationTypes.key` | Gazette publications / mutation types / key, when published. |
| `address.organisation` | Address / organisation, when published. |
| `address.careOf` | Address / care of, when published. |
| `address.street` | Address / street, when published. |
| `address.houseNumber` | Address / house number, when published. |
| `address.addon` | Address / addon, when published. |
| `address.poBox` | Address / po box, when published. |
| `address.town` | Address / town, when published. |
| `address.swissZipCode` | Address / swiss zip code, when published. |
| `address.country` | Address / country, when published. |

The complete result below is included for every mode. Text and lists are not shortened. These are examples from validation runs; the source can change.

#### Search companies — complete JSON result

```json
{
  "result_type": "search",
  "input": "{\"keywords\": \"auto\"}",
  "status": "success",
  "record_id": "1603308",
  "url": "https://www.zefix.ch/en/search/entity/list/firm/1603308",
  "name": "10:10 auto-école, Mark Anguish",
  "register_id": 1603308,
  "uid": "CHE403041411",
  "uid_formatted": "CHE-403.041.411",
  "commercial_register_number": "CH21735856662",
  "registered_municipality": "Châtel-Saint-Denis",
  "municipality_code": 2325,
  "register_office_code": 217,
  "legal_form_code": 1,
  "company_status": "EXISTIEREND",
  "publication_date": "2023-09-08",
  "cantonal_extract_url": "https://adm.appls.fr.ch/hrcmatic/extract?companyOfsUid=CHE-403.041.411",
  "additional_fields.name": [],
  "additional_fields.value": []
}
```

#### Get company details — complete JSON result

```json
{
  "result_type": "details",
  "input": "https://www.zefix.ch/en/search/entity/list/firm/1603308",
  "status": "success",
  "record_id": "1603308",
  "url": "https://www.zefix.ch/en/search/entity/list/firm/1603308",
  "name": "10:10 auto-école, Mark Anguish",
  "register_id": 1603308,
  "uid": "CHE403041411",
  "uid_formatted": "CHE-403.041.411",
  "commercial_register_number": "CH21735856662",
  "registered_municipality": "Châtel-Saint-Denis",
  "municipality_code": 2325,
  "register_office_code": 217,
  "legal_form_code": 1,
  "company_status": "EXISTIEREND",
  "publication_date": "2023-09-08",
  "cantonal_extract_url": "https://adm.appls.fr.ch/hrcmatic/extract?companyOfsUid=CHE-403.041.411",
  "business_purpose": "activité liée à l'auto-école (formation à la conduite).",
  "gazette_publications.shabDate": [
    "2023-09-08"
  ],
  "gazette_publications.shabNr": [
    0
  ],
  "gazette_publications.shabPage": [
    0
  ],
  "gazette_publications.shabId": [
    1005834055
  ],
  "gazette_publications.shabMutationStatus": [
    0
  ],
  "gazette_publications.registryOfficeId": [
    217
  ],
  "gazette_publications.registryOfficeCanton": [
    "FR"
  ],
  "gazette_publications.registryOfficeJournalId": [
    5730
  ],
  "gazette_publications.registryOfficeJournalDate": [
    "2023-09-05"
  ],
  "gazette_publications.message": [
    "<FT TYPE=\"N\">10:10 auto-école, Mark Anguish</FT>, à <FT TYPE=\"5\">Châtel-Saint-Denis</FT>, Route de Prayoud 90, 1618 Châtel-St-Denis, <FT TYPE=\"A\">CHE-403.041.411</FT>. Nouvelle entreprise individuelle. Personne inscrite: Anguish Mark André, de Kirchdorf, à Châtel-Saint-Denis, titulaire, signature individuelle. But: activité liée à l&apos;auto-école (formation à la conduite)."
  ],
  "gazette_publications.mutationTypes.id": [
    [
      1,
      2
    ]
  ],
  "gazette_publications.mutationTypes.key": [
    [
      "status",
      "status.neu"
    ]
  ],
  "address.organisation": "10:10 auto-école, Mark Anguish",
  "address.careOf": "",
  "address.street": "Route de Prayoud",
  "address.houseNumber": "90",
  "address.addon": "",
  "address.poBox": "",
  "address.town": "Châtel-St-Denis",
  "address.swissZipCode": "1618",
  "address.country": "CH",
  "additional_fields.name": [],
  "additional_fields.value": []
}
```

### Input settings ⚙️

| Setting | What to enter |
|---|---|
| **What to collect** (`mode`) | Choose the information you need. |
| **Maximum results per search or link** (`maxResults`) | Collect up to this many saved results for each search or record link. Minimum: 1. |
| **Company name** (`keywords`) | Enter a name or words supported by the public register. |
| **Company links** (`recordUrls`) | Paste one individual public record link per line. Use this field in Details mode. |

### Zefix scraping use cases 🎯

#### Build a company research list

Use the supported name, category or location fields to collect relevant companies. Export the available business information with source references.

#### Collect company profiles

Retrieve known public records and review the published company facts, business descriptions and contact information that this source provides.

#### Keep a business dataset current

Schedule repeated exports and compare stable company IDs. Missing fields remain empty instead of being guessed.

### Pricing and saved-result behavior 💰

See the Actor’s **Pricing** tab for the current rate. Under dataset-item pricing:

- Each saved record is one result. Lists and additional details attached to it do not create extra rows.
- A saved `failed` row is also one billable dataset item. This includes invalid inputs, unavailable records, empty searches and exhausted retries.
- At most one failed row is saved per input. Retry attempts do not create additional dataset rows.
- `maxResults` caps all saved rows for the input. Duplicate copies of the same input are processed once.

### Zefix scraper API and integrations 🔌

Replace `$ACTOR_ID` with the ID shown in the Actor’s API tab and `$APIFY_TOKEN` with your Apify token.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"search","keywords":"auto","maxResults":100}'
```

Use Apify schedules for recurring collection, webhooks for completion notifications, and integrations for Google Sheets, Make, Zapier, cloud storage or your own application.

### Reliability and public-data limits ⚠️

Temporary request failures are retried up to five total attempts. Invalid record inputs save a failed row without a website request. Confirmed missing records are not retried unnecessarily. If a later request fails, records already saved remain in the dataset. Normal pagination completion does not add a failed row. Collection stops after two consecutive pages return no new records. Configuration, data-saving or request-scheduling failures stop the run.

Zefix controls the available records and fields. Search records can contain less information than a full public card. The Actor preserves published values and does not fill missing facts with estimates.

### Frequently asked questions ❓

#### Do I need a Zefix account?

No. This Actor collects the supported public information without your website login.

#### Which search filters can I use?

The input form supports company name. Only the displayed filters are supported.

#### How many records can I collect?

Set `maxResults` to the maximum saved rows you want for each input. The minimum is 1. Collection can finish earlier when the source runs out of results or stops returning new records.

#### Why are some fields empty?

The source may not publish a value for that record or mode. Optional information remains empty.

#### Can I export all the fields?

Yes. All returned fields are included in one dataset view. Nested lists remain attached to their parent record.

### Support 🛟

For a reproducible issue, share the run ID, selected mode and a safe public example through the Actor’s support channel. Keep tokens, passwords and proxy credentials private.

# Actor input Schema

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

Choose the information you need.

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

Collect up to this many saved results for each search or record link. Minimum: 1.

## `keywords` (type: `string`):

Enter a name or words supported by the public register.

## `recordUrls` (type: `array`):

Paste one individual public record link per line. Use this field in Details mode.

## Actor input object example

```json
{
  "mode": "search",
  "maxResults": 10,
  "keywords": "auto",
  "recordUrls": [
    "https://www.zefix.ch/en/search/entity/list/firm/1603308"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Results and failed input outcomes, with all returned fields.

# 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 = {
    "mode": "search",
    "maxResults": 10,
    "keywords": "auto",
    "recordUrls": [
        "https://www.zefix.ch/en/search/entity/list/firm/1603308"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/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 = {
    "mode": "search",
    "maxResults": 10,
    "keywords": "auto",
    "recordUrls": ["https://www.zefix.ch/en/search/entity/list/firm/1603308"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/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 '{
  "mode": "search",
  "maxResults": 10,
  "keywords": "auto",
  "recordUrls": [
    "https://www.zefix.ch/en/search/entity/list/firm/1603308"
  ]
}' |
apify call scrapingmonkey/zefix-company-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/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/mYQZ7ylVIbAy4anYT/builds/qv3sQjzZWYfzNUGv3/openapi.json
