{
  "openapi": "3.0.1",
  "info": {
    "title": "REWE.de Scraper - Prices, Offers & Postal-Code Matching",
    "description": "Scrape REWE Germany (rewe.de) grocery products: current price, was-price and discount when genuinely on offer, brand, category, price per unit, images and tags. Prices match a real postal code you choose. Search keywords or paste product/listing links.",
    "version": "1.0",
    "x-build-id": "ur9BL7pgBKXssPXuW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~rewe-de-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-rewe-de-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/abotapi~rewe-de-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-rewe-de-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/abotapi~rewe-de-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-rewe-de-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",
        "required": [
          "mode",
          "zipCode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "'search' finds products by keyword and/or REWE's own category, brand, and attribute filters. 'url' scrapes any product or listing page URL you paste.",
            "default": "search"
          },
          "zipCode": {
            "title": "Postal code (PLZ)",
            "pattern": "^[0-9]{5}$",
            "type": "string",
            "description": "German postal code REWE uses to match your local market. Prices, offers and availability are scoped to it, in every mode - and it also decides which products the market stocks, so it changes the result set, not just the prices. Five digits, e.g. 50667 for Cologne. A code with no REWE market stops the run rather than returning products with no prices.",
            "default": "50667"
          },
          "searchTerm": {
            "title": "Search keyword",
            "type": "string",
            "description": "Free-text keyword, e.g. 'milch' or 'kaffee'. Leave empty to browse a whole category with the field below."
          },
          "categorySlug": {
            "title": "Category slug",
            "type": "string",
            "description": "Category name or REWE's own token, e.g. 'Milch' or 'milch'. Names are matched against REWE's live category list; a name that matches nothing stops the run with a clear error and suggestions. Combine with a keyword to search within a category, or leave the keyword empty to browse the whole category. Search mode only: URL mode reads this from the link you paste."
          },
          "urls": {
            "title": "URLs to scrape",
            "uniqueItems": true,
            "type": "array",
            "description": "Paste REWE product pages (.../p/<slug>/<id>), category pages (.../shop/c/<slug>/), search pages (.../suche/produkte?search=<term>) or listing links (a URL with `search=` or `categorySlug=`, optionally `page`, `objectsPerPage` (1-100), `brand`, `attribute` and `sorting` = RELEVANCE_DESC, TOPSELLER_DESC, PRICE_ASC, PRICE_DESC or NAME_ASC). Left untouched, URL mode scrapes one example of each shape. Search-mode fields are ignored here. The fields in the Filters section still apply; a link's own `brand=` or `attribute=` wins over them.",
            "default": [
              "https://www.rewe.de/shop/api/products?search=milch&page=1",
              "https://www.rewe.de/shop/api/products?search=milch&page=2&objectsPerPage=30",
              "https://www.rewe.de/shop/api/products?categorySlug=milch&page=2&objectsPerPage=5",
              "https://www.rewe.de/shop/api/products?categorySlug=milch&search=hafer&objectsPerPage=3",
              "https://www.rewe.de/shop/api/products?search=*&page=1&objectsPerPage=3&sorting=PRICE_ASC",
              "https://www.rewe.de/shop/api/products?search=milch&brand=Alnatura&attribute=organic&objectsPerPage=5",
              "https://www.rewe.de/shop/p/weihenstephan-h-milch-3-5-1l/677067",
              "https://www.rewe.de/shop/c/milch/",
              "https://www.rewe.de/suche/produkte?search=milch"
            ],
            "items": {
              "type": "string"
            }
          },
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Only return products from this brand, e.g. 'Lindt' (matched against REWE's live brand list, case-insensitive; a brand that matches nothing stops the run with a clear error). Leave empty for all brands. Applies in BOTH search mode and URL mode: the filter is also sent with a pasted category or search link."
          },
          "attribute": {
            "title": "Dietary / sourcing filter",
            "enum": [
              "",
              "ORGANIC",
              "VEGAN",
              "REGIONAL",
              "NEW",
              "CHILLED",
              "FROZEN",
              "HASLOYALTYBONUS"
            ],
            "type": "string",
            "description": "REWE's own quick filter -- narrows to products carrying that tag. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it.",
            "default": ""
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "type": "number",
            "description": "Only return products priced at or above this amount, in euros. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "type": "number",
            "description": "Only return products priced at or below this amount, in euros. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE_DESC",
              "TOPSELLER_DESC",
              "PRICE_ASC",
              "PRICE_DESC",
              "NAME_ASC"
            ],
            "type": "string",
            "description": "Order of the results. Relevance is the default. Price and name sorts are done by REWE itself, so they stay correct across pages. In URL mode a pasted link's own sorting wins.",
            "default": "RELEVANCE_DESC"
          },
          "campaignsOnly": {
            "title": "Offers only",
            "type": "boolean",
            "description": "Only return products currently on offer. REWE has no server-side filter for this, so the run reads the normal result pages and drops the rest (bounded by Max pages and the empty-page guard); combine it with a keyword or category.",
            "default": false
          },
          "inStockOnly": {
            "title": "Available products only",
            "type": "boolean",
            "description": "Only return products that are orderable at your market. REWE has no server-side filter for this, so the run reads the normal result pages and drops the rest (bounded by Max pages and the empty-page guard).",
            "default": false
          },
          "marketId": {
            "title": "REWE market id (advanced)",
            "type": "string",
            "description": "Exact REWE market id. When set it overrides the postal code for prices and availability."
          },
          "searchTerms": {
            "title": "More search keywords",
            "type": "array",
            "description": "Optional extra keywords searched one after another, in addition to the Search keyword. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "productIds": {
            "title": "Shopping list: product ids",
            "type": "array",
            "description": "Optional. REWE product ids (the number at the end of a product link) to price directly. When set, search fields are ignored in search mode. Rows get quantity and lineTotal.",
            "items": {
              "type": "string"
            }
          },
          "quantities": {
            "title": "Shopping list: quantities",
            "type": "array",
            "description": "Quantities parallel to the product ids (1 each if omitted). Adds lineTotal = price x quantity.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch product detail",
            "type": "boolean",
            "description": "Adds the product description and ingredient statement from the product page, when REWE's own page carries them. Billed once per product only when the page delivers a description or ingredient statement; products where REWE's page has neither are not charged. Current price, was-price/discount, brand, category and images are already included without this toggle.",
            "default": false
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Only the core fields (id, name, brand, url, prices, availability).",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Drop fields that are empty (null, empty text or empty list) from each row.",
            "default": false
          },
          "descriptionMaxLength": {
            "title": "Description max length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate the description (Fetch product detail) to this many characters. 0 = no truncation.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many result pages per search/URL entry. Leave empty for the built-in ceiling of 500 pages per search/URL entry -- the run also stops at Max products total."
          },
          "maxItems": {
            "title": "Max products total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on total products returned across every search/URL entry. 0 = unlimited (still bounded by Max pages per search). Values above 1,000,000 are clamped to 1,000,000.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The default uses Apify's automatic proxy pool, which this site serves reliably. If your plan includes residential proxies they are used automatically as a backup; you can also pick a group or supply your own proxy URLs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run (delta)",
            "type": "string",
            "description": "Optional. ID of a previous run of this actor (or a dataset ID). Products already in that dataset are skipped, so this run returns only NEW products (a delta). Combine both runs' datasets for the full set. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring of the same search/URLs. The first run returns all matching products as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when its price, was-price, unit price, availability, name, brand, tags or category path change (reported in changedFields); image links, the scrapedAt timestamp and anything listed under \"Ignore fields\" below never count as a change. Turn on \"Emit unchanged\" or \"Emit expired\" only when you also want those products returned (and billed). State is kept separately per distinct search/filter/postal-code setup (or by State key below).",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently-configured runs. Leave empty to let the actor derive a key automatically from your mode/postal code/search/filter/detail settings -- different searches then never mix state with each other."
          },
          "emitUnchanged": {
            "title": "Emit unchanged products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns -- and bills -- extra rows you already have, so leave it off unless you specifically want the full snapshot every run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search -- not when Max products/Max pages capped it, a connection problem stopped it early, or Resume was used. This returns -- and bills -- extra synthetic rows.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Optional. Field names (for example tags) whose changes should NOT turn a product into UPDATED. Image links and scrapedAt are always ignored. Ignored fields stay in the output; they are only left out of change detection and changedFields.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify -> Settings -> Integrations, then select it here. The connector receives a condensed, human-readable summary per item (title + key fields), not the full JSON; the complete record stays in the dataset. Leave empty to skip. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}