{
  "openapi": "3.0.1",
  "info": {
    "title": "Netto Scraper - Danish Grocery Products & Prices",
    "description": "Scrape Netto (Salling Group), Denmark's largest discount-grocery chain. Get the full product catalog with current shelf prices, Netto+ member offers, and per-unit comparison pricing — ready for price monitoring and grocery analytics.",
    "version": "0.3",
    "x-build-id": "580g8tIdAr4q7sWjE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~netto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-netto-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~netto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-netto-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~netto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-netto-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 EANs",
            "type": "array",
            "description": "Track a specific shopping list by EAN/barcode (e.g. [\"5701115583819\", \"5712876736208\"]). Returns just those products with per-line basket economics (quantity, line subtotal, Netto+ member total and saving). Pair with 🔢 Quantities to weight each item.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "quantities": {
            "title": "🔢 Basket — quantities per EAN",
            "description": "Optional per-product counts for basket mode. Two accepted forms:\n• Object map: `{\"5701115583819\": 2, \"5712876736208\": 6}` (compact, preferred for the Console editor)\n• Array of pairs: `[{\"ean\": \"5701115583819\", \"qty\": 2}]` (useful from Make / n8n / Zapier flows)\nDrives the basket subtotal and Netto+ saving roll-up. Default qty=1 per product when omitted. Ignored outside basket mode.",
            "default": {}
          },
          "query": {
            "title": "🔍 Search query",
            "type": "string",
            "description": "Keyword search across the Netto catalog (e.g. \"mælk\", \"økologisk\", \"kaffe\"). Searches product names, brands and categories. Leave empty to scan the entire catalog. Ignored when 🛒 Basket EANs are supplied."
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Limit to specific top-level categories (e.g. [\"Mejeri & køl\", \"Frugt & grønt\"]). Leave empty for all categories. Accepts a comma-separated string or a JSON array.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxResults": {
            "title": "💯 Max Results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum total products (0 = unlimited; full catalog ≈ 4,300).",
            "default": 200
          },
          "campaignsOnly": {
            "title": "🏷️ Tilbud only",
            "type": "boolean",
            "description": "Only emit products currently on offer — in this week's leaflet (avis) or a Netto+ member offer.",
            "default": false
          },
          "memberOffersOnly": {
            "title": "⭐ Netto+ member offers only",
            "type": "boolean",
            "description": "Only emit products with an active Netto+ membership offer (cpOffer), with member price and discount %.",
            "default": false
          },
          "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, member price, units, image) and drop heavy fields (nutrition, ingredients, image variants, member-offer detail). 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 SKUs, delistings). Requires 🔑 State Key. EXPIRED detection only fires for a basket or a full uncapped catalog scan (a keyword search can't tell delisted from out-of-scope).",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Stable identifier for incremental tracking (e.g. \"my-weekly-basket\"). Required when Incremental Mode is on so multiple baskets / 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 / 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
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}