# Asda Scraper - Groceries, Prices, Offers & Stock (UK) (`abotapi/asda-com-scraper`) Actor

Scrape Asda Groceries (asda.com) products: prices per region, was-prices and Rollback offers, multibuy promotions, price per unit, categories, brands, ratings, dietary flags and per-store stock. Search by keyword, category or brand, or paste search and product links.

- **URL**: https://apify.com/abotapi/asda-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.001 / actor start

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Asda Scraper: Groceries, Prices, Offers & Stock (UK)

Asda Scraper turns Asda Groceries (asda.com) into structured product data. Search by keyword, or browse a category or brand, or paste a search or product link, and get prices for England, Northern Ireland, Scotland or Wales, was-prices and Rollback offers, multibuy promotions, price per unit, the full category path, ratings, dietary flags and the stock level of every store. Export to JSON, CSV or Excel, or pull results straight into your app through the API.

### Why This Scraper?

- **Every way into the catalog.** Keyword searches, whole categories, aisles or shelves, brand pages and single product links, each read to its natural end or to the cap you set.
- **Prices that tell the whole story.** Current price, was-price, offer type (list price, Rollback and other offers), price per unit with its label, and the multibuy promotions of each product, for the price region you choose.
- **Four price regions.** England, Northern Ireland, Scotland and Wales each have their own price list; pick one per run or paste a link that carries its own region.
- **Stock for every store.** The stock counter of every Asda store on each row, plus an in-stock flag for the store number you pick, and an optional in-stock-only filter.
- **Rich product attributes.** Brand, pack size, flavour, country of origin, dietary and allergen flags (vegan, vegetarian, gluten, milk, nuts and more), HFSS status, frozen and alcohol flags, badges, ratings and rating counts.
- **Full category context.** Category, department, aisle and shelf with their ids, the secondary categories and every category path the product is listed under.
- **Monitoring built in.** Label every product NEW, UPDATED, REAPPEARED or EXPIRED across scheduled runs, track price and offers only, resume an interrupted crawl, get a chat alert when a run finishes, and export through MCP connectors.

### Use Cases

- **Price and promotion monitoring:** track prices, was-prices and Rollback offers for groceries, household and health products, and get alerted only to what actually changed.
- **Regional price comparison:** compare the same product across England, Scotland, Wales and Northern Ireland.
- **Range and market analysis:** compare Asda ranges, price bands and brand coverage by aisle or by keyword.
- **Availability tracking:** follow which stores stock a product and when it goes out of stock.
- **Nutrition and dietary research:** filter and analyse vegan, vegetarian, gluten-free and HFSS products across the range.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live record.

| Field | Example |
| --- | --- |
| `objectID` / `cin` / `sku_id` | `"0000000"` / `"0000000"` / `"00000"` (Asda product and SKU numbers) |
| `name` / `brand` / `packSize` | `"Sample Whole Milk 2 Pints"` / `"Sample Brand"` / `"2 PINT"` |
| `imageId` / `imageUrl` | the image number / the product picture address |
| `flavour` / `countryOfOrigin` / `keywords` | `"WHOLE"` / `["Packed In : United Kingdom"]` / the catalog search keywords |
| `price` / `wasPrice` / `currency` / `priceZone` | `1.3` / `1.5` / `"GBP"` / `"EN"` |
| `offerType` | `"List"`, `"Rollback"` or another offer name |
| `pricePerUom` / `pricePerUomFormatted` | `1.15` / `"£1.15/LT"` |
| `promos` | each promotion with `id`, `name` (for example "Any 3 for £7"), `type`, `startDate`, `endDate` |
| `categoryId` / `categoryName` | the top-level category and its id |
| `departmentId` / `departmentName` | the department and its id |
| `aisleId` / `aisleName` / `shelfId` / `shelfName` | the aisle and shelf with their ids |
| `secondaryTaxonomy` / `pageTaxonomy` | the other categories the product sits in / every category path as text |
| `avgRating` / `ratingCount` | `4.3` / `284` |
| `nutritionalInfo` | dietary and allergen flags such as `Vegan`, `Vegetarian`, `Halal`, `NoGluten`, `NoMilk`, `NoNuts`, each true or false |
| `icons` | the product badges with name, picture, dates and priority |
| `status` / `displayOnline` / `salesType` / `productType` | `"A"` / `true` / `"Each"` / `"STANDARD"` |
| `maxQty` / `isFrozen` / `isBws` / `isHfss` / `isSponsored` / `pharmacyRestricted` | `24` / `false` / `false` / `false` / `false` / `false` |
| `label` / `labelStartDate` / `labelEndDate` | a campaign label such as "New" with its dates, where one is set |
| `startDate` / `endDate` | the range dates of the product |
| `storeId` / `inStock` | the store number you chose (default 4565) / whether it can be bought there |
| `storeStock` | a map of store number to stock counter, for every store |
| `untraitedStores` | the store numbers that do not carry the product |
| `lifestyles` / `additives` / `alcoholType` / `hfssCategory` / `skuType` | tags and classifications, where the product has them |
| `query` / `scrapedAt` | the keyword the row was found through, and when it was read |
| `changeType` / `changedFields` / `firstSeenAt` / `lastSeenAt` | incremental mode only: `"NEW"`, `"UPDATED"`, `"UNCHANGED"`, `"REAPPEARED"` or `"EXPIRED"`, the fields that changed, and when the product was first and last seen |

