# Local.ch Scraper: Swiss Business Leads with Emails (`firsthand/local-ch-scraper`) Actor

Local.ch scraper: Swiss business leads by trade and place with phone, mobile, email, website, social links, address, GPS and rating, all in one row. Search like on local.ch or paste search links. German, French, Italian. Excel and CSV export, $0.0005 per business.

- **URL**: https://apify.com/firsthand/local-ch-scraper.md
- **Developed by:** [Firsthand](https://apify.com/firsthand) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 businesses

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: Swiss Business Leads with Emails

Export Swiss businesses from [local.ch](https://www.local.ch), the Swiss business directory, by trade and place: name, categories, address, phone, mobile, fax, email, website, social links, GPS and rating. Every row already has all contacts that local.ch shows, no extra page per business. Download as Excel, CSV or JSON, or call the Actor through the API.

### What you get

- Name, main category and all categories, street, postal code, city, canton
- Phone numbers, mobile numbers, fax, email addresses, website, social links (Facebook, Instagram, LinkedIn and others)
- Latitude and longitude, rating and number of reviews, logo, link to the local.ch page
- **With "Visit company website" on**, the Actor also opens the company's own website (home page plus up to 5 pages: Kontakt, Impressum, Über uns, Team) and adds: emails found there, owners and managing directors from the Impressum with their role, UID and MWST number, commercial register number, social links, and whether the email domain has a mail server.

### How to use it

1. Type what you are looking for (`Treuhand`, `Restaurant`, `Sanitär`, `plombier`, a company name) and one or more places (`Bern`, `8001`, `Genève`). Every query runs in every place; leave places empty to search all of Switzerland.
2. Or paste local.ch search links, for example `https://www.local.ch/de/s/Sanit%C3%A4r%20Z%C3%BCrich`.
3. Choose the language for category names (German, French, Italian or English), set limits and run.

### Firmenadressen Schweiz exportieren (Excel, CSV)

Every run saves a table you can download as Excel, CSV, JSON or HTML from the Storage tab, or fetch through the Apify API. One row is one local.ch entry, in the order local.ch shows them.

### Example output

```json
{
  "id": "bbSLPsJ2gLU_0KT4wuRHpg",
  "name": "Trevisan & Partner Haustechnik GmbH",
  "type": "BUSINESS",
  "category": "Sanitäre Anlagen und Installationen",
  "street": "Schneebelistrasse 2",
  "postalCode": "8048",
  "city": "Zürich",
  "phone": "+41444301040",
  "phones": ["+41444301040"],
  "mobiles": ["+41787501584"],
  "email": "kontakt@trevisan-partner.ch",
  "website": "https://trevisan-partner.ch",
  "socialLinks": ["https://www.facebook.com/trevisanpartner", "https://www.instagram.com/trevisanpartner"],
  "refusesAdvertising": true,
  "latitude": 47.38453,
  "longitude": 8.484339,
  "url": "https://www.local.ch/de/d/zuerich/8048/sanitaere-anlagen-und-installationen/trevisan-partner-haustechnik-gmbh-bbSLPsJ2gLU_0KT4wuRHpg",
  "position": 2,
  "searchQuery": "Sanitär",
  "searchLocation": "Zürich"
}
```

### Website fields

With "Visit company website" on, every row gets these fields (empty when there is no website or nothing was found):

```json
{
  "websiteStatus": "ok",
  "websiteEmails": ["info@muster-treuhand.ch", "anna@muster-treuhand.ch"],
  "emailSource": "directory",
  "websitePhones": ["+41441234567"],
  "websiteSocialLinks": {"facebook": "https://www.facebook.com/example", "instagram": "https://www.instagram.com/example"},
  "people": [{"name": "Anna Beispiel", "role": "Inhaber"}],
  "registerNumber": "CHE-123.456.789",
  "registerCourt": null,
  "vatId": "CHE-123.456.789 MWST",
  "websiteEmailHasMx": true
}
```

`websiteStatus` says what happened: `ok`, `unreachable` (the site is down), `http_403` or another `http_<code>` (the site refused the visit or answered with an error), `not_html` (the link is a file, not a page), `platform` (the link points to Facebook, Doctolib or another platform, not to the company's own site), `skipped_cost_limit` (the run reached your maximum cost), `skipped_time_limit` (the run was too close to its timeout to visit the site) or `error`. Data protection and job mailboxes found on a site stay in `websiteEmails` at the end of the list, but never become the main `email` and are not charged. `emailSource` says whether the main `email` came from the directory or from the website.

### Pricing

Pay per result, no monthly fee, no start fee: **$0.0005 per business** with all contacts, so 1,000 businesses cost $0.50. A business found again by another query in the same run is not charged twice. Set "Maximum cost per run" in the run options to cap the spend. With "Visit company website" on, add up to $2.00 per 1,000 businesses: the $0.002 is charged only for a business whose website gave an email, a social link, a person or a register or VAT number; a site that is down, refuses the visit or shows nothing useful is free.

### Local.ch API for developers

Start the Actor through the Apify API or the Python and JavaScript clients and read the dataset when it finishes. Input example:

```json
{
  "searchQueries": ["Treuhand", "Steuerberatung"],
  "locations": ["Zürich", "Winterthur"],
  "language": "de",
  "enrichWebsite": true,
  "maxItems": 500
}
```

Inputs written for other local.ch actors on Apify also work: `startUrl`, `urls`, `queries`, `category`, `where`, `locations`, `language` and `maxListings` are read as the matching fields. For the website option `scrapeWebsite`, `enrichWebsites`, `scrapeContacts` and `websiteEnrichment` work too.

### Good to know

- local.ch shows at most 3,000 entries per search; split large searches by city or postal code.
- local.ch limits how fast one address can read pages; the Actor switches to a new proxy address and retries, so very large runs take a few minutes longer.
- Without `maxItems` a run stops at 100 businesses; set 0 for no limit.
- `refusesAdvertising` is true when the owner marked the number on local.ch as not wanting advertising calls (the local.ch star); it is empty when local.ch does not say. Respect it and the Swiss rules for business contact.
- Company websites are visited from Apify servers without a proxy. In our tests about 90% of Swiss sites opened; the rest refused the visit or were down, and those businesses are not charged for the website.
- Emails of web agencies, hosting companies, consumer mediators and data protection authorities found on a site are dropped. When the site has an email on its own domain, emails on other domains are dropped too.
- The Actor reads public local.ch pages only.

# Actor input Schema

## `searchQueries` (type: `array`):

What you would type in the local.ch search box, for example 'Treuhand', 'Restaurant', 'plombier' or a company name.

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

Places, for example 'Bern', '8001' or 'Genève'. Every query runs in every place. Empty searches all of Switzerland.

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

Search result pages from local.ch, for example https://www.local.ch/de/s/Sanit%C3%A4r%20Z%C3%BCrich.

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

Language of category names and links. German if empty.

## `sortOrder` (type: `string`):

Order of results. Relevance if empty.

## `enrichWebsite` (type: `boolean`):

Opens the company's own website (home page plus up to 5 pages: contact, imprint, about, team) and adds the emails found there, social profile links, owners and managing directors, the UID and MWST number from the Impressum. The main email column is filled from the website when the directory has none. Charged once per business, only when the website gave at least one of these. Websites are visited without a proxy.

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

Businesses in total across all queries, places and links. 100 if empty, 0 means no limit.

## `maxItemsPerQuery` (type: `integer`):

Limit for each query in each place and for each link (local.ch shows up to 3,000). Empty or 0 means no limit.

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

local.ch checks the browser of requests from cloud servers, so the Actor always goes through Apify Proxy (or your own proxy URLs); its cost is included in the price.

## Actor input object example

```json
{
  "searchQueries": [
    "Sanitär"
  ],
  "locations": [
    "Zürich"
  ],
  "enrichWebsite": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "searchQueries": [
        "Sanitär"
    ],
    "locations": [
        "Zürich"
    ],
    "enrichWebsite": false,
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("firsthand/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 = {
    "searchQueries": ["Sanitär"],
    "locations": ["Zürich"],
    "enrichWebsite": False,
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("firsthand/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 '{
  "searchQueries": [
    "Sanitär"
  ],
  "locations": [
    "Zürich"
  ],
  "enrichWebsite": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call firsthand/local-ch-scraper --silent --output-dataset

```

## MCP server setup

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