# Hornbach Switzerland Scraper — DIY Products, Tools & Prices (`studio-amba/hornbach-ch-scraper`) Actor

Scrapes products from Hornbach.ch (Switzerland) with CHF prices, ratings, stock info and specs. Supports search queries and category URLs.

- **URL**: https://apify.com/studio-amba/hornbach-ch-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 result scrapeds

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?

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

## Hornbach Switzerland Scraper -- DIY Megastore Products & CHF Prices

Scrape products, prices, ratings, stock status, and SKU data from hornbach.ch -- the Swiss storefront of the Hornbach DIY megastore chain. Extracts data from Hornbach's Apollo/GraphQL state for fast, reliable results, with prices in Swiss francs (CHF).

### What is Hornbach Switzerland Scraper?

Hornbach is not your average neighborhood hardware store. It's a warehouse-format DIY chain with massive stores designed for customers tackling serious renovation projects, new builds, and professional contracting work. Hornbach.ch is the Swiss market's dedicated storefront, pricing every product in CHF for local shoppers and contractors.

Hornbach's website uses a modern React frontend with Apollo GraphQL state management. This scraper extracts product data directly from the server-rendered Apollo state embedded in the HTML -- no JavaScript rendering needed on the extraction side (the fetch itself does need to clear an anti-bot wall, see below), which makes parsing fast and reliable once the page is retrieved.

- **Swiss market price benchmarking** -- Compare Hornbach.ch's CHF pricing on building materials, lumber, and tools against other Swiss DIY and hardware retailers
- **Bulk material cost tracking** -- Monitor prices on high-volume items like wood planks, tiles, screws, and bulk paint to optimize procurement timing
- **Power tool competitive analysis** -- Track how Hornbach.ch prices professional-grade power tools from Makita, DeWalt, Bosch Professional, Metabo, and Milwaukee in the Swiss market
- **Garden and outdoor project planning** -- Extract pricing data for garden sheds, terrace materials, fencing, and outdoor equipment for project budgeting
- **Cross-border price comparison** -- Compare Hornbach's Swiss CHF pricing against Hornbach's German, Austrian, or Dutch stores to spot regional pricing differences

### What data does Hornbach Switzerland Scraper extract?

