{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Supermarket Price Scraper & API: Tesco, Sainsbury's, Asda",
    "description": "UK supermarket price scraper and API for Tesco, Sainsbury's, Asda, Aldi and Morrisons in one schema: shelf prices, EAN barcodes where published, Clubcard and Nectar prices where shown, promotions, and a price-move watchlist (not Morrisons). Not affiliated with the retailers.",
    "version": "0.2",
    "x-build-id": "18gBJVkV2uQlLo6ff"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yappman~uk-supermarket-price-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yappman-uk-supermarket-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/yappman~uk-supermarket-price-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yappman-uk-supermarket-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/yappman~uk-supermarket-price-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yappman-uk-supermarket-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",
        "properties": {
          "retailers": {
            "title": "Retailers",
            "type": "array",
            "description": "The retailers (shops) to run (ids: aldi, sainsburys, asda, tesco, morrisons). All five shops run by default; remove any you do not want. Search, catalogue and watchlist modes only (not Morrisons in watchlist mode): in category and product mode this is ignored, because the shop comes from each URL. Example: [\"tesco\", \"aldi\"] with queries [\"semi skimmed milk\"] prices that product at Tesco and Aldi.",
            "items": {
              "type": "string",
              "enum": [
                "aldi",
                "sainsburys",
                "asda",
                "tesco",
                "morrisons"
              ],
              "enumTitles": [
                "Aldi",
                "Sainsbury's",
                "Asda",
                "Tesco",
                "Morrisons"
              ]
            },
            "default": [
              "tesco",
              "sainsburys",
              "asda",
              "aldi",
              "morrisons"
            ]
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "product",
              "catalogue",
              "watchlist",
              "pointInTime",
              "changesSince"
            ],
            "type": "string",
            "description": "Which job to run (default 'search'). 'search' runs each query in the selected shops; 'category' reads categoryUrls, 'product' reads productUrls, 'watchlist' returns products whose price moved; 'pointInTime' and 'changesSince' read past weeks; 'catalogue' reads the category tree and product pages, Morrisons only, about 26,000 rows in 3 to 4 hours (29 Sep 2026 check run), so set a 4-hour timeout and keep Max items low.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "maxItems": 50,
            "type": "array",
            "description": "Product search words, one search per entry, for example \"semi skimmed milk\". Search mode only: each query runs in every selected shop. Up to 50 queries.",
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "default": [
              "milk"
            ]
          },
          "categoryUrls": {
            "title": "Category URLs",
            "maxItems": 250,
            "type": "array",
            "description": "Category page links from tesco.com, sainsburys.co.uk, asda.com, aldi.co.uk or groceries.morrisons.com. Leave empty unless you were given a URL; never make one up. A link from any other site is not read and is counted as unrecognised in the run summary. Category mode only: the shop comes from each URL. Up to 250 URLs.",
            "items": {
              "type": "string",
              "maxLength": 2048
            },
            "default": []
          },
          "productUrls": {
            "title": "Product URLs",
            "maxItems": 500,
            "type": "array",
            "description": "Product page links from tesco.com, sainsburys.co.uk, asda.com, aldi.co.uk or groceries.morrisons.com. Leave empty unless you were given a URL; never make one up. A link from any other site is not read and is counted as unrecognised in the run summary. Product mode only: the shop comes from each URL. Up to 500 URLs.",
            "items": {
              "type": "string",
              "maxLength": 2048
            },
            "default": []
          },
          "watchlist": {
            "title": "Watchlist items",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "Watchlist mode only, and required there: 1 to 200 items to price. Each item is {\"ean\": \"5010029000016\"}, or {\"name\": \"semi skimmed milk\", \"packSize\": \"2.27L\"}, or {\"retailer\": \"tesco\", \"retailerProductId\": \"254656543\"} (retailer: aldi, sainsburys, asda or tesco).",
            "items": {
              "type": "object"
            }
          },
          "watchlistId": {
            "title": "Watchlist name",
            "pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
            "type": "string",
            "description": "Watchlist mode only. A short name for this list: runs with the same name share one memory of what you were last told, so use a different name for each list. Lowercase letters, digits and hyphens.",
            "default": "default"
          },
          "moveThresholdPct": {
            "title": "Move threshold (%)",
            "minimum": 0,
            "maximum": 1000,
            "type": "number",
            "description": "Watchlist mode only. A product is returned only when its price has moved by at least this many percent, up or down, since the baseline. 0 returns every change.",
            "default": 5
          },
          "baseline": {
            "title": "Compare against",
            "enum": [
              "last-alert",
              "last-run"
            ],
            "type": "string",
            "description": "Watchlist mode only. 'last-alert' compares each product with the price you were last told about, so a slow drift still alerts once it adds up. 'last-run' compares with the price at the previous run.",
            "default": "last-alert"
          },
          "includeLoyalty": {
            "title": "Compare loyalty prices",
            "type": "boolean",
            "description": "Watchlist mode only. When on, a product with a loyalty price (Clubcard, Nectar, Asda Rewards) is compared on that price rather than the shelf price.",
            "default": true
          },
          "asOfWeek": {
            "title": "Week (point-in-time mode)",
            "pattern": "^((2026-W(4[2-9]|5[0-3])|(202[7-9]|20[3-9][0-9]|2[1-9][0-9]{2}|[3-9][0-9]{3})-W(0[1-9]|[1-4][0-9]|5[0-3])))?$",
            "type": "string",
            "description": "Point-in-time mode only, and required there. The ISO week whose weekly snapshot values you want, written like 2026-W43. Weeks from 2026-W42 are offered for Tesco, Sainsbury's, Asda and Aldi; earlier weeks are not."
          },
          "asOfProducts": {
            "title": "Products (point-in-time mode)",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "description": "Point-in-time and changes-since modes. 1 to 500 products, each {\"retailer\": \"tesco\", \"retailerProductId\": \"254656543\"} (retailer: aldi, asda, sainsburys or tesco; the id is the retailerProductId of an ordinary row). Give this or 'All products', not both.",
            "items": {
              "type": "object"
            }
          },
          "asOfAllProducts": {
            "title": "All products in our snapshot",
            "type": "boolean",
            "description": "Point-in-time and changes-since modes. When on, reads all products the selected shops' snapshots held: point-in-time returns each one (several thousand rows per shop and week), changes-since only those that changed. Each returned row is charged as a product. Max items is one limit for the run, filled shop by shop in the order of Retailers.",
            "default": false
          },
          "sinceWeek": {
            "title": "From week (changes-since mode)",
            "pattern": "^((2026-W(4[2-9]|5[0-3])|(202[7-9]|20[3-9][0-9]|2[1-9][0-9]{2}|[3-9][0-9]{3})-W(0[1-9]|[1-4][0-9]|5[0-3])))?$",
            "type": "string",
            "description": "Changes-since mode only, and required there. The earlier ISO week, 2026-W42 or later, written like 2026-W43: each product whose stored price, was-price, loyalty price or promotion text differs between this week and the later week is returned once."
          },
          "toWeek": {
            "title": "To week (changes-since mode)",
            "pattern": "^((2026-W(4[2-9]|5[0-3])|(202[7-9]|20[3-9][0-9]|2[1-9][0-9]{2}|[3-9][0-9]{3})-W(0[1-9]|[1-4][0-9]|5[0-3])))?$",
            "type": "string",
            "description": "Changes-since mode only. The later ISO week (2026-W42 or later), after the From week. Leave it empty to compare with each shop's latest weekly snapshot."
          },
          "includePriceHistory": {
            "title": "Add weekly price history",
            "type": "boolean",
            "description": "Search, category and product modes. Adds `priceHistory` to each row: the product's price, was-price, loyalty price and promotion text in each of our weekly snapshots before this week, newest first, up to 52 weeks. Tesco, Sainsbury's, Asda and Aldi. A row with two or more weeks costs $0.004 on top of the product price; a row with fewer costs nothing extra.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows saved. Every saved row is charged, so use a small number first (the Console form starts at 10; through the API the default is 100); 0 means no limit, which in catalogue mode is about 26,000 rows (29 Sep 2026 check run). Applies to every mode. It is split equally between the shops that run (100 across five: up to 20 each), except in pointInTime and changesSince, where the shops fill one limit in turn.",
            "default": 100
          },
          "asdaStoreId": {
            "title": "Asda store id",
            "pattern": "^[0-9]{1,6}$",
            "type": "string",
            "description": "Asda only: the store whose stock the inStock field reports. Leave empty for store 4565, the store asda.com uses before a postcode is entered. We have not checked whether prices change with the store, and products not sold at the store you choose are left out. Digits only."
          },
          "outputDataset": {
            "title": "Also append rows to a named dataset",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{0,62}$",
            "type": "string",
            "description": "Optional. Name of a dataset in your account that also receives every row the run saves, created on first use, so repeated runs add up in one place. Rows are charged once, and copying is best effort: it never fails the run. Letters, digits and hyphens only. Example: \"my-uk-grocery-prices\", then read that dataset's items after each run."
          },
          "datasetName": {
            "title": "Name this run's dataset",
            "pattern": "^[a-zA-Z0-9{}-]{1,63}$",
            "type": "string",
            "description": "Optional. Names this run's own dataset once the run succeeds, so it is kept until you delete it. Placeholders: {isoWeek} gives 2026-W40, {date} gives 2026-10-08, and {retailer} gives the shop, or multi when several ran. Letters, digits and hyphens only; skipped with a warning if the name is taken, nothing was saved or the run stopped early."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}