{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Supermarket Price Scraper: Tesco, Sainsbury's, Asda, Aldi",
    "description": "Current shelf prices from Tesco, Aldi, Sainsbury's and Asda in one schema, with EAN barcodes, Clubcard and Nectar prices and promotions. Search, category or product URLs. Pay only per product returned.",
    "version": "0.2",
    "x-build-id": "UbzygJWErdx569efh"
  },
  "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": "Which retailers to search. Each selected retailer runs as its own adapter. Ignored in category and product mode, where the retailer is inferred from each URL.",
            "items": {
              "type": "string",
              "enum": [
                "aldi",
                "sainsburys",
                "asda",
                "tesco"
              ],
              "enumTitles": [
                "Aldi",
                "Sainsbury's",
                "Asda",
                "Tesco"
              ]
            },
            "default": [
              "aldi",
              "sainsburys"
            ]
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "category",
              "product"
            ],
            "type": "string",
            "description": "One mode per run. 'search' runs each query against every selected retailer. 'category' and 'product' take retailer URLs.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "maxItems": 50,
            "type": "array",
            "description": "Keyword searches to run in 'search' mode. Each query runs against every selected retailer.",
            "items": {
              "type": "string",
              "maxLength": 200
            },
            "default": [
              "milk"
            ]
          },
          "categoryUrls": {
            "title": "Category URLs",
            "maxItems": 250,
            "type": "array",
            "description": "Category page URLs to crawl in 'category' mode. The retailer is inferred from each URL's hostname.",
            "items": {
              "type": "string",
              "maxLength": 2048
            },
            "default": []
          },
          "productUrls": {
            "title": "Product URLs",
            "maxItems": 500,
            "type": "array",
            "description": "Product page URLs to fetch in 'product' mode. The retailer is inferred from each URL's hostname.",
            "items": {
              "type": "string",
              "maxLength": 2048
            },
            "default": []
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows pushed across all retailers. 0 means no cap, bounded only by mode.",
            "default": 100
          },
          "asdaStoreId": {
            "title": "Asda store id",
            "pattern": "^[0-9]{1,6}$",
            "type": "string",
            "description": "Asda store used for stock (inStock). Leave blank for store 4565, the store asda.com uses before a postcode is entered. Asda prices are national, so this does not change prices. 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": "Advanced. In addition to the run's own dataset, append every row to this named dataset in your account, created on first use, so repeated runs accumulate history in one place. Rows are charged once, on the run's own dataset. Letters, digits and hyphens only."
          },
          "datasetName": {
            "title": "Name this run's dataset",
            "pattern": "^[a-zA-Z0-9{}-]{1,63}$",
            "type": "string",
            "description": "Advanced. At the end of a successful run, give the run's own dataset this name in your account, so it never expires and is easy to find. Placeholders: {isoWeek} (ISO week of the run start, UTC, e.g. 2026-W40), {date} (YYYY-MM-DD), {retailer} (the retailer when exactly one ran, otherwise multi). Letters, digits and hyphens only after expansion; skipped with a warning if the name is already taken, no rows were pushed, or the run stopped early (spend cap, a failed retailer), so a retry can take the name."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}