Asda does not publish a product page address in its listing data, so rows carry the product number and the picture address but no page link. Fields such as `wasPrice`, `promos`, `label` and `alcoholType` are filled only for products that have them.

**Output views.** The dataset has two views in the Console: **Products** and **Changes (incremental)**. Each run also stores a run summary under the `OUTPUT` key of its default key-value store.

### How to Use

1. Keep the default **search** mode and add one or more keywords, or leave the keywords empty and name categories or brands to browse them, or switch to **url** mode and paste search or product links.
2. Choose the price region, narrow with brands, categories, a price range, a minimum rating, offers only or in-stock only, and pick a sort order.
3. Set **Max items** to control run size and cost.
4. Click **Start**.

**Quick keyword search:**

```json
{
  "mode": "search",
  "searchTerms": ["milk"],
  "maxItems": 20
}
```

**Rollback offers in Scotland, cheapest first:**

```json
{
  "mode": "search",
  "searchTerms": ["biscuits"],
  "region": "SC",
  "onlyOffers": true,
  "sortBy": "price_low",
  "maxItems": 50
}
```

**A whole aisle, in stock at one store:**

```json
{
  "mode": "search",
  "searchTerms": [],
  "categories": ["Fresh Milk"],
  "inStockOnly": true,
  "storeId": 4565,
  "maxItems": 0
}
```

**Pasted links, a few products from each:**

