{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Supermarket Prices Scraper — Tesco, Sainsbury's, ASDA, Aldi",
    "description": "Compare UK grocery prices in one run across Tesco, Sainsbury's, ASDA, Aldi, Morrisons, Waitrose and Iceland: shelf price, Clubcard & Nectar prices, offers, unit price and a comparable £/kg or £/litre, plus a cheapest-chain ranking. Supermarket price tracker and API.",
    "version": "0.1",
    "x-build-id": "GwQv06Zj7bVmhl79c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/griffie~uk-supermarket-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-griffie-uk-supermarket-prices",
        "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/griffie~uk-supermarket-prices/runs": {
      "post": {
        "operationId": "runs-sync-griffie-uk-supermarket-prices",
        "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/griffie~uk-supermarket-prices/run-sync": {
      "post": {
        "operationId": "run-sync-griffie-uk-supermarket-prices",
        "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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Products to look up, e.g. \"milk\", \"Heinz baked beans\", \"nappies size 4\". Every term is searched at every selected supermarket, so 5 terms × 7 chains = 35 searches.",
            "items": {
              "type": "string"
            }
          },
          "chains": {
            "title": "Supermarkets",
            "type": "array",
            "description": "Which UK supermarkets to search. Sainsbury's, Aldi, ASDA, Waitrose, Morrisons and Iceland use fast JSON search; Tesco loads full result pages (slower, heavier).",
            "items": {
              "type": "string",
              "enum": [
                "tesco",
                "sainsburys",
                "asda",
                "aldi",
                "morrisons",
                "waitrose",
                "iceland"
              ],
              "enumTitles": [
                "Tesco",
                "Sainsbury's",
                "ASDA",
                "Aldi UK",
                "Morrisons",
                "Waitrose",
                "Iceland"
              ]
            },
            "default": [
              "tesco",
              "sainsburys",
              "asda",
              "aldi",
              "morrisons",
              "waitrose",
              "iceland"
            ]
          },
          "productUrls": {
            "title": "Product or search URLs (optional)",
            "type": "array",
            "description": "Paste product pages or search-results pages from any supported chain, e.g. https://www.sainsburys.co.uk/gol-ui/product/…, https://www.asda.com/groceries/product/…/538241, https://groceries.morrisons.com/products/…/113240422. Great for tracking a fixed basket. (Tesco single product pages are blocked for servers — add the product name as a search term instead.)",
            "items": {
              "type": "string"
            }
          },
          "maxProductsPerChain": {
            "title": "Max products per search per supermarket",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop each search at each supermarket after this many products (results are in the retailer's relevance order). Morrisons returns at most 300 per search.",
            "default": 50
          },
          "maxItems": {
            "title": "Max products in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the whole run after this many products (0 = no limit). You are never charged for more than this.",
            "default": 0
          },
          "onlyOffers": {
            "title": "Only products on offer",
            "type": "boolean",
            "description": "Return only products with a deal: Clubcard / Nectar / More Card prices, Rollbacks, price drops, was/now, multi-buys (e.g. 2 for £4) and other promotions.",
            "default": false
          },
          "includeSponsored": {
            "title": "Include sponsored listings",
            "type": "boolean",
            "description": "Keep paid placements that retailers mix into search results (flagged with isSponsored = true).",
            "default": true
          },
          "compareMode": {
            "title": "Price comparison summary",
            "type": "boolean",
            "description": "Add one free \"comparison\" row per search term: the best-value product (lowest £/kg, £/litre or £/each) and a ranking of the supermarkets. Also saved as the COMPARISON record.",
            "default": true
          },
          "monitorMode": {
            "title": "Price-change monitor",
            "type": "boolean",
            "description": "Remember prices between runs and return only products whose price, member price, offer or availability changed (plus new products). Unchanged products are not saved and not charged. Schedule the same input daily or weekly.",
            "default": false
          },
          "monitorIncludeNew": {
            "title": "Return products seen for the first time",
            "type": "boolean",
            "description": "In monitor mode, also return products the monitor has not seen before (the first run returns everything as a baseline).",
            "default": true
          },
          "monitorStoreName": {
            "title": "Monitor memory name",
            "type": "string",
            "description": "Named key-value store that holds remembered prices. Use a different name for each watch-list.",
            "default": "uk-supermarket-price-monitor"
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) by default. If a supermarket keeps blocking it, the Actor switches that supermarket to a direct connection and then to UK residential proxies automatically (see Fallback proxies).",
            "default": {
              "useApifyProxy": true
            }
          },
          "fallbackProxy": {
            "title": "Fallback proxies",
            "type": "boolean",
            "description": "When a supermarket keeps returning bot-protection pages, retry it on a direct connection and then on Apify residential proxies (GB).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many searches run in parallel (each supermarket is also rate-limited separately).",
            "default": 4
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries with a fresh connection and browser fingerprint when a request is blocked or fails.",
            "default": 5
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Verbose logging.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}