{
  "openapi": "3.0.1",
  "info": {
    "title": "Danish OTC Medicine Price Scraper",
    "description": "Compare over-the-counter (håndkøbsmedicin) and parapharmacy prices across Danish online pharmacies — Apopro, Webapoteket and med24. Matches the same product by varenummer to show the cheapest shop, with optional price-change monitoring.",
    "version": "1.0",
    "x-build-id": "6Rdin2ZPzYeIcRnVY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/corvuslab~dk-otc-price-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-corvuslab-dk-otc-price-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/corvuslab~dk-otc-price-scraper/runs": {
      "post": {
        "operationId": "runs-sync-corvuslab-dk-otc-price-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/corvuslab~dk-otc-price-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-corvuslab-dk-otc-price-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": [
          "retailers"
        ],
        "properties": {
          "retailers": {
            "title": "🏥 Retailers",
            "type": "array",
            "description": "Which online pharmacies to include. Apopro, med24 and Webapoteket are live; Matas is coming in a future version and is skipped if selected. Apopro and Webapoteket both publish the varenummer, so their prices can be compared exactly.",
            "items": {
              "type": "string",
              "enum": [
                "apopro",
                "med24",
                "webapoteket",
                "matas"
              ],
              "enumTitles": [
                "Apopro",
                "med24",
                "Webapoteket",
                "Matas (coming soon)"
              ]
            },
            "default": [
              "apopro",
              "webapoteket",
              "med24"
            ]
          },
          "segments": {
            "title": "💊 Product segments",
            "type": "array",
            "description": "Which parts of the catalog to cover. Ignored when you enter search terms below.",
            "items": {
              "type": "string",
              "enum": [
                "otc_medicine",
                "parapharmacy"
              ],
              "enumTitles": [
                "OTC medicine (håndkøbsmedicin)",
                "Parapharmacy (supplements, skincare)"
              ]
            },
            "default": [
              "otc_medicine"
            ]
          },
          "searchTerms": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "Optional. Product names or varenumre to look up at each retailer. When set, this replaces browsing the segments above. Leave empty to scrape whole segments.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "emitComparisons": {
            "title": "⚖️ Emit cross-retailer comparisons",
            "type": "boolean",
            "description": "For every product carried by 2+ selected retailers, output a comparison record: cheapest retailer, min/max price and the spread. Matched exactly on varenummer — no fuzzy matching.",
            "default": true
          },
          "includeFixedPrice": {
            "title": "🔒 Include pharmacy-only fixed-price items in comparisons",
            "type": "boolean",
            "description": "apoteksforbeholdt items have one fixed national price, so comparing them just shows the same price at every shop. Off by default.",
            "default": false
          },
          "emitPriceRecords": {
            "title": "🧾 Emit per-product price records",
            "type": "boolean",
            "description": "Output the full price record for every product. Turn this off (with comparisons or monitoring on) for leaner, derived-only output.",
            "default": true
          },
          "monitorChanges": {
            "title": "📈 Monitor changes since last run",
            "type": "boolean",
            "description": "Compare this run against the previous run with the same retailers, segments and search terms, and emit change records: added, removed, price_changed, back_in_stock, out_of_stock. The first run just saves a baseline. Best paired with an Apify Schedule.",
            "default": false
          },
          "stateKey": {
            "title": "🗝️ State key (optional)",
            "type": "string",
            "description": "Names the monitoring baseline. Give two schedules different keys to run independent price-watches, or the same key to share one baseline. Leave empty to auto-derive from your retailers, segments and search terms. Only used when monitoring is on."
          },
          "resolveIdentifiers": {
            "title": "🔗 Resolve EAN from product pages",
            "type": "boolean",
            "description": "Visit each med24 product page to resolve its EAN (GTIN). Roughly doubles the number of requests. Only affects med24 — Apopro's varenummer is always read from the listing.",
            "default": false
          },
          "maxProductsPerRetailer": {
            "title": "🔢 Max products per retailer",
            "minimum": 0,
            "type": "integer",
            "description": "Cap how many products to scrape per retailer. Use 0 for no limit. Handy for quick test runs.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "⚡ Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of parallel requests. Keep this modest to stay polite to the retailers.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}