```json
{
  "mode": "url",
  "urls": [
    "https://www.asda.com/groceries/search/milk",
    "https://www.asda.com/groceries/search/milk?sort=EN_PRICE-LOW-TO-HIGH"
  ],
  "maxItemsPerSearch": 10,
  "maxItems": 20
}
```

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("abotapi/asda-com-scraper").call(run_input={"mode": "search", "searchTerms": ["milk"], "maxItems": 20})
for product in client.dataset(run.default_dataset_id).iterate_items():
    print(product.get("name"), product.get("price"), product.get("currency"))
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('abotapi/asda-com-scraper').call({ mode: 'search', searchTerms: ['milk'], maxItems: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Or connect it to Make, Zapier, n8n, Google Sheets or webhooks from the **Integrations** tab.

#### Pasted links

- **Search pages** such as `/groceries/search/milk`, also with their sort: `?sort=EN_PRICE-LOW-TO-HIGH` or `?sort=SC_PRICE-HIGH-TO-LOW`. The letters before the underscore pick the price region (EN, NI, SC, WA) and win over the **Price region** setting for that link; the sort is kept.
- **Product pages** such as `/groceries/product/semi-skimmed-milk/asda-british-milk-semi-skimmed-2-pints/538241` return that one product.
- The filters of Search mode (brands, categories, price range, rating, offers only, in-stock only) are applied to every pasted search link.
- Home pages, store pages and other site pages are not product listings: they are skipped with a note in the log, and a run given only such links fails at once, before any request.

#### Caps and pagination

**Max items** stops the whole run once that many products have been returned (`0` = no cap). **Max items per keyword or link** caps each one on its own, so one large keyword cannot use up the whole run. **Max pages** limits how many result pages (100 products each) each keyword or link walks; it does not cap the run by itself. A single search lists at most its first 10,000 matches: when a search matches more, the log says so, and you can split it with categories or brands.

#### Resume and recurring updates

- **Resume** (`resumeFromRunId`) skips products already collected by an earlier run: paste its run or dataset ID and those products are neither returned nor charged again.
- **Incremental mode** (`incrementalMode`) is for scheduled runs over the same search. Each product is classified `NEW`, `UPDATED` (with `changedFields`), `UNCHANGED` (left out and not billed unless `emitUnchanged` is on), `REAPPEARED`, or `EXPIRED` (only with `emitExpired` on, and only after a complete scan: every search walked to the end of its results; never after a capped, page-limited, cost-limited, resumed or timeout-stopped run, a single-product link, a search that matched more than 10,000 products, or a run where any page could not be read). The result page, the scrape time, the keyword a product was found through, the per-store stock counters, the untraited-store list, the campaign category paths, the secondary categories and the badge list never count as a change. `ignoreFieldsForChanges` defaults to the rating (`avgRating`) and the rating count (`ratingCount`), which drift with every new rating; remove names to be told about them, or add more. `changeScope: "priceAndStock"` compares only price, was-price, offer type, price per unit, the in-stock flag, status, the online flag and the id, name and type of each promotion; `compactUpdates` returns slim rows with just what moved. `stateKey` names the stored state; leave it empty and the actor derives one from the run's keyword, link, region, sort and filter setup. If runs with a different keyword, link, region, sort or filter setup share one `stateKey`, they list different products: such a run still compares products but marks nothing `EXPIRED`, says so once in the log, and products only the earlier setup listed are never marked `EXPIRED` by the new one. Use one `stateKey` per setup. At the default memory one state key tracks up to 2,000 products (4.5 MB of saved state; more with more memory): past that, the run still returns the extra products as NEW, says so once in the log, and leaves the saved state unchanged. Split very large campaigns across several state keys.

#### Alerts

Fill in a Slack incoming webhook or a Discord channel webhook, and the actor posts one short summary when the run finishes: the number of rows (and, in incremental mode, how many are new, updated, reappeared or expired) followed by up to **Rows listed per alert** products. With **Alert on changes only** on and Incremental changes on, nothing is sent when nothing changed. Alerts add no charge and never change the run's result; leave every field empty to skip them.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step **after** the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable **summary** of each record, not the full JSON. Each item becomes one entry with a **title** and its key fields flattened to plain text. The **complete record always stays in the Apify dataset**.

1. Authorize a connector once under **Apify, Settings, Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field (`mcpConnectors`). (If the picker is empty, you haven't authorized a connector yet.)
3. For **Notion**, also set `notionParentPageUrl` to the page where items should be created.
4. Optionally set `maxNotifyListings` to cap how many items are written to each connector per run (default 50).

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | `search` (keywords, categories, brands) or `url` (pasted links). |
| `searchTerms` | array | `milk` | Search mode: keywords to search, each read separately. Leave empty and use categories or brands to browse. |
| `region` | string | `EN` | Price region: `EN`, `NI`, `SC` or `WA`. |
| `sortBy` | string | `relevance` | `relevance`, `price_low` or `price_high`. |
| `brands` | array | (none) | Keep only these brands, spelled as Asda spells them; several are combined as "any of these". |
| `categories` | array | (none) | Keep only these categories, departments, aisles or shelves; several are combined as "any of these". |
| `minPrice` | number | (none) | Lowest price kept, in pounds sterling. |
| `maxPrice` | number | (none) | Highest price kept, in pounds sterling. |
| `minRating` | number | (none) | Only products rated at least this many stars. |
| `onlyOffers` | boolean | `false` | Only products on a Rollback or other offer. |
| `inStockOnly` | boolean | `false` | Only products that can be bought at the chosen store. |
| `storeId` | integer | `4565` | Store number used for the in-stock flag and the in-stock filter. |
| `urls` | array | two search links | URL mode: search and product links on asda.com, see Pasted links above. |
| `maxPages` | integer | (none) | Optional page limit per keyword or link; does not cap the run, Max items does. |
| `maxItems` | integer | `20` | Cap on the whole run; `0` = no cap. |
| `maxItemsPerSearch` | integer | `0` | Cap per keyword or pasted link; `0` = no per-keyword cap. |
| `proxy` | object | Apify Proxy, Automatic | Apify Proxy settings, or your own proxy URLs. |
| `resumeFromRunId` | string | (none) | Run or dataset ID whose products are skipped. |
| `incrementalMode` | boolean | `false` | Return only new, changed and reappeared products on repeat runs. |
| `stateKey` | string | (auto) | Name the incremental state (one key per search setup). |
| `changeScope` | string | `all` | `all` or `priceAndStock`. |
| `compactUpdates` | boolean | `false` | Slim UPDATED rows with only what moved. |
| `expireAfterMissedScans` | integer | `1` | Complete scans a product must be missing before EXPIRED. |
| `emitUnchanged` | boolean | `false` | Also return UNCHANGED rows (billed as rows). |
| `emitExpired` | boolean | `false` | Also return EXPIRED rows after a complete scan (billed as rows). |
| `ignoreFieldsForChanges` | array | rating + rating count | Fields that never count as a change; remove names to be told about them. |
| `mcpConnectors` | array | (none) | Optional MCP connectors to send results into, see above. |
| `notionParentPageUrl` | string | (none) | Notion page that receives the items (Notion connector only). |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run. |
| `notifyOnlyChanges` | boolean | `false` | Send the alert only when something changed (needs Incremental changes). |
| `notificationLimit` | integer | `5` | Product rows listed in an alert. |
| `slackWebhookUrl` | string | (none) | Optional Slack incoming webhook for the run summary. |
| `discordWebhookUrl` | string | (none) | Optional Discord channel webhook for the run summary. |

### Output Example

> Sample shape: values are illustrative placeholders, not from a live record.

```json
{
  "objectID": "0000000",
  "cin": "0000000",
  "sku_id": "00000",
  "name": "Sample Whole Milk 2 Pints",
  "brand": "Sample Brand",
  "packSize": "2 PINT",
  "imageId": "00000000",
  "imageUrl": "https://media.example.com/sample-1.jpg",
  "flavour": "WHOLE",
  "countryOfOrigin": ["Packed In : United Kingdom"],
  "status": "A",
  "displayOnline": true,
  "salesType": "Each",
  "productType": "STANDARD",
  "maxQty": 24,
  "isFrozen": false,
  "isHfss": false,
  "avgRating": 4.3,
  "ratingCount": 284,
  "nutritionalInfo": {"Vegan": false, "Vegetarian": true, "NoGluten": true, "NoMilk": false},
  "priceZone": "EN",
  "currency": "GBP",
  "price": 1.3,
  "wasPrice": 1.5,
  "offerType": "Rollback",
  "pricePerUom": 1.15,
  "pricePerUomFormatted": "£1.15/LT",
  "promos": [{"id": "0", "name": "Any 3 for £7", "type": 15, "startDate": "2026-01-01T00:00:00Z", "endDate": "2026-12-31T23:59:59Z"}],
  "categoryId": "0", "categoryName": "Chilled Food",
  "departmentId": "0", "departmentName": "Milk, Butter, Cream & Eggs",
  "aisleId": "0", "aisleName": "Fresh Milk",
  "shelfId": "0", "shelfName": "Whole Milk",
  "storeId": 4565,
  "inStock": true,
  "storeStock": {"4565": 999, "4566": 0},
  "untraitedStores": [4128, 4131],
  "query": "milk",
  "scrapedAt": "2026-01-20T08:00:00+00:00"
}
```

### Plan Requirement

Pay per event: one unit per returned product row, plus an actor start event. Each unit is charged per row, as the row is delivered, never as a single total at the end. An unchanged product left out in incremental mode is neither returned nor charged. This actor needs an Apify Proxy connection; the default setting is Automatic and is billed to your own Apify plan, and you can also supply your own proxy URLs.

### FAQ

#### How much does it cost?

You pay per product row returned. The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

#### Is it legal to scrape asda.com?

This actor collects only publicly available product data that Asda shows on its own pages. You are responsible for how you use it: follow Asda's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and product attributes are generally facts, but images and description text may be subject to third-party rights.

#### Can I get only new or changed products on a schedule?

Yes. Schedule the actor from the **Schedules** tab and turn on **Incremental mode**. Each run then returns only new, updated and reappeared products; unchanged ones are not billed unless you turn `emitUnchanged` on. Use `changeScope: "priceAndStock"` to be told only about price and offer moves.

#### Why does a keyword return fewer products than the site shows?

Filters you set (brands, categories, price, rating, offers only, in stock only) narrow the same result the site would show. Products Asda does not list online are left out. A price sort lists every product matching the words, which can be more than the best-match order returns.

#### Are prices the same in every store?

Asda prices by region, not by store: England, Northern Ireland, Scotland and Wales each have their own price list, chosen with **Price region**. Stock is per store: `storeStock` lists the counter of every store, and `inStock` reflects the store number you choose.

#### Why is there no link to the product page?

The listing data carries the product number, the pack, the category path and the picture address, but not the page address, so rows have no page link.

#### Which proxy should I use?

The default works for this actor. If the connection you selected is unavailable or keeps getting refused, the run automatically continues on a backup connection (the other Apify proxy tier, then a backup gateway) rather than stopping; that escalation is disclosed in the run log the first time it happens, and any residential traffic it uses is billed to your own Apify plan. Set `ASDA_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection entirely. If you enter your own proxy URLs, they are used as-is with no backup connection; if your proxy re-signs HTTPS traffic, the run says so once in the log ("The custom proxy re-signs HTTPS traffic; retrying without certificate verification for it.") and continues on it.

#### Why did my run fail instead of returning an empty dataset?

If every search or link could not be read, the run stops with a clear message so "no products matched" is never confused with "nothing could be read". Run it again in a few minutes. The messages you may see in the run log:

- When the selected connection is unavailable to your account, the log says: "The selected connection is unavailable to this run. Apify free plans do not include residential proxies. Continuing on a backup connection; some pages may still be unavailable. For residential access, upgrade at https://apify.com/pricing or supply your own proxy URLs."
- When requests are then served over the backup connection: "Served over the backup connection (the default connection was unavailable)." Set `ASDA_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection.
- If the proxy connection is refused for the account and nothing could be read: "The proxy connection was refused for this account, so no page could be read. Your Apify plan does not include proxy access; a paid plan is required: https://apify.com/pricing. If you entered your own proxy URLs, check that their credentials are valid."
- If the run reaches the maximum cost per run you set, it stops and its status says: "Stopped early: the run reached the maximum cost per run you set, after N row(s). Nothing more was read, delivered or charged. Raise the maximum cost per run to collect more."
- If the run is about to reach its timeout, it stops reading about 20 seconds before, keeps every row already returned, and ends with the status: "Partial results: stopped before the platform timeout (N row(s) saved). Give the run more time (Timeout in the run options) to collect everything in one run." Such a run never marks products EXPIRED.
- Links that are not product listings (sitemaps, robots.txt, store finder pages, service addresses, files and other site pages) are skipped before any request, with one log line each.
- If the run has no residential access and the backup connection still could not load the data: "No results: residential proxies are unavailable on this run (Apify free plans do not include them), and the backup connection could not load the requested Asda pages. Upgrade at https://apify.com/pricing or supply your own proxy URLs, then try again."
- If every request failed for another reason: "Could not load any results page (the requests failed), so nothing was collected. This is a connection problem, not an empty search. Please try again later."

Each of these failure messages ends with how many of your searches or links could not be read. A run with no keywords, categories, brands or supported links fails at once with "Nothing to scrape: add search keywords (or a category or brand) in Search mode, or paste valid asda.com search or product links in URL mode." If only some keywords or links could be read, you still get what was found, and the run's status message says how many could not be read.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear or Airtable.

### 🔗 Want more grocery data?

Pair this actor with these related scrapers from the same team:

<table>
<tr><td>🥦 <a href="https://apify.com/abotapi/woolworths-au-scraper"><b>Woolworths AU Scraper</b></a><br>Scrape Woolworths Australia (woolworths.com.au) grocery products and reviews. Search by...</td><td>🥦 <a href="https://apify.com/abotapi/coles-au-scraper"><b>Coles AU Scraper</b></a><br>Scrape Coles.com.au grocery products and customer reviews. Search by keyword, browse...</td></tr>
<tr><td>🥦 <a href="https://apify.com/abotapi/rewe-de-scraper"><b>REWE.de Scraper</b></a><br>Scrape REWE Germany (rewe.de) grocery products: current price, was-price and discount...</td><td>🥦 <a href="https://apify.com/abotapi/aldi-com-au-scraper"><b>ALDI AU Scraper</b></a><br>Scrape ALDI Australia (aldi.com.au) products: name, brand, price, was-price, savings...</td></tr>
<tr><td>🥦 <a href="https://apify.com/abotapi/flashfood-grocery-deals-scraper"><b>Flashfood Scraper</b></a><br>Scrape Flashfood discounted groceries and stores by location or store. Extract current...</td><td>🥦 <a href="https://apify.com/abotapi/mercadona-es-scraper"><b>Mercadona Scraper</b></a><br>Scrape Mercadona products by delivery-area postal code. Search by keyword or category, or...</td></tr>
</table>

👉 [Browse all abotapi scrapers](https://apify.com/abotapi)

### 💬 Support

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/asda-com-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <contact@abotapi.com>.
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to run keyword, category or brand searches, or 'url' to paste asda.com search or product links.

## `searchTerms` (type: `array`):

Products to look for, one keyword per row (for example milk, sourdough, shampoo). Leave empty and fill Categories or Brands to browse a whole aisle or brand instead.

## `region` (type: `string`):

Asda sells at one price list per region; prices, was-prices, offers and promotions in every row are those of this region. A pasted link with a region in its sort (for example SC_PRICE-LOW-TO-HIGH) uses that region for the link.

## `sortBy` (type: `string`):

Relevance is the best-match order. The price orders list every product that matches the words, cheapest or dearest first, which can include more loosely related products than Relevance.

## `brands` (type: `array`):

Only products of these brands (exact brand names as Asda writes them, for example ASDA, Alpro, Cravendale). Several brands are combined with OR.

## `categories` (type: `array`):

Only products in these categories, departments, aisles or shelves (names as Asda writes them, for example Chilled Food, Fresh Milk, Bakery). Several names are combined with OR. Combine with an empty keyword list to browse the whole selection.

## `minPrice` (type: `number`):

Only products priced at or above this amount in the selected region.

## `maxPrice` (type: `number`):

Only products priced at or below this amount in the selected region.

## `minRating` (type: `number`):

Only products whose average customer rating is at least this many stars.

## `onlyOffers` (type: `boolean`):

Only products on a Rollback or other offer in the selected region.

## `inStockOnly` (type: `boolean`):

Only products that can be bought at the store set in Store number below. Off by default: every row carries its in-stock flag and the stock count of every store either way.

## `storeId` (type: `integer`):

Asda store number used for the in-stock flag of every row (and the filter above). 4565 is the store the website uses by default. The stock of every store is always listed in storeStock.

## `urls` (type: `array`):

Paste asda.com links: a search page (/groceries/search/milk), also with its sort (?sort=EN_PRICE-LOW-TO-HIGH, where the first letters pick the price region), or a product page (/groceries/product/.../538241), which returns that one product. Home pages, store pages and other site pages are skipped.

## `maxPages` (type: `integer`):

Optional. Limits how many result pages (100 products each) each keyword or link walks. Empty or 0 means no page limit; it does NOT cap the run by itself, Max items below does.

## `maxItems` (type: `integer`):

THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is quick and cheap. 0 means no limit from this setting: the run then reads a whole search or category and is still bounded by the end of the results and by your maximum cost per run.

## `maxItemsPerSearch` (type: `integer`):

Optional. Caps how many products each keyword 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.

## `proxy` (type: `object`):

Leave this on the default (Automatic): it serves every request this actor makes and is the cheapest option. Residential is optional and is billed to your own Apify plan. You can also paste your own proxy URL.

## `resumeFromRunId` (type: `string`):

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` (type: `boolean`):

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, except the result page, the scrape time, the keyword it was found through, the per-store stock counters and untraited-store list, the campaign category path, the secondary categories and the badge icon list, and by default its rating and rating count (see Ignore fields below); with 'Price and offers only' just price, was-price, offer type, price per unit, in-stock flag, status, online flag and the offers of each product (id, name, type) are compared. State is kept separately for each keyword, link, region, sort and filter setup; use State key to name a monitoring campaign (one key per setup).

## `stateKey` (type: `string`):

Optional. Name this monitoring campaign to keep its state stable across runs with the same search setup. If runs with a different search, link, region, sort or filter setup share one key, they list different products, so such a run marks nothing EXPIRED (it says so in the log); use one key per setup. Leave empty to derive a key automatically from this run's search and filter setup. One state key tracks up to 2,000 products at the default memory.

## `changeScope` (type: `string`):

'Price and offers only' compares just price, was-price, offer type, price per unit, the in-stock flag, status, the online flag and the id, name and type of each offer; a name, image or category 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).

## `compactUpdates` (type: `boolean`):

When on, an UPDATED row carries only identifiers plus the price and stock fields that actually moved (priceChanges, and variantChanges for each offer added, removed or changed), instead of the full record. Off by default.

## `expireAfterMissedScans` (type: `integer`):

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.

## `emitUnchanged` (type: `boolean`):

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.

## `emitExpired` (type: `boolean`):

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 search walked to the end of its results. Never when Max items, Max pages or the maximum cost per run stopped it, when a search matched more than 10,000 products, for single-product links, when any page could not be read, or when Resume was used. This returns, and bills, extra synthetic rows.

## `ignoreFieldsForChanges` (type: `array`):

Field names that must NOT count as a change in incremental mode. The default list leaves out the rating (avgRating) and the rating count (ratingCount), which drift with every new rating; remove names 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.

## `mcpConnectors` (type: `array`):

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` (type: `string`):

URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on items written to each connector per run. Does not affect the dataset.

## `notifyOnlyChanges` (type: `boolean`):

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.

## `notificationLimit` (type: `integer`):

How many product rows the alert message lists (the run's totals are always in the first line).

## `slackWebhookUrl` (type: `string`):

Optional Slack incoming-webhook URL to post the summary to.

## `discordWebhookUrl` (type: `string`):

Optional Discord channel webhook URL to post the summary to.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "milk"
  ],
  "region": "EN",
  "sortBy": "relevance",
  "onlyOffers": false,
  "inStockOnly": false,
  "storeId": 4565,
  "urls": [
    "https://www.asda.com/groceries/search/milk",
    "https://www.asda.com/groceries/search/milk?sort=EN_PRICE-LOW-TO-HIGH"
  ],
  "maxItems": 20,
  "maxItemsPerSearch": 0,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "changeScope": "all",
  "compactUpdates": false,
  "expireAfterMissedScans": 1,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "avgRating",
    "ratingCount"
  ],
  "maxNotifyListings": 50,
  "notifyOnlyChanges": false,
  "notificationLimit": 5
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `changes` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "search",
    "searchTerms": [
        "milk"
    ],
    "region": "EN",
    "sortBy": "relevance",
    "onlyOffers": false,
    "inStockOnly": false,
    "storeId": 4565,
    "urls": [
        "https://www.asda.com/groceries/search/milk",
        "https://www.asda.com/groceries/search/milk?sort=EN_PRICE-LOW-TO-HIGH"
    ],
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true
    },
    "incrementalMode": false,
    "compactUpdates": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": [
        "avgRating",
        "ratingCount"
    ],
    "notifyOnlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/asda-com-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "search",
    "searchTerms": ["milk"],
    "region": "EN",
    "sortBy": "relevance",
    "onlyOffers": False,
    "inStockOnly": False,
    "storeId": 4565,
    "urls": [
        "https://www.asda.com/groceries/search/milk",
        "https://www.asda.com/groceries/search/milk?sort=EN_PRICE-LOW-TO-HIGH",
    ],
    "maxItems": 20,
    "proxy": { "useApifyProxy": True },
    "incrementalMode": False,
    "compactUpdates": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [
        "avgRating",
        "ratingCount",
    ],
    "notifyOnlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/asda-com-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "searchTerms": [
    "milk"
  ],
  "region": "EN",
  "sortBy": "relevance",
  "onlyOffers": false,
  "inStockOnly": false,
  "storeId": 4565,
  "urls": [
    "https://www.asda.com/groceries/search/milk",
    "https://www.asda.com/groceries/search/milk?sort=EN_PRICE-LOW-TO-HIGH"
  ],
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "compactUpdates": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "avgRating",
    "ratingCount"
  ],
  "notifyOnlyChanges": false
}' |
apify call abotapi/asda-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/asda-com-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bVPA7GaIXCF285JQE/builds/fr2KdtvuGFXD0Q2VR/openapi.json
