{
  "openapi": "3.0.1",
  "info": {
    "title": "Sainsbury's Scraper - Groceries, Prices & Nectar Offers (UK)",
    "description": "Scrape Sainsbury's (sainsburys.co.uk) groceries: prices, unit prices, Nectar offers and promotions, availability, EANs, full image galleries, categories, descriptions, labels and health data. Search by keyword or category, or paste search, category, promotion, product and sitemap links.",
    "version": "0.1",
    "x-build-id": "oRySLSrdwPIfwWHXn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~sainsburys-co-uk-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-sainsburys-co-uk-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/abotapi~sainsburys-co-uk-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-sainsburys-co-uk-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/abotapi~sainsburys-co-uk-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-sainsburys-co-uk-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Choose 'search' to run keyword and category searches or 'url' to paste Sainsbury's links.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "One or more keywords to search on Sainsbury's, for example 'milk', 'free range eggs' or a brand and product. Each keyword is searched separately.",
            "default": [
              "milk"
            ],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Category numbers",
            "type": "array",
            "description": "Optional. Category numbers to read in full, the number after 'c:' at the end of a browse link (for example 1019342 for Fresh milk). A pasted browse link also works. Each category is read separately, after the keywords.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_low",
              "price_high",
              "top_rated"
            ],
            "type": "string",
            "description": "Order of the results. A pasted link that carries its own sort keeps it.",
            "default": "relevance"
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Only return products of these brands, written the way Sainsbury's lists them (for example 'Cadbury', 'Alpro', \"Sainsbury's\"). Several brands are combined. Leave empty for all brands.",
            "items": {
              "type": "string"
            }
          },
          "allergyFilters": {
            "title": "Allergy and intolerance filters",
            "type": "array",
            "description": "Only return products matching these allergy filters, written the way Sainsbury's lists them (for example 'gluten free', 'no celery', 'no crustaceans'). The facets_allergy field of each row lists the options with their counts. Leave empty for none.",
            "items": {
              "type": "string"
            }
          },
          "dietFilters": {
            "title": "Dietary and lifestyle filters",
            "type": "array",
            "description": "Only return products matching these dietary filters, written the way Sainsbury's lists them (for example 'vegetarian', 'high protein', 'low salt'). The facets_diet field of each row lists the options with their counts. Leave empty for none.",
            "items": {
              "type": "string"
            }
          },
          "newIn": {
            "title": "New in only",
            "type": "boolean",
            "description": "Only return products the shop lists as new.",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Lowest shelf price in pounds sterling (GBP). Leave empty for no lower bound."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Highest shelf price in pounds sterling (GBP). Leave empty for no upper bound."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only products rated at least this many stars (1 to 5). Products with no rating are left out. Leave empty for all."
          },
          "onlyOffers": {
            "title": "Offers and Nectar prices only",
            "type": "boolean",
            "description": "Only return products that currently carry an offer or a Nectar price. Applied by the shop on keyword, category and promotion lists; on other pasted links a product must carry a promotion.",
            "default": false
          },
          "urls": {
            "title": "Links to read",
            "type": "array",
            "description": "Paste Sainsbury's links: a search page (also its pageNumber and sort forms, the older SearchResults form and the mobile address), a category page (/groceries/browse/.../c:1019342, also the older /shop/gb/groceries/... form), a promotion list (/groceries/promotions/<number>), a product page, a feature, event or brand page (the first page of products it lists), the offers and Nectar pages (every product on offer, up to the shop's 10,000-record window), or the groceries home page /gol-ui/groceries (the category tree, one row per category). Sitemaps, robots.txt, store finder pages, the shop's service addresses, files, recipes and other site pages are not product listings and are skipped before any request.",
            "default": [
              "https://www.sainsburys.co.uk/groceries/search?searchTerm=milk",
              "https://www.sainsburys.co.uk/groceries/search?searchTerm=milk&pageNumber=2",
              "https://www.sainsburys.co.uk/groceries/search?searchTerm=milk&sort=PRICE_ASC",
              "https://www.sainsburys.co.uk/gol-ui/SearchResults/milk",
              "https://www.sainsburys.co.uk/groceries/browse/dairy-eggs-and-chilled/fresh-milk/c:1019342",
              "https://www.sainsburys.co.uk/shop/gb/groceries/dairy-eggs-and-chilled",
              "https://www.sainsburys.co.uk/groceries/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint",
              "https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-semi-skimmed-milk-2-27l-4-pint",
              "https://www.sainsburys.co.uk/groceries/features/best-of-british",
              "https://www.sainsburys.co.uk/groceries/promotions/10775477",
              "https://www.sainsburys.co.uk/gol-ui/groceries",
              "https://www.sainsburys.co.uk/groceries/nectar",
              "https://www.sainsburys.co.uk/gol-ui/offers",
              "https://www.sainsburys.co.uk/groceries/search?searchTerm=milk&fromMegaNav=1&utm_source=x",
              "https://m.sainsburys.co.uk/groceries/search?searchTerm=milk"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch product details",
            "type": "boolean",
            "description": "Read each listed product's detail to add the description, short description, brand, full image gallery, complete category list, important information, health classification and the sales-restriction (HFSS) status per nation. This is the Product detail data charge, once per row enriched; ingredients and nutrition are a separate option below. Rows from pasted product links or sitemap product entries already carry all of this and are never charged for it. Turn off for a cheaper listing-level pull.",
            "default": true
          },
          "fetchProductPage": {
            "title": "Fetch ingredients and nutrition (product page)",
            "type": "boolean",
            "description": "Also read each product's page for the ingredients, the nutrition table, dietary information, storage, country of origin, manufacturer, the long description and any other product information the shop lists (size, packaging, preparation and safety, alcohol, dosage and similar). This is the Ingredients & nutrition charge, once per row that received it, on top of the Product detail data charge (separate from product details above). Each product page is about 2 MB, so runs with this option on are slower. Rows from pasted product links get the page text with this option and no separate detail charge.",
            "default": false
          },
          "maxReviews": {
            "title": "Customer reviews per product",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many customer reviews to return on each product (title, text, star rating, quality and value ratings, author, date, recommendation), newest first, 10 per product page. Default 20, 0 skips reviews. Only used when 'Fetch ingredients and nutrition (product page)' is on, because the reviews are read from the product page. A row that returns at least one review carries one customer-reviews charge, whatever the number of reviews, and only when it also carries its product detail charge; rows that get no detail read (a pasted product link, an unchanged product in incremental mode) carry none and are not charged for reviews.",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages (does not cap on its own)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Limits how many result pages each keyword or link walks. Empty or 0 (the default) means no page limit. This does NOT cap the run and has no finite default; it defers to Max items, which is the one cap on the run."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "THE one cap on this run: the maximum number of rows returned across the whole run. Defaults to 20 so a first run is quick and cheap. Use 0 for unlimited (a whole category or search). Max pages does not cap on its own and defers to this field.",
            "default": 20
          },
          "maxItemsPerSearch": {
            "title": "Max items per keyword, category or link",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Caps how many products each keyword, category or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-keyword cap; Max items still caps the run.",
            "default": 0
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave this on the default (Automatic) for the standard connection. Residential is recommended for the most reliable results (large or frequent runs); it is billed to your own Apify plan. You can also paste your own proxy URL.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed (price, unit price, availability, promotions, labels, categories, description, images), except the result position and page, the relevancy rank, the scrape time, the keyword or link it was found through, the facet counts, sort and result total of the listing, the category path of the scope, and by default the review score and count (see Ignore fields below). With 'Price and offers only' just the shelf price, unit price, was-unit price, availability and each promotion's strap line, original price, Nectar flag, discount and dates are compared. State is kept separately for each keyword, category, link, sort, filter and detail setup; use State key to name or deliberately share a monitoring campaign.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup. One state key tracks up to 1,000 products at the default memory."
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "'Price and offers only' compares just the shelf price, unit price, was-unit price, availability flag and each promotion (strap line, original price, Nectar flag, discount, dates); a description, image or label change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes).",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact UPDATED rows (incremental mode only)",
            "type": "boolean",
            "description": "When on, an UPDATED row carries only identifiers plus the price and availability fields that actually moved (priceChanges, variantChanges for promotions), instead of the full record. Off by default.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Missed scans before EXPIRED (incremental mode only)",
            "minimum": 1,
            "type": "integer",
            "description": "A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.",
            "default": 1
          },
          "emitUnchanged": {
            "title": "Emit unchanged products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced after a complete scan: every walk started at page 1 and read as many distinct products as the site's result total (below the shop's 10,000-record window), with product details on and every wanted product detail read. Never when Max items, Max pages or the maximum cost per run stopped it, when a pasted link started past page 1, for feature, brand, sitemap, offers or category tree links, when any page or product could not be read, or when Resume was used. This returns, and bills, extra synthetic rows.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Field names that must NOT count as a change in incremental mode. The default list leaves out the review score and count (reviews), which drift with every new review; remove it from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.",
            "default": [
              "reviews"
            ],
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          },
          "notifyOnlyChanges": {
            "title": "Alert on changes only",
            "type": "boolean",
            "description": "Only send the alert when Incremental changes is on and at least one product is NEW, UPDATED, REAPPEARED or EXPIRED. Without Incremental changes every finished run sends its summary.",
            "default": false
          },
          "notificationLimit": {
            "title": "Rows listed per alert",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many product rows the alert message lists (the run's totals are always in the first line).",
            "default": 5
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook",
            "type": "string",
            "description": "Optional Slack incoming-webhook URL to post the summary to."
          },
          "discordWebhookUrl": {
            "title": "Discord channel webhook",
            "type": "string",
            "description": "Optional Discord channel webhook URL to post the summary to."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional Telegram bot token to post the summary with (needs the chat ID below)."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional Telegram chat ID that receives the summary (needs the bot token above)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}