{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktguru & Gazetki Leaflet Offers Scraper (DE, AT, PL)",
    "description": "Weekly supermarket leaflet offers (Prospekte, gazetki) from marktguru.de, marktguru.at and gazetkowo.pl: Lidl, Aldi, REWE, Billa, Biedronka and 300+ chains. Price, regular price, discount, unit price, brand, validity, leaflet page, by postal code.",
    "version": "1.0",
    "x-build-id": "qhbCgX8R1hAwqNogY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trev0n~marktguru-gazetki-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trev0n-marktguru-gazetki-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/trev0n~marktguru-gazetki-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trev0n-marktguru-gazetki-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/trev0n~marktguru-gazetki-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trev0n-marktguru-gazetki-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": {
          "country": {
            "title": "🌍 Country",
            "enum": [
              "DE",
              "AT",
              "PL"
            ],
            "type": "string",
            "description": "Which market to scrape: Germany (marktguru.de), Austria (marktguru.at) or Poland (gazetkowo.pl). Links in Start URLs are always scraped from their own site, whatever this is set to.",
            "default": "DE"
          },
          "searchTerms": {
            "title": "🔍 Products to search",
            "type": "array",
            "description": "Product keywords searched across every leaflet, e.g. \"Butter\", \"Kaffee\", \"kawa\", \"piwo\". Combine with Retailers to search only those chains.",
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "🏪 Retailers",
            "type": "array",
            "description": "Chain names, e.g. \"Lidl\", \"REWE\", \"Aldi Süd\", \"Billa\", \"Biedronka\", \"Kaufland\". Alone: every current offer of each chain. With products to search: only that chain's hits. \"Aldi\" matches both Aldi Nord and Aldi Süd.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "🏷️ Brands",
            "type": "array",
            "description": "Brand names, e.g. \"Milka\", \"Coca-Cola\", \"Jacobs\". Germany/Austria: every offer of the brand across all chains. Poland: the brand is searched as a keyword.",
            "items": {
              "type": "string"
            }
          },
          "allRetailers": {
            "title": "🛒 All retailers (whole market)",
            "type": "boolean",
            "description": "Scrape every current offer of every chain for the postal code (Germany/Austria) or the whole Polish market (~16 000 offers). Set Max items to 0 for everything.",
            "default": false
          },
          "postalCode": {
            "title": "📍 Postal code",
            "type": "string",
            "description": "Offers are regional. Germany: 5 digits (default 10115 Berlin). Austria: 4 digits (default 1010 Vienna). Poland: 00-001 format (default Warsaw)."
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Optional links: marktguru retailer (/r/lidl), brand (/b/milka), search (/search/butter), offer (/offers/…) or leaflet (/leaflets/…); gazetkowo retailer (/sieci-handlowe/biedronka), search (/wyszukaj/kawa) or leaflet (/gazetki-promocyjne/…).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputType": {
            "title": "📦 What to output",
            "enum": [
              "offers",
              "leaflets",
              "offersAndLeaflets"
            ],
            "type": "string",
            "description": "Offers only, leaflets only (title, validity, page count, cover and page images), or both.",
            "default": "offers"
          },
          "includePageImages": {
            "title": "🖼️ Include every leaflet page image",
            "type": "boolean",
            "description": "Leaflet records also list the image URL of every page (not only the cover).",
            "default": false
          },
          "includeOfferDetails": {
            "title": "🧾 Add category to retailer offers (DE/AT)",
            "type": "boolean",
            "description": "Germany/Austria retailer and brand lists come without a product category; this reads each offer once more to add it. Slower. Search results and Polish offers already have their category.",
            "default": false
          },
          "validity": {
            "title": "📅 Validity",
            "enum": [
              "currentAndUpcoming",
              "current",
              "upcoming",
              "all"
            ],
            "type": "string",
            "description": "Keep offers valid now, starting later, both, or every offer the site still lists.",
            "default": "currentAndUpcoming"
          },
          "minDiscountPercent": {
            "title": "💸 Minimum discount %",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Keep only offers discounted at least this much against the regular price (0 = no filter). Offers without a regular price are dropped when this is set.",
            "default": 0
          },
          "maxPrice": {
            "title": "💶 Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only offers at or under this price in EUR / PLN (0 = no filter).",
            "default": 0
          },
          "maxItems": {
            "title": "🔢 Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum records per run (0 = unlimited).",
            "default": 200
          },
          "maxConcurrency": {
            "title": "⚡ Max concurrency",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Parallel requests.",
            "default": 6
          },
          "compact": {
            "title": "🗜️ Compact output",
            "type": "boolean",
            "description": "Only the key fields (retailer, title, brand, prices, discount, validity, link).",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Drop empty fields",
            "type": "boolean",
            "description": "Remove null and empty fields from every record.",
            "default": false
          },
          "incrementalMode": {
            "title": "🔁 Only new offers since last run",
            "type": "boolean",
            "description": "Remember what earlier runs returned and output only new, changed or reappeared offers. Ideal for scheduled runs.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 Memory key",
            "type": "string",
            "description": "Name of the memory for incremental mode. Leave empty to derive it from the search settings."
          },
          "emitUnchanged": {
            "title": "Output unchanged offers too",
            "type": "boolean",
            "description": "In incremental mode, also output offers seen before (tagged UNCHANGED).",
            "default": false
          },
          "emitExpired": {
            "title": "Output expired offers",
            "type": "boolean",
            "description": "In incremental mode, also output offers that disappeared since the last run (tagged EXPIRED).",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a JSON summary of new offers here after each run."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Send new offers to Telegram (together with chat ID)."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Telegram chat that receives the alerts."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Send new offers to a Discord channel."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Send new offers to a Slack channel."
          },
          "notifyOnlyChanges": {
            "title": "Alert only when something changed",
            "type": "boolean",
            "description": "Skip the alert when a run found nothing new.",
            "default": true
          },
          "notificationLimit": {
            "title": "Offers per alert",
            "minimum": 1,
            "type": "integer",
            "description": "How many offers an alert lists before \"…and N more\".",
            "default": 10
          },
          "includeRunSummary": {
            "title": "Run summary in webhook",
            "type": "boolean",
            "description": "Add the run's counts to the webhook payload.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy",
            "type": "object",
            "description": "Not needed — the sites answer without a proxy. Turn on Apify Proxy only if you see blocked requests.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}