{
  "openapi": "3.0.1",
  "info": {
    "title": "REMA 1000 Scraper 💰 $2/1K — Danish Grocery Products & Prices",
    "description": "Scrape rema1000.dk — Denmark's largest discount-grocery chain with 3900 SKUs. Search products by ingredient, monitor tilbud price changes and track weekly basket costs over time. Built for grocery planning, price alerts and retail price monitoring.",
    "version": "0.6",
    "x-build-id": "n60OuGyaGFsD8T4Mo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~rema1000-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-rema1000-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/blackfalcondata~rema1000-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-rema1000-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/blackfalcondata~rema1000-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-rema1000-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": {
          "productIds": {
            "title": "🛍️ Basket — product IDs",
            "type": "array",
            "description": "Track a specific list of products by REMA product ID (e.g. [100004, 60214]). Combine with Incremental Mode to monitor your weekly shopping basket — only get rows back when something changes (price, campaign, delisting). When using Incremental Mode you MUST also set 🔑 State Key (e.g. \"my-rema-basket\") so multiple baskets don't share state.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "productUrls": {
            "title": "🔗 Basket — product URLs",
            "type": "array",
            "description": "Same as productIds but accepts full rema1000.dk product URLs — paste straight from your browser. URLs are merged with productIds.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "quantities": {
            "title": "🔢 Basket — quantities per product",
            "description": "Optional per-product counts for basket mode. Two accepted forms:\n• Object map: `{\"200313\": 12, \"21464\": 6}` (compact, preferred for the Console editor)\n• Array of pairs: `[{\"id\": 200313, \"qty\": 12}, {\"id\": 21464, \"qty\": 6}]` (useful from Make / n8n / Zapier flows)\nDrives subtotal, pant, and max-quantity (over-cap) campaign math. Default qty=1 per product when omitted. Ignored outside basket mode.",
            "default": {}
          },
          "query": {
            "title": "🔍 Search query",
            "type": "string",
            "description": "Keyword search across the REMA catalog (e.g. \"mælk\", \"økologisk\", \"pasta\"). Searches product names, brands, and category terms (NOT ingredients — use ingredientFilter for that). Mutually exclusive with productIds — if both are set, productIds wins."
          },
          "sortBy": {
            "title": "↕️ Sort order",
            "enum": [
              "price-asc",
              "price-desc",
              "compare-asc",
              "compare-desc",
              "line-asc",
              "line-desc",
              "savings-desc",
              "discount-desc",
              "name-asc"
            ],
            "type": "string",
            "description": "Optional ordering of the dataset rows before push. Default is source-emit order (department + page for browse, search-relevance for search, basket-input order for basket). Null / missing values always sink to the bottom regardless of direction."
          },
          "ingredientFilter": {
            "title": "🥗 Ingredient filter",
            "type": "string",
            "description": "Case-insensitive substring filter on the ingredient list. Accepts a single ingredient (`\"pistacie\"`) or a JSON array of terms that ALL must appear (`[\"pistacie\", \"hasselnød\"]` finds products containing both). Useful for finding products with a specific ingredient that isn't in the product name — REMA's search doesn't index ingredients, so this filter runs over fetched results. Narrow your scope with `query` or `productIds` first to keep cost down. Only meaningful in basket and search modes."
          },
          "departmentIds": {
            "title": "🛒 Department IDs",
            "type": "array",
            "description": "Limit scraping to specific departments. Leave empty to scrape all 15 departments. IDs: 10 Brød, 20 Frugt & grønt, 30 Kød/fisk/fjerkræ, 40 Køl, 50 Frost, 60 Mejeri, 70 Ost, 80 Kolonial, 90 Drikkevarer, 100 Husholdning, 110 Baby, 120 Pleje, 130 Slik, 140 Kiosk, 160 Nemt & hurtigt.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "campaignsOnly": {
            "title": "🏷️ Campaign / Advertised Only",
            "type": "boolean",
            "description": "Only emit products currently on campaign (tilbud) or in the advertised flyer.",
            "default": false
          },
          "maxResults": {
            "title": "💯 Max Results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum total products (0 = unlimited; full catalog ≈ 3,900).",
            "default": 200
          },
          "compact": {
            "title": "📦 Compact Output",
            "type": "boolean",
            "description": "Drop heavy fields (ingredients text, full nutrition table, image variants, manufacturer block, label objects, price history) and keep only shopping essentials: identity, current price, per-unit price, campaign flags + discount %, basket line totals, lifecycle. Cuts each row from ~2,850 chars to ~650 (77% smaller) — ideal for AI agents, MCP servers, and LLM context windows where you don't need allergen text. Same dataset row count, same billing — just smaller payloads.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental Mode",
            "type": "boolean",
            "description": "Compare against previous run state — emit only NEW / UPDATED / EXPIRED products (price changes, new SKUs, delistings). In Basket mode you MUST also set stateKey. In Search / Browse modes stateKey auto-generates from the scope dimensions.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Stable identifier for incremental tracking. In Basket mode this is REQUIRED — choose a name like \"my-rema-basket\" so multiple baskets don't share state. In Search / Browse mode it auto-generates from your query / departments if left empty."
          },
          "emitUnchanged": {
            "title": "📤 Emit Unchanged",
            "type": "boolean",
            "description": "Include products with no detected change in the output (default: skip).",
            "default": false
          },
          "emitExpired": {
            "title": "🚮 Emit Expired",
            "type": "boolean",
            "description": "Include products that disappeared since the prior run (delisted / out of stock).",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID (e.g. \"-100123456789\"). Required when telegramToken is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL."
          },
          "notificationLimit": {
            "title": "📊 Max Items Per Notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of products included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify Only Changes",
            "type": "boolean",
            "description": "When Incremental Mode is on, only send notifications for products with a lifecycle event (NEW, UPDATED, or EXPIRED). Unchanged products are still pushed to the dataset but don't trigger Telegram/Slack/Discord/WhatsApp alerts.",
            "default": false
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API token. Recipient must have messaged the business number within last 24h."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp Phone Number ID",
            "type": "string",
            "description": "Your WhatsApp Business phone-number ID."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone in E.164 format without + (e.g. \"4512345678\")."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run."
          },
          "webhookHeaders": {
            "title": "📋 Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "descriptionFormat": {
            "title": "Description format",
            "enum": [
              "all",
              "text"
            ],
            "type": "string",
            "description": "Pick a single description representation. `all` keeps the description as-is; `text` returns only the plain-text variant.",
            "default": "all"
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields from output",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.",
            "default": false
          },
          "appConnector": {
            "title": "Send results to Notion (or another connected app)",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog."
          },
          "mcpIssueTeam": {
            "title": "Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
          },
          "startUrls": {
            "title": "🔗 Paste / Direct URLs",
            "type": "array",
            "description": "One or more direct search or listing detail URLs to process. When set, other search filters are ignored.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "📋 Include Full Listing Details",
            "type": "boolean",
            "description": "Fetch the detail page for each listing to retrieve the full description text and contact information. Increases run time and cost. Leave off for a fast, low-cost run.",
            "default": false
          },
          "skipReposts": {
            "title": "🚫 Skip Reposts",
            "type": "boolean",
            "description": "In incremental mode, skip listings that appear to be reposts of a previously-seen expired listing with matching details.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}