# Migros (Switzerland) — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse Migros' product catalog to find items by name or category, view detailed product information, and discover current promotional offers. Get everything you need to shop smarter at Switzerland's leading supermarket.

**Category:** Food & Dining | **Website:** [migros.ch/](https://migros.ch/) | **Docs:** [parse.bot/marketplace/412c0bae-ab7d-4639-8c21-c59e566d6f0f/migros-ch-api](https://parse.bot/marketplace/412c0bae-ab7d-4639-8c21-c59e566d6f0f/migros-ch-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get categories

Get top-level product categories for the Migros store. Returns a static list of main categories with their IDs, names, and slugs. Use the returned category IDs as input to get_products_by_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get offers

Fetch current promotional offers. Returns promoted products with discount badges, promotion date ranges, weekend promotions, and upcoming promotions. Pagination is page-based (0-indexed). Each product includes promotion pricing alongside regular pricing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of items per page |
| `page` | integer | No | Page number (0-based) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/get-offers \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### Get product details

Fetch comprehensive details for a single product by its Migros ID. Includes nutritional values table, ingredients, allergens, labels, carbon footprint rating, customer reviews rating, and full pricing. Returns input_not_found when the product ID does not match any product.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Migros product ID (e.g. '204003200000') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/get-product-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### Get products by category

List products in a specific category by category ID. Returns product cards, subcategories with children for further navigation, and available filter options. Pagination is offset-based. Category IDs come from get_categories or from breadcrumb fields on product objects.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Category ID from get_categories (e.g. '7494732' for Fruits & vegetables) |
| `limit` | integer | No | Maximum number of results to return |
| `offset` | integer | No | Number of results to skip for pagination |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/get-products-by-category \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"category_id":"<string>","limit":"<integer>","offset":"<integer>"}'
```

### Search products

Full-text search over the Migros product catalog. Returns product cards with name, price, brand, images, and category breadcrumb. Pagination is offset-based via the offset parameter. Each product includes a migrosId suitable for fetching full details via get_product_details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return |
| `offset` | integer | No | Number of results to skip for pagination |
| `query` | string | Yes | Search keyword (e.g. 'milk', 'bread', 'chocolate') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/migros-switzerland/search-products \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.