# Swiss Telephone & Business Directory Scraper (`moving_beacon-owner1/swiss-telephone-business-directory-scraper`) Actor

Extract Swiss business and personal telephone directory listings from [search.ch](https://search.ch/tel/). This Apify Actor searches nationwide across Switzerland, returning structured company information, addresses, verified phone numbers, decoded emails, direct websites, ratings, and categories.

- **URL**: https://apify.com/moving_beacon-owner1/swiss-telephone-business-directory-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.99 / 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.

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 Telephone & Business Directory Scraper (search.ch)

Extract Swiss business and personal telephone directory listings from [search.ch](https://search.ch/tel/). This Apify Actor searches nationwide across Switzerland, returning structured company information, addresses, verified phone numbers, decoded emails, direct websites, ratings, and categories.

***

### Features

- **Nationwide Swiss Coverage**: Search by trade, service, keyword, or company name across any Swiss canton, municipality, town, or postal code (Zurich, Bern, Geneva, Basel, Lausanne, Lugano, Lucerne, etc.).
- **Contact & Location Details**: Extracts full Swiss street addresses, postal codes, cantons/regions, and telephone numbers.
- **Deep Detail Enrichment**: Automatically extracts decoded obfuscated email addresses, resolves target business websites, and parses schema.org `LocalBusiness` JSON-LD aggregate ratings and review counts.
- **Anti-Bot Resilient**: Built on `curl-cffi` with Chrome TLS fingerprint impersonation for high stability and reliability.
- **Apify Proxy Support**: Works seamlessly with Apify Residential or Datacenter proxies.

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | `string` | `"hotel"` | **Required**. Business trade, keyword, individual or company name (e.g., `"hotel"`, `"restaurant"`, `"coiffure"`, `"garage"`, `"arzt"`). |
| `location` | `string` | `"Zurich"` | Swiss city, canton, or postal code (e.g., `"Zurich"`, `"Bern"`, `"Geneva"`, `"Basel"`, `"8001"`). |
| `max_items` | `integer` | `10` | Maximum number of directory listings to return. |
| `details` | `boolean` | `true` | When true, visits individual listing pages to extract direct emails, websites, and review ratings. |
| `details_limit` | `integer` | `10` | Maximum number of listings to enrich with detail page scraping. |
| `delay` | `number` | `0.4` | Polite pause in seconds between detail page requests. |
| `timeout` | `integer` | `30` | Network timeout in seconds per HTTP request. |
| `proxyConfiguration` | `object` | `null` | Optional Apify proxy settings (e.g. `{"useApifyProxy": true, "apifyProxyCountry": "CH"}`). |

***

### Example Input JSON

```json
{
  "query": "hotel",
  "location": "Zurich",
  "max_items": 10,
  "details": true,
  "details_limit": 10,
  "delay": 0.4,
  "timeout": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "CH"
  }
}
```

***

### Output Dataset Schema

Each item in the output dataset contains:

| Field | Type | Description |
|---|---|---|
| `name` | `string` | Name of the business or person. |
| `street` | `string` | Street address and building number. |
| `postal_code` | `string` | Swiss postal code (4 digits). |
| `city` | `string` | City or locality. |
| `region` | `string` | Canton or region code/name. |
| `address` | `string` | Full formatted address string. |
| `phone` | `string` | Telephone number. |
| `email` | `string` | Decoded direct email address (if available on detail page). |
| `website` | `string` | Direct official business website (unwrapped from search.ch redirect). |
| `rating` | `number` | Average rating value from reviews (if available). |
| `review_count` | `integer` | Total number of customer reviews. |
| `url` | `string` | Canonical search.ch directory listing URL. |
| `categories` | `array` | List of industry categories or classification tags. |
| `scraped_at` | `string` | ISO 8601 UTC timestamp of extraction. |

#### Example Output Record

```json
{
  "name": "Hotel Kindli",
  "street": "Pfalzgasse 1",
  "postal_code": "8001",
  "city": "Zürich",
  "region": "ZH",
  "address": "Pfalzgasse 1 8001 Zürich",
  "phone": "043 888 76 76",
  "email": "hotel@kindli.ch",
  "website": "https://www.kindli.ch",
  "rating": 4.8,
  "review_count": 64,
  "url": "https://search.ch/tel/zuerich/pfalzgasse-1/hotel-kindli",
  "categories": [
    "Hotel"
  ],
  "scraped_at": "2026-11-17T23:45:00.000000+00:00"
}
```

***

### Compliance & Ethical Scraping Guidelines

- **Public Directory Data**: search.ch provides public business and telephone directory records intended for finding contact information.
- **Rate Limiting & Politeness**: The actor incorporates polite delays (`delay`) between requests to avoid overloading the target server.
- **Personal Data & GDPR / Swiss FADP**: Please ensure your use of contact data complies with applicable Swiss Federal Act on Data Protection (FADP) and EU General Data Protection Regulation (GDPR), especially regarding direct marketing and unsolicited commercial communications.

***

# Actor input Schema

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

Business trade, keyword, individual or company name (e.g., 'hotel', 'restaurant', 'coiffure', 'garage', 'arzt').

## `location` (type: `string`):

Swiss city, canton, or postal code (e.g., 'Zurich', 'Bern', 'Geneva', 'Basel', '8001').

## `max_items` (type: `integer`):

Maximum number of directory listings to collect.

## `details` (type: `boolean`):

Visit each listing's detail page to extract decoded emails, target websites, and ratings.

## `details_limit` (type: `integer`):

Maximum number of listings to enrich with detail page scraping.

## `delay` (type: `number`):

Delay in seconds between detail page requests to prevent rate limiting.

## `timeout` (type: `integer`):

Timeout in seconds for each HTTP request.

## `proxyConfiguration` (type: `object`):

Proxy settings for the scraper. Swiss or European proxies are recommended.

## Actor input object example

```json
{
  "query": "hotel",
  "location": "Zurich",
  "max_items": 10,
  "details": true,
  "details_limit": 10,
  "delay": 0.4,
  "timeout": 30
}
```

# 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 = {
    "query": "hotel",
    "location": "Zurich",
    "max_items": 10,
    "details_limit": 10,
    "delay": 0.4,
    "timeout": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/swiss-telephone-business-directory-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 = {
    "query": "hotel",
    "location": "Zurich",
    "max_items": 10,
    "details_limit": 10,
    "delay": 0.4,
    "timeout": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/swiss-telephone-business-directory-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 '{
  "query": "hotel",
  "location": "Zurich",
  "max_items": 10,
  "details_limit": 10,
  "delay": 0.4,
  "timeout": 30
}' |
apify call moving_beacon-owner1/swiss-telephone-business-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/swiss-telephone-business-directory-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/cN5F2DH5mLc9IorW2/builds/mzmVEZOPHH7C4nowi/openapi.json
