# Migros Product Search Scraper (`stealth_mode/migros-product-search-scraper`) Actor

Scrape product listings from Migros.ch with precision. Collect brand names, descriptions, images, pricing, availability, and 17+ structured fields per product — perfect for price monitoring, market research, and retail analytics.

- **URL**: https://apify.com/stealth\_mode/migros-product-search-scraper.md
- **Developed by:** [Stealth mode](https://apify.com/stealth_mode) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Migros Product Search Scraper: Extract Swiss Retail Data Efficiently

---

### What Is Migros.ch?

Migros is Switzerland's largest retail grocery chain, operating an extensive online store at migros.ch. The platform features thousands of products across categories like dairy, fresh produce, convenience foods, beverages, and household items. Manually gathering product data from search results is tedious and error-prone — the **Migros Product Search Scraper** automates extraction of comprehensive product intelligence from category pages and search results.

---

### Overview

The **Migros Product Search Scraper** extracts detailed product records from Migros.ch category and search pages, converting retail listings into clean, structured JSON. It is built for:

- **Price monitors** tracking Migros product costs and competitors
- **Market researchers** analyzing Swiss grocery supply and pricing trends
- **Retailers** benchmarking against Migros offerings
- **Data aggregators** building product databases for comparison platforms
- **E-commerce analysts** monitoring stock availability and product range changes

Key strengths include high volume collection (up to 200 items per URL), automatic failure handling, and comprehensive product metadata with images and availability status.

---

### Input Format

The scraper accepts a JSON configuration object:

```json
{
  "urls": [
    "https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-food?page=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 200
}
````

| Field | Description | Example |
|---|---|---|
| `urls` | Array of Migros product search or category page URLs to scrape | `["https://www.migros.ch/en/category/dairy-eggs...?page=2"]` |
| `max_items_per_url` | Maximum number of products extracted per URL (1–200) | `200` |
| `ignore_url_failures` | If `true`, skips failed URLs instead of terminating the run | `true` |

> **Best practice:** Use paginated category URLs (e.g., `?page=1`, `?page=2`) to systematically collect large product sets. The scraper will extract up to the specified limit per page.

***

### Output Format

**Sample output**

```json
{
  "brand": "Kiri",
  "breadcrumb": [
    {
      "id": "7494731",
      "name": "Dairy, eggs & fresh convenience food",
      "slugs": [
        "dairy-eggs-fresh-convenience-foo"
      ]
    },
    {
      "id": "7494752",
      "name": "Cheese",
      "slugs": [
        "dairy-eggs-fresh-convenience-foo",
        "cheese"
      ]
    },
    {
      "id": "7494878",
      "name": "Snacks, appetisers & cheese for kids",
      "slugs": [
        "dairy-eggs-fresh-convenience-foo",
        "cheese",
        "snacks-appetisers-cheese-for-kid"
      ]
    },
    {
      "id": "7495342",
      "name": "Cheeses for kids",
      "slugs": [
        "dairy-eggs-fresh-convenience-foo",
        "cheese",
        "snacks-appetisers-cheese-for-kid",
        "cheeses-for-kids"
      ]
    }
  ],
  "description": "Kiri · Cheese Spread · Kiri, the cheese for little epicureans.",
  "gtins": [
    "3073781131888"
  ],
  "image_transparent": {
    "cdn": "rokka",
    "url": "https://image.migros.ch/d/{stack}/32685f6ee56458e2668534ff701816ea8f486def/kiri-cheese-spread.png"
  },
  "images": [
    {
      "cdn": "rokka",
      "url": "https://image.migros.ch/d/{stack}/o-af-1-t.clr-fff/32685f6ee56458e2668534ff701816ea8f486def/kiri-cheese-spread.jpg"
    }
  ],
  "is_consignment_product": false,
  "is_mgb_compatible": true,
  "migros_id": "212802100000",
  "migros_online_id": "5249206",
  "name": "Cheese Spread",
  "offer": {
    "channel": {
      "offer_type": "OFFLINE",
      "region": "national"
    },
    "display_price": true,
    "is_new_offer": false,
    "is_not_morning_deliverable": false,
    "is_variable_weight": false,
    "max_orderable_quantity_v2": 96,
    "pictos": [
      {
        "description": "cold",
        "image_path": "https://www-leshop-ch-cld-res.cloudinary.com/image/upload/{stack}/v1679483166/labels/fresh",
        "type": "FRESHNESS"
      }
    ],
    "price": {
      "advertised_display_value": "3.10",
      "advertised_value": 3.1,
      "display_unit_price": true,
      "effective_display_value": "3.10",
      "effective_value": 3.1,
      "multiplier": 1,
      "unit_price": {
        "unit": "100g",
        "value": 2.15
      }
    },
    "quantity": "144g",
    "quantity_price": "2.15/100g",
    "type": "STANDARD"
  },
  "product_availability": "ONLINE_AND_INSTORE",
  "product_range": "STANDARD",
  "product_urls": "https://www.migros.ch/en/product/212802100000",
  "title": "Kiri · Cheese Spread",
  "uid": 100000608,
  "versioning": null,
  "from_url": "https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-foo?page=2"
}
```

Each scraped product returns a detailed record with 17 fields:

#### Product Identification

| Field | Meaning | Example |
|---|---|---|
| `Migros ID` | Unique internal product identifier within Migros system | `12345678` |
| `Migros Online ID` | Distinct ID for the online store version | `98765432` |
| `UID` | Universal identifier (often matches GTIN) | `7611234567890` |
| `Name` | Official product name as displayed on Migros | `Emmental AOP Cheese 250g` |
| `Title` | Alternative or display title for the product | `Premium Swiss Cheese` |
| `Brand` | Manufacturer or brand name | `Emmental Switzerland AG` |

#### Product Details & Classification

| Field | Meaning | Example |
|---|---|---|
| `Product Range` | Category or product line classification | `Dairy & Cheese` |
| `Breadcrumb` | Navigation hierarchy on Migros site | `Home > Grocery > Dairy > Cheese` |
| `Description` | Full product description with ingredients, usage, etc. | `Aged Emmental cheese from the Alps...` |
| `GTINs` | Global Trade Item Numbers (barcodes) for variants | `["7611234567890", "7611234567891"]` |

#### Media & Visuals

| Field | Meaning | Example |
|---|---|---|
| `Images` | Array of product image URLs (standard quality) | `["https://image.migros.ch/product1.jpg", ...]` |
| `Image Transparent` | URL of product image with transparent background | `"https://image.migros.ch/product1_transparent.png"` |

#### Pricing & Availability

| Field | Meaning | Example |
|---|---|---|
| `Offer` | Current price, promotion, or discount information | `"CHF 12.90"` or `"CHF 12.90 → CHF 10.90"` |
| `Product Availability` | Stock status and availability at Migros locations | `"In stock"`, `"Limited availability"`, or `"Out of stock"` |

#### Product Attributes & Compatibility

| Field | Meaning | Example |
|---|---|---|
| `Product URLs` | Direct link(s) to the product detail page on Migros | `"https://www.migros.ch/en/products/12345678"` |
| `Is Consignment Product` | Indicates if product is sold on consignment (third-party supplier) | `false` or `true` |
| `Is MGB Compatible` | Migros Grocery Basket (loyalty program) compatibility flag | `true` |
| `Versioning` | Version or variant identifier (e.g., size, color, formula) | `"v2"` or `"250g"` |

***

### How to Use

1. **Find category or search URLs** — Navigate to Migros.ch, select a product category or search term, and copy the URL. Pagination URLs are supported.
   - Example: `https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-food?page=1`
2. **Configure input** — Paste one or more URLs into the `urls` array.
3. **Set collection limits** — Choose `max_items_per_url` (e.g., `200` for large product sets or `50` for faster runs).
4. **Enable error handling** — Keep `ignore_url_failures: true` for uninterrupted batch scraping.
5. **Start the run** — Trigger the scraper and monitor progress.
6. **Export data** — Download results in JSON, CSV, or Excel format for analysis or integration.

**Tips for success:**

- Use language-specific URLs: `/en/` for English, `/de/` for German, `/fr/` for French results
- Paginate through results incrementally to collect large inventories
- Set `max_items_per_url` based on your data needs; lower values run faster
- Images are typically available in multiple sizes; check the URLs in the output

***

### Use Cases & Business Value

- **Price monitoring:** Track Migros product prices weekly or daily and alert on drops
- **Competitive analysis:** Compare your product offerings against Migros stock and positioning
- **Market research:** Analyze brand presence, product variants, and category depth in Swiss retail
- **Inventory planning:** Monitor availability trends for supply chain decisions
- **Data enrichment:** Integrate Migros product metadata into your own product database

Automated product scraping cuts manual research time from days to minutes, enabling real-time retail insights and faster business decisions.

***

### Conclusion

The **Migros Product Search Scraper** is a powerful tool for anyone needing structured product data from Switzerland's leading grocery retailer. With 17+ fields per product and support for high-volume collection, it streamlines market research, price monitoring, and competitive analysis. Start scraping Migros product data today and unlock retail intelligence at scale.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the product search list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped.

## `max_items_per_url` (type: `integer`):

The maximum number of items to scrape per URL.

## Actor input object example

```json
{
  "urls": [
    "https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-foo?page=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}
```

# 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 = {
    "urls": [
        "https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-foo?page=2"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("stealth_mode/migros-product-search-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 = {
    "urls": ["https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-foo?page=2"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("stealth_mode/migros-product-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.migros.ch/en/category/dairy-eggs-fresh-convenience-foo?page=2"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20
}' |
apify call stealth_mode/migros-product-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=stealth_mode/migros-product-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Migros Product Search Scraper",
        "description": "Scrape product listings from Migros.ch with precision. Collect brand names, descriptions, images, pricing, availability, and 17+ structured fields per product — perfect for price monitoring, market research, and retail analytics.",
        "version": "0.0",
        "x-build-id": "6pJiIiPeT15us7NuE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/stealth_mode~migros-product-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-stealth_mode-migros-product-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/stealth_mode~migros-product-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-stealth_mode-migros-product-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/stealth_mode~migros-product-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-stealth_mode-migros-product-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs of the product search list urls to scrape",
                        "type": "array",
                        "description": "Add the URLs of the product search list urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ignore_url_failures": {
                        "title": "Continue running even if some URLs fail to be scraped",
                        "type": "boolean",
                        "description": "If true, the scraper will continue running even if some URLs fail to be scraped."
                    },
                    "max_items_per_url": {
                        "title": "Max items per URL",
                        "type": "integer",
                        "description": "The maximum number of items to scrape per URL."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
