{
  "openapi": "3.0.1",
  "info": {
    "title": "Nemlig Scraper - Danish Online Grocery Products & Prices",
    "description": "Scrape Nemlig grocery products from nemlig.com as structured JSON with shelf prices, current offers, per-unit comparison prices, categories, product images, ingredients, nutrition details and basket totals for Danish grocery price monitoring.",
    "version": "0.1",
    "x-build-id": "H5A19MVauoNUg1QpA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~nemlig-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-nemlig-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~nemlig-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-nemlig-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~nemlig-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-nemlig-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 or URLs",
            "type": "array",
            "description": "Track a specific shopping list by Nemlig product ID or product URL (e.g. [\"103368\", \"701012\", \"https://www.nemlig.com/minimaelk-0-4-oeko-103368\"]). Returns just those products with per-line basket economics. Pair with Quantities to weight each item.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "categoryUrls": {
            "title": "Category/listing URLs",
            "type": "array",
            "description": "Paste Nemlig category or listing URLs such as https://www.nemlig.com/vin?sortorder=price. The scraper uses the URL path as a category hint and honors sortorder when present.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "category": {
            "title": "Category filter",
            "enum": [
              "all",
              "Tørvarer",
              "Drikke",
              "Køl",
              "Kød og fisk",
              "Nonfood",
              "Mejeri",
              "Pleje",
              "Vin og spiritus",
              "Brød",
              "Konfekture",
              "Frost",
              "Frugt og grønt",
              "Blomster",
              "Husholdning",
              "Baby og børn",
              "Dyremad og tilbehør",
              "Kiosk",
              "Ydelser",
              "Div"
            ],
            "type": "string",
            "description": "Limit the run to one top-level Nemlig category. Choose All categories to scan/search without this filter.",
            "default": "all"
          },
          "quantities": {
            "title": "Basket - quantities per product",
            "description": "Optional per-product counts for basket mode. Accepted forms: object map like {\"103368\": 2, \"701012\": 6}, or array of pairs like [{\"productId\": \"103368\", \"qty\": 2}]. Default qty=1 per product when omitted. Ignored outside basket mode.",
            "default": {}
          },
          "query": {
            "title": "🔍 Search query",
            "type": "string",
            "description": "Keyword search across the Nemlig catalog (e.g. \"mælk\", \"økologisk\", \"kaffe\"). Searches product names, brands and categories. Leave empty to scan the full catalog. Ignored when Basket product IDs are supplied."
          },
          "categories": {
            "title": "Category paths / terms",
            "type": "array",
            "description": "Advanced category filters. Use category terms or full paths such as [\"Mejeri\", \"Mælk og fløde\", \"Vin og spiritus > Rødvin > Rødvin Frankrig\"]. Leave empty for all matching categories.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum total products (0 = unlimited).",
            "default": 200
          },
          "campaignsOnly": {
            "title": "Offers only",
            "type": "boolean",
            "description": "Only emit products currently on offer.",
            "default": false
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "default",
              "recommended",
              "navn",
              "brand",
              "price",
              "dyrest",
              "type"
            ],
            "type": "string",
            "description": "Sort search/category results using Nemlig's live sort options. Category URLs with sortorder=price/type/etc. set this automatically unless you choose a value here.",
            "default": "default"
          },
          "filters": {
            "title": "Search filters",
            "type": "array",
            "description": "Optional Nemlig search facets. Use values such as tilbud, oekologisk, premium, or discount/prismatch.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "inStockOnly": {
            "title": "In stock only",
            "type": "boolean",
            "description": "Drop products flagged as out of stock.",
            "default": false
          },
          "compact": {
            "title": "Compact Output",
            "type": "boolean",
            "description": "Keep only shopping essentials (identity, current price, per-unit price, offer flags, units, image) and drop heavy fields (nutrition, ingredients, image variants, category arrays). Smaller rows for AI agents and dashboards. Same row count, same billing.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Drop null, empty-string and empty-array fields from each record before push.",
            "default": false
          },
          "incrementalMode": {
            "title": "Incremental Mode",
            "type": "boolean",
            "description": "Compare against the previous run's state and emit only NEW / UPDATED / EXPIRED products (price changes, new products, delistings). Requires State Key. EXPIRED detection only fires for a basket or a full uncapped catalog scan.",
            "default": false
          },
          "stateKey": {
            "title": "State Key",
            "type": "string",
            "description": "Stable id for incremental tracking (e.g. \"my-weekly-basket\"). Required when Incremental Mode is on so multiple baskets or queries don't share state."
          },
          "emitUnchanged": {
            "title": "♻️ Emit Unchanged",
            "type": "boolean",
            "description": "Include products with no detected change in the output (default: skip - only changes are emitted).",
            "default": false
          },
          "emitExpired": {
            "title": "⚰️ Emit Expired",
            "type": "boolean",
            "description": "Include products that disappeared since the prior run (delisted or out of stock). Only meaningful for basket or full-catalog runs.",
            "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."
          },
          "whatsappAccessToken": {
            "title": "WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API token. Recipient must have messaged the business number within the 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 - for n8n / Make / Zapier / custom backends."
          },
          "webhookHeaders": {
            "title": "Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "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). Unchanged products are still pushed to the dataset but don't trigger alerts.",
            "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."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}