- **Product name** -- Full German-language product title (hornbach.ch's default storefront language)
- **Price & discounts** -- Current price in CHF, original/strike-through price when discounted
- **Brand** -- Manufacturer name (Makita, DeWalt, Bosch Professional, HORNBACH, etc.)
- **Stock availability** -- Online availability status
- **Ratings & reviews** -- Average rating and review count
- **Product image** -- Main product image URL
- **Product URL** -- Direct link on hornbach.ch
- **SKU / Article number** -- Hornbach's internal article number for reference and reordering

### How to scrape Hornbach Switzerland data

| Field | Type | Description |
|-------|------|-------------|
| `searchQuery` | String | Search by keyword -- e.g., `"bohrmaschine"`, `"schrauben"`, `"gartenmoebel"`, `"holz"` |
| `categoryUrl` | String | Direct category URL -- e.g., `https://www.hornbach.ch/de/c/maschinen-werkzeug-werkstatt/S6937/` |
| `maxResults` | Integer | Maximum products to scrape (default: 100, set to 0 for unlimited) |
| `proxyConfiguration` | Object | Apify proxy recommended for reliability |

**Tips:**

- `categoryUrl` overrides `searchQuery` if both are provided
- The search URL pattern is `https://www.hornbach.ch/s/{query}/`
- Category URLs use the pattern `/de/c/{category-slug}/S{id}/` -- this is different from hornbach.de's `/shop/{Category}/S{id}/artikelliste.html` pattern, so category URLs are not interchangeable between the two country sites
- Set `maxResults` to 0 to scrape everything the query or category returns
- Apify proxy is enabled by default with Swiss (CH) geo-targeting; residential proxies may be needed if you encounter blocks

### Output

```json
{
    "name": "Bosch Professional Schlagbohrmaschine GSB 13 RE mit CH Stecker",
    "brand": "Bosch Professional",
    "price": 69.90,
    "currency": "CHF",
    "url": "https://www.hornbach.ch/de/p/bosch-professional-schlagbohrmaschine-gsb-13-re-mit-ch-stecker/6095142/",
    "scrapedAt": "2026-08-27T14:00:00.000Z",
    "imageUrl": "https://media.hornbach.ch/hb/packshot/as.46770364.jpg?dvid=8",
    "rating": 1.5,
    "reviewCount": 2,
    "sku": "6095142_ST",
    "inStock": true
}
```

A building materials example:

```json
{
    "name": "Kuepper Werkbank 1700 x 840 x 600 mm 6 Schubladen 2 Tueren grau",
    "brand": "Kuepper",
    "price": 449.00,
    "currency": "CHF",
    "url": "https://www.hornbach.ch/de/p/kuepper-werkbank-1700x840x600-6-schubladen-2-tueren-grau/xxxxxxx/",
    "scrapedAt": "2026-08-27T14:00:00.000Z",
    "imageUrl": "https://media.hornbach.ch/hb/packshot/example.jpg",
    "sku": "xxxxxxx_ST",
    "inStock": true
}
```

### How much does it cost?

Hornbach Switzerland Scraper uses direct HTTP requests with Apollo state extraction, falling back to a rendered fetch only when the anti-bot wall blocks the direct attempt.

| Scenario | Products | Est. cost |
|----------|----------|-----------|
| Quick search | 100 | ~$0.20 |
| Category deep dive | 500 | ~$0.60 |
| Department inventory | 1,000 | ~$1.10 |
| Full catalog section | 5,000 | ~$4.50 |

Proxy costs may apply depending on your Apify plan and proxy configuration. Cost estimate is per result scraped, and usage cost only settles once a run reports SUCCEEDED -- checking cost while a run is still in progress will show a number far below the final total.

### Can I integrate?

- **JSON, CSV, Excel** -- Direct dataset download
- **Google Sheets** -- Auto-sync via Apify integration
- **Webhooks** -- Trigger your pipeline on completion
- **API** -- Programmatic access (see below)
- **Zapier / Make** -- 5,000+ app integrations
- **Amazon S3, Google Cloud Storage** -- Cloud storage push

### Can I use it as an API?

**Python:**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("studio-amba/hornbach-ch-scraper").call(run_input={
    "searchQuery": "holz",
    "maxResults": 200,
    "proxyConfiguration": {"useApifyProxy": True}
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['name']} - CHF {item['price']}")
```

**JavaScript:**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('studio-amba/hornbach-ch-scraper').call({
    searchQuery: 'holz',
    maxResults: 200,
    proxyConfiguration: { useApifyProxy: true },
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### FAQ

**Does this work for Hornbach in other countries?**
This scraper targets hornbach.ch (Switzerland) specifically, including its CHF pricing and Swiss-specific category URL structure. Hornbach operates a separate storefront for each country it serves (Germany, Netherlands, Austria, and others), each with its own domain and, in some cases, its own URL conventions. Use Studio AMBA's dedicated hornbach.de scraper for the German store.

**What language is the product data in?**
Hornbach.ch serves German (`de`) by default -- product titles, brand names, and category labels are in German, the same as hornbach.de.

**Why is the currency CHF and not EUR?**
Switzerland is not in the EU or eurozone, so hornbach.ch prices everything in Swiss francs (CHF). This scraper reads the currency directly from the site's own price data rather than assuming a fixed value.

**How does the Apollo state extraction work?**
Hornbach's website server-renders product listings using React with Apollo Client. The full Apollo state (including product data, prices, ratings) is embedded in the HTML as `window.__APOLLO_STATE__`. The scraper parses this JSON directly, which is faster and more reliable than scraping HTML elements.

**What if the Apollo state is not found?**
The scraper includes an HTML fallback parser that extracts product data from DOM elements (product tiles, price elements, brand labels). This covers cases where Hornbach changes their rendering approach.

**Why does this scraper need Bright Data as a fallback?**
hornbach.ch sits behind the same F5/Shape "Client Challenge" JavaScript anti-bot wall as hornbach.de. Plain HTTP requests, even through residential proxies, are served a challenge page with no product data. The scraper first tries a cheap residential-proxy fetch, then falls back to Bright Data's Web Unlocker with JS rendering, which solves the challenge and returns the full page.

**Can I track Hornbach's weekly promotions?**
Yes. Products with active promotions will show both `price` (current) and `originalPrice` (before discount). Schedule the actor to run weekly to track promotional patterns over time.

### Limitations

- Targets hornbach.ch (Switzerland) only -- category URLs are not interchangeable with hornbach.de
- Data is extracted from listing-level Apollo state, so detailed specs and descriptions are not included (these would require visiting individual product pages)
- If Hornbach changes their Apollo state structure or switches rendering approaches, extraction may be temporarily affected
- Pagination stops when fewer than 20 products are found on a page (heuristic for detecting the last page)
- Anti-bot protection means most runs need the Bright Data fallback layer, which is included and requires no setup on your part

### Other DIY & home improvement scrapers

Compare Hornbach Switzerland with other European DIY retailers:

- **[Hornbach Scraper](https://apify.com/studio-amba/hornbach-scraper)** -- Germany, the same chain's home market
- **[OBI Scraper](https://apify.com/studio-amba/obi-scraper)** -- Germany's #1 DIY chain by store count
- **[Bauhaus Scraper](https://apify.com/studio-amba/bauhaus-scraper)** -- German/EU professional hardware & DIY
- **[Toom Scraper](https://apify.com/studio-amba/toom-scraper)** -- Germany, REWE group DIY chain
- **[GAMMA Scraper](https://apify.com/studio-amba/gamma-scraper)** -- Belgium, Intergamma group
- **[Brico Scraper](https://apify.com/studio-amba/brico-scraper)** -- Belgium's largest DIY chain
- **[Praxis Scraper](https://apify.com/studio-amba/praxis-scraper)** -- Netherlands, Maxeda DIY Group
- **[Leroy Merlin Scraper](https://apify.com/studio-amba/leroymerlin-scraper)** -- France's #1 DIY retailer
- **[Castorama Scraper](https://apify.com/studio-amba/castorama-scraper)** -- France, Kingfisher group

### Your feedback

Found a bug? Need additional data fields? Questions about Hornbach Switzerland's data structure? Open an issue on the actor's page or reach out through Apify.

# Actor input Schema

## `searchQuery` (type: `string`):

Search term to look up on Hornbach.ch (e.g., 'bohrmaschine', 'schrauben', 'gartenmöbel')

## `categoryUrl` (type: `string`):

Direct URL to a Hornbach.ch category or search results page. Overrides searchQuery if both are provided.

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

Maximum number of products to scrape. Set to 0 for unlimited.

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

Apify proxy settings. Use Apify residential proxies if you get blocked.

## `brightDataApiKey` (type: `string`):

Optional: your own Bright Data API key for the Web Unlocker zone. Used as a fallback when Hornbach's anti-bot challenge blocks residential proxies. If not set, the actor uses its built-in key.

## Actor input object example

```json
{
  "searchQuery": "bohrmaschine",
  "categoryUrl": "https://www.hornbach.ch/de/c/maschinen-werkzeug-werkstatt/S6937/",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CH"
  }
}
```

# 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 = {
    "searchQuery": "bohrmaschine",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CH"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/hornbach-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 = {
    "searchQuery": "bohrmaschine",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CH",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/hornbach-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 '{
  "searchQuery": "bohrmaschine",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CH"
  }
}' |
apify call studio-amba/hornbach-ch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/hornbach-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/1ii14HegwocbyUdRM/builds/fdkdNEp6sCrHZ5S2c/openapi.json
