# local.ch Scraper (`memo23/local-ch-scraper`) Actor

Scrape local.ch (Swiss business directory): name, phone, email, website, address, hours, rating, reviews. Keyword + city or a local.ch search/profile URL. HTTP only, no browser. JSON or CSV out. $1 per 1,000 listings.

- **URL**: https://apify.com/memo23/local-ch-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 28 total users, 2 monthly users, 93.3% 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.

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

## local.ch Scraper

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/logo-local-ch.png" alt="local.ch Scraper logo" width="160" /></p>

Turn a local.ch search into structured Swiss business rows: name, phone, email when listed, website, address, hours, category, rating, and profile link.

Keyword + city, or a local.ch URL. JSON or CSV out.

This is **local.ch** (Swisscom Directories). It is not [Yellow Pages US](https://apify.com/memo23/yellow-pages-us-scraper), [Yellow Pages Canada](https://apify.com/memo23/yellowpages-ca-scraper), [Gelbe Seiten](https://apify.com/memo23/gelbeseiten-scraper), or [PagesJaunes.fr](https://apify.com/memo23/pagesjaunes-scraper-cheerio).

### Why Use This Scraper?

- Phone, website, email, and coordinates on the search row when local.ch publishes them
- Street, PLZ, city, and canton already split
- Optional profile pass for fax, extra emails, weekday hours, reviews, and attributes
- Relevance, rating, distance, or A–Z sort
- HTTP only. No browser

### Overview

Built for sales teams, agencies, and researchers who need Swiss **business** leads from local.ch.

Every start type becomes **one dataset row per listing**. A keyword search and a `/d/{city}/{zip}/{category}/{slug}-{id}` profile emit the same flat shape. Rows are de-duplicated by local.ch listing id.

### Supported Inputs

#### Search terms and locations

| Field | Example |
| --- | --- |
| `searchTerms` | `["pizza"]`, `["garage", "coiffeur"]` |
| `locations` | `["Zürich"]`, `["Geneva"]`, `["Bern"]` |

Every term is searched in every location. A term with no location is skipped.

#### URL types

| URL type | Pattern | Example |
| --- | --- | --- |
| Search | `/{lang}/s/{where}/{what}` | `https://www.local.ch/en/s/zurich/pizza` |
| Profile | `/{lang}/d/{city}/{zip}/{category}/{slug}-{id}` | `https://www.local.ch/en/d/zurich/8055/restaurant/il-basilico-ojIMejxnew7cMGGf4FEGVA` |

Search URLs paginate automatically (20 businesses per page).

**Unsupported:** search.ch people lookup, moneyhouse.ch, local.ch people-only results.

### Use Cases

| Audience | What they take from a run |
| --- | --- |
| Sales and outreach | Phone + website + email (when listed) by trade and city |
| Agencies | Cross-joined term × city lists in one dataset |
| Local SEO | Category, rating, and the local.ch profile URL |
| Researchers | Hours, canton, and coordinates for a trade in a city |

### How It Works

1. Cross-join `searchTerms` × `locations`, plus any local.ch URLs.
2. Fetch the search page (20 businesses per page).
3. Page with `?page=` in parallel, stopping at `maxItems` or `maxPages`.
4. Read phone, email, website, address, and coordinates from the search payload.
5. Optionally open the profile for fax, extra emails, weekday hours, and reviews.
6. De-duplicate by listing id and push one row per business.

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-local-ch.png" alt="How the local.ch scraper turns a search into business rows" width="800" /></p>

### Input Configuration

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `searchTerms` | array | one of the start types | What you would type into local.ch |
| `locations` | array | with `searchTerms` | Swiss city |
| `startUrls` | array | one of the start types | Search or profile URL |
| `language` | string | no | `en` (default), `de`, `fr`, `it` |
| `maxItems` | integer | no | Default 50. Free users capped at 50. |
| `sort` | string | no | `relevance` (default), `rating`, `distance`, `alphanum` |
| `scrapeDetails` | boolean | no | Default true. Fax, hours, reviews. |
| `maxPages` | integer | no | Default 20. |
| `maxConcurrency` | integer | no | Default 5. |
| `proxy` | object | no | Default is Apify Unblocker. Turn off only on a home IP. |

#### Example input

```json
{
  "searchTerms": ["pizza"],
  "locations": ["Zürich"],
  "maxItems": 50
}
```

### Output Overview

One flat row per business. Contact and address fields sit at the top level. `searchTerm` tells you which input produced the row. Email is present only when local.ch publishes one on the listing.

### Output Samples

Search: pizza in Zürich, with profile enrich.

```json
{
  "listingId": "ojIMejxnew7cMGGf4FEGVA",
  "name": "il Basilico",
  "phone": "+41444508899",
  "email": "info@ilbasilico.ch",
  "website": "http://www.ilbasilico.ch",
  "fax": "+41444508895",
  "street": "Birmensdorferstrasse 364",
  "postalCode": "8055",
  "city": "Zürich",
  "canton": "ZH",
  "latitude": 47.3708,
  "longitude": 8.5134,
  "hours": ["TUESDAY 11:00-13:30 / 17:00-23:00"],
  "localChUrl": "https://www.local.ch/en/d/zuerich/8055/restaurant/il-basilico-ojIMejxnew7cMGGf4FEGVA"
}
```

### Key Output Fields

**Identity:** `listingId`, `name`, `localChUrl`, `isPremium`, `entryType`

**Contact:** `phone`, `phones`, `fax`, `email`, `emails`, `website`, `social`

**Place:** `address`, `street`, `postalCode`, `city`, `canton`, `country`, `latitude`, `longitude`

**Directory:** `category`, `categories`, `rating`, `reviewCount`, `hours`, `description`, `services`, `attributes`, `images`, `logo`, `reviews`

**Provenance:** `searchTerm`, `scrapedAt`

### Pricing

| Event | When | Rate |
| --- | --- | --- |
| Actor start | Once per run, per GB of memory | $0.005 |
| Listing | Each unique business in the dataset | $0.001 ($1 / 1k) |
| Contact phone | Row has a phone | $0.002 |
| Contact email | Row has an email | $0.05 |

Phone and email are billed only when local.ch publishes that field. A miss is free.

### FAQ

**Will every row have an email?** No. Phone and website are common. Inbox is only on some listings. Phone and email are billed as extra events only when the field is present.

**What does scrapeDetails add?** Fax, extra emails, weekday hours, description, reviews, attributes, and extra photos when local.ch publishes them. Phone, email, website, and coordinates are already on the search row.

**Do I need a proxy?** On Apify, yes — Unblocker is the default because local.ch blocks datacenter IPs and residential at $8/GB loses money at $0.001/row. Local runs from a home IP can turn it off.

**Does it scrape search.ch?** No. local.ch business listings only.

### Support

- Issues: [Actor Issues](https://console.apify.com/actors/dSYyyi7KrazMKQthB/issues)
- Author site: <https://muhamed-didovic.github.io/>
- Email: <muhamed.didovic@gmail.com>

### Additional Services

Bulk canton sweeps, scheduled refreshes, or a private API wrapper: <muhamed.didovic@gmail.com>

### Explore More Scrapers

Directory cousins: [Gelbe Seiten](https://apify.com/memo23/gelbeseiten-scraper), [Yellow Pages US](https://apify.com/memo23/yellow-pages-us-scraper), [Yellow Pages Canada](https://apify.com/memo23/yellowpages-ca-scraper), [Canada411](https://apify.com/memo23/canada411-scraper), and [PagesJaunes.fr](https://apify.com/memo23/pagesjaunes-scraper-cheerio). More actors on [memo23](https://apify.com/memo23) and [didovic](https://apify.com/didovic).

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/local-ch-scraper`).

**Purpose:** Extract local.ch business listings (name, phone, email when listed, website, split address, hours) by keyword + city or URL.

**Minimal input:**

```json
{
  "searchTerms": ["pizza"],
  "locations": ["Zürich"],
  "maxItems": 10
}
```

**Output:** one dataset row per business — `listingId`, `name`, `phone`, `phones`, `fax`, `email`, `emails`, `website`, `social`, `address`, `street`, `postalCode`, `city`, `canton`, `country`, `latitude`, `longitude`, `category`, `categories`, `rating`, `reviewCount`, `hours`, `description`, `services`, `attributes`, `images`, `logo`, `reviews`, `isPremium`, `entryType`, `localChUrl`, `searchTerm`, `scrapedAt`.

**Behaviors an agent should know:**

- Always set `maxItems`. Free users are capped at 50.
- `searchTerms` needs at least one entry in `locations`.
- `startUrls` work on their own (local.ch only).
- Email is often empty. Do not assume a contact-email field exists on every row.
- Each listing is $0.001. A phone on the row is $0.002. An email is $0.05. Start is $0.005 per GB.
- Switzerland only. Not search.ch, not moneyhouse.ch.
- Cloud runs need the default Unblocker. local.ch blocks datacenter IPs.

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Swisscom Directories AG, local.ch, localsearch.ch, or Swisscom. All trademarks mentioned are the property of their respective owners.

The scraper reads publicly listed Swiss business data from local.ch. Users are responsible for ensuring their use complies with local.ch Terms of Service, applicable data-protection law (nDSG / GDPR), UWG if they send outreach, and any contractual obligations of their own organization.

### SEO Keywords

local.ch scraper, local ch scraper, scrape local.ch, Swiss yellow pages scraper, local.ch API, Swiss business listings scraper, Switzerland phone email scraper, Zürich leads scraper, Apify local.ch, Swiss restaurant leads, Geneva business scraper, local SEO Switzerland data, local.ch email scraper, Swiss directory scraper

# Actor input Schema

## `startUrls` (type: `array`):

Paste local.ch search or profile links. Examples: <code>https://www.local.ch/en/s/zurich/pizza</code> or a <code>/d/{city}/{zip}/{category}/{slug}-{id}</code> profile.

## `searchTerms` (type: `array`):

What you would type into local.ch, e.g. <b>pizza</b>, <b>garage</b>, <b>coiffeur</b>. One row per term. Every term is searched in every location below. A local.ch search or profile URL also works here (no city required).

## `locations` (type: `array`):

Swiss city, e.g. <b>Zürich</b>, <b>Geneva</b>, <b>Bern</b>, <b>Lausanne</b>.

## `language` (type: `string`):

local.ch language for search URLs you type as keyword + city. Start URLs keep the language in the link.

## `sort` (type: `string`):

Same <code>sorting=</code> as the site. <b>Relevance</b> is the local.ch default.

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

Stop after this many unique businesses across the whole run. Free plan is capped at 50.

## `scrapeDetails` (type: `boolean`):

Opens the profile for fax, extra emails, weekday hours, description, reviews, and attributes. Phone, email, website, and coordinates are already on the search row.

## `maxPages` (type: `integer`):

Each page is about 20 businesses.

## `maxConcurrency` (type: `integer`):

How many pages and profiles to load at the same time.

## `proxy` (type: `object`):

Unblocker is the default. Residential at $8/GB is what put this actor in the red at $0.001/row.

## Actor input object example

```json
{
  "searchTerms": [
    "pizza"
  ],
  "locations": [
    "Zürich"
  ],
  "language": "en",
  "sort": "relevance",
  "maxItems": 50,
  "scrapeDetails": true,
  "maxPages": 20,
  "maxConcurrency": 5,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "searchTerms": [
        "pizza"
    ],
    "locations": [
        "Zürich"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "UNBLOCKER"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/local-ch-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 = {
    "searchTerms": ["pizza"],
    "locations": ["Zürich"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["UNBLOCKER"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/local-ch-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 '{
  "searchTerms": [
    "pizza"
  ],
  "locations": [
    "Zürich"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ]
  }
}' |
apify call memo23/local-ch-scraper --silent --output-dataset

```

## MCP server setup

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