# B\&Q UK Scraper - Products, Prices, Stock & Store Availability (`abotapi/diy-com-scraper`) Actor

Scrape B\&Q (diy.com) products by keyword or URL. Extract prices, VAT, discounts, EANs, descriptions, specifications, images, ratings, delivery and click & collect availability. Includes store-level stock, aisle and bay locations. Supports category, search, brand and product URLs.

- **URL**: https://apify.com/abotapi/diy-com-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 product results

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

## B\&Q Scraper: Products, Prices, Stock & Store Availability (UK)

B\&Q Scraper turns diy.com, the UK's home improvement retailer, into structured product data. Search by keyword, or paste a category, search, brand or product link, and get prices with and without VAT, was-prices and savings, EAN barcodes, descriptions, specifications, full image galleries, category paths, ratings, delivery and click and collect status, and, for any store you pick, the units on the shelf with aisle and bay. 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 with brand, seller, price, rating and offers-only filters, whole category pages (also with their facets, sort and page), brand pages and product pages, each read to its natural end or to the cap you set.
- **Complete product records on every row.** Description, feature list, information bullets, specifications as name and value pairs, the full image gallery, the category path as a breadcrumb, manuals and the product options, without a second request per product.
- **Prices that tell the whole story.** Price including VAT, price excluding VAT, VAT rate, was-price, saving, discount percentage, unit of measure, the free-delivery threshold and the delivery charges, all in pounds sterling.
- **In-store stock for any store.** Set a store number and each row adds the units on the shelf, the aisle and bay, the store's own click and collect status and its in-store availability, read in batches.
- **Seller and status.** Who sells the product (B\&Q or a verified marketplace seller), the product status, whether it can be bought, promotions and the shop's own tags.
- **Ratings.** Average rating and review count of each product.
- **Monitoring built in.** Label every product NEW, UPDATED, REAPPEARED or EXPIRED across scheduled runs, track price and availability 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 savings for tools, paint, flooring, garden and kitchen products, and get alerted only to what actually changed.
- **Store stock and availability tracking:** follow the units on the shelf, the aisle and bay and the collection status of a product line in one store.
- **Market analysis:** compare B\&Q ranges, price bands, brands and marketplace seller share by category or keyword.
- **Catalog enrichment:** match your own product list to B\&Q by EAN and add descriptions, specifications, images and category paths.
- **Delivery planning:** follow the free-delivery threshold, delivery charges and the home delivery and collection status per product.

### Data You Get

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

| Field | Example |
| --- | --- |
| `ean` / `sku` / `seoId` | `"0000000000000"` / `"0000000000000"` / `"0000000000000_BQ"` |
| `name` / `shortName` / `brand` | `"Sample Brand Cordless Drill"` / `"Cordless Drill"` / `"Sample Brand"` |
| `description` / `features` / `infoBullets` | the product copy as plain text / the feature list / the information bullets such as the guarantee |
| `specifications` | name and value pairs, e.g. `[{"name": "Voltage", "value": "18V"}]` |
| `price` / `priceExVat` / `vatRate` / `currency` | `89` / `74.17` / `20` / `"GBP"` |
| `originalPrice` / `saving` / `savingExVat` / `discountPercentage` | `99` / `10` / `8.33` / `10.1` |
| `unitOfMeasure` | `"Each"` |
| `rating` / `reviewCount` | `4.8` / `113` |
| `image` / `images` / `url` | main image / full gallery / the product page |
| `category` / `categoryId` / `categories` / `breadcrumbs` | `"Combi drills"` / `"DIY000000"` / the category names / `[{"name": "Power tools", "url": "..."}]` |
| `sellerName` / `sellerId` / `offerId` / `isMarketplace` | `"B&Q"` or the marketplace seller / `null` / `null` / `false` |
| `productStatus` / `purchasable` | `"Available"` / `true` |
| `promotions` / `merchandisingTags` | the promotions the product carries / `["Free Next Day Delivery"]` |
| `multiSku` / `multiSkuVariants` / `multiSkuPriceRange` | `true` / the options with `ean`, `variant`, `value` and `price` / `{"min": 104, "max": 130}` |
| `deliveryChargeThreshold` / `deliveryChargeAboveThreshold` / `deliveryChargeBelowThreshold` | `100` / `0` / `6` |
| `homeDeliveryAvailability` / `clickCollectAvailability` / `inStoreAvailability` | `"Available"` / `"Available"` / `"InStock"` |
| `storeId` / `storeName` / `storeType` / `storeStockQty` / `aisle` / `bay` / `clickCollectNote` / `stockCheckedAt` | the store you set / its name / its type, such as Warehouse / units on the shelf / `"000"` / `"00"` / the shop's own collection message / when the stock was read |
| `manuals` | `[{"name": "Instruction manual", "type": "Product Instruction Manual", "url": "..."}]` |
| `query` / `sourceUrl` / `position` / `page` / `scrapedAt` | which keyword or pasted link found the row, its place in the walk, the result page 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 |

The in-store fields (`storeId`, `storeName`, `storeType`, `storeStockQty`, `aisle`, `bay`, `clickCollectNote`, `stockCheckedAt`) are filled only when a store is set (the **Store ID** field) and **Fetch in-store stock** is on; with a store set, the three availability fields also switch from the product's listing-wide status to that store's own status. Products that a marketplace seller ships report no unit count or shelf location. `isMarketplace` is true for every seller other than B\&Q.

**Output views.** The dataset has four views in the Console: **Products**, **Product details**, **In-store stock** 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 switch to **url** mode and paste category, search, brand or product links.
2. Narrow with brands, a seller, a price range, a minimum rating or offers only, and choose a sort order.
3. Add a **Store ID** to include that store's stock, aisle and bay, or leave it empty for the listing-wide status only.
4. Set **Max items** to control run size and cost, then click **Start**.

**Quick keyword search:**

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

**Offers only, one brand, cheapest first, with one store's stock:**

```json
{
  "mode": "search",
  "searchTerms": ["cordless drill"],
  "brands": ["DeWalt", "Bosch"],
  "onlyOffers": true,
  "sortBy": "price_low",
  "storeId": "1292",
  "maxItems": 50
}
```

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

```json
{
  "mode": "url",
  "urls": [
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?Brand=DeWalt&sort=product.price",
    "https://www.diy.com/brands/capietra",
    "https://www.diy.com/departments/dewalt-xr-18v-li-ion-brushed-cordless-combi-drill-1-x-2ah-dcd776d1t-gb/5035048741382_BQ.prd"
  ],
  "maxItemsPerSearch": 10,
  "maxItems": 30
}
```

#### Pasted links

- **Category pages** such as `/departments/tools-equipment/power-tools/drills/DIY637279.cat`, also with `?page=2` (starts at that page), `?sort=product.price` (keeps that sort) and facets such as `?Brand=DeWalt` or `?Price=50..100`. Tracking parameters are ignored.
- **Keyword searches** such as `/search?term=hammer`. A keyword the shop maps to one of its own categories (for example `drill`) reads that category, and a product code (EAN) reads that product; both are the shop's own selection, so they never trigger EXPIRED detection.
- **Brand pages** such as `/brands/capietra` read that brand's own keyword search, a derived selection.
- **Product pages** such as a `.prd` address return one complete row.
- Links on the bare and the mobile host are read as the shop's own host.
- **Not read:** sitemaps and `robots.txt`, the store finder and store pages, home pages, the seller directory, service addresses and other files list no products. They are skipped before any request with a note in the log, and a run given only such links fails at once. To read one store's stock, put its number (the number in a store address such as `/store/1292`) in the **Store ID** field.

#### Caps and pagination

**Max items** stops the whole run once that many products have been returned (`0` = no item cap; the run is then bounded by the results and your maximum cost per run). **Max items per keyword or link** caps each one on its own, so one large category cannot use up the whole run. **Max pages** limits how many result pages each keyword or link walks; it does not cap the run by itself. Without a cap, each keyword or category is walked to its last page of 48 products. A pasted link with `?page=N` and N above 1 starts at that page and never triggers EXPIRED detection. The search filters (brands, seller, price, rating, offers only and sort) apply to keyword searches only; a pasted link keeps its own facets and sort.

#### 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 keyword or link. 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 walk started at page 1 and read as many distinct products as the site's result total, on one listing, with every wanted stock lookup read; never after a capped, page-limited, cost-limited or resumed run, a pasted later page, a brand or redirected keyword link, a run stopped before the platform timeout, or a run where any page could not be read). A keyword search re-ranks its results from one read to the next, so a product a keyword search no longer lists is marked `EXPIRED` only once its own product page answers that it no longer exists (not found); any other answer keeps it tracked (up to 100 such checks per run; the rest stay tracked and are checked on a later run). A removed product that the shop answers in some way other than not-found therefore stays tracked: it may take longer to show as `EXPIRED` (a missed EXPIRED), but it is never marked or billed as EXPIRED falsely. The result position and page, the scrape and stock-check times and the keyword or link a product was found through never count as a change. The order in which a product lists its options (new, refurbished) is not a change either. `ignoreFieldsForChanges` defaults to the rating (`rating`), the review count (`reviewCount`) and the units on the shelf (`storeStockQty`), which drift all day; remove names to be told about them, or add more. `changeScope: "priceAndStock"` compares only price, price excluding VAT, was-price, saving, promotions, product status, the purchasable flag, the delivery, collection and in-store availability, the store's units on the shelf and per-option prices; `compactUpdates` returns slim rows with just what moved. If a store's stock cannot be read during an incremental run, those products are held back (not returned, not charged, their saved state untouched) and the next run that can read them reports them. `stateKey` names the stored state; leave it empty and the actor derives one from the run's keyword, link, sort, filter, seller and store setup and the **Fetch in-store stock** setting, so each setup keeps its own state. Use one state key per setup: if a run's setup differs from the one that last saved the state (another keyword, link, sort, filter or store), products are still compared, but nothing is marked EXPIRED that run, the log says so once, and products only the earlier setup listed are never marked EXPIRED by the new one. Changing the store under an automatic key starts a new campaign: the next run reports every product as NEW again (and bills it as a returned row). One state key tracks up to 1,500 products at the minimum memory and 3,000 at the default memory (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; a saved state over the limit is not loaded and the run starts fresh. Split very large campaigns across several state keys.

#### Alerts

Fill in a Slack incoming webhook, a Discord channel webhook or a Telegram bot token with a chat ID, 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) or `url` (pasted links). |
| `searchTerms` | array | `hammer` | Search mode: keywords to search, each read separately. |
| `sortBy` | string | `relevance` | `relevance`, `price_low`, `price_high`, `top_rated` (customer rating) or `newest` (new arrivals). |
| `brands` | array | (none) | Keep only these brands, spelled as the store spells them; several are combined as "any of these". |
| `soldBy` | string | `any` | `any`, `B&Q` (sold by B\&Q itself) or `Verified seller` (marketplace sellers). |
| `minPrice` | number | (none) | Lowest price kept, in pounds sterling, VAT included. |
| `maxPrice` | number | (none) | Highest price kept, in pounds sterling, VAT included. |
| `minRating` | number | (none) | Only products rated at least this many stars; unrated products are left out. |
| `onlyOffers` | boolean | `false` | Only products that currently show a saving. |
| `urls` | array | one link of each shape | URL mode: category, search, brand and product links on diy.com, see Pasted links above. Links that list no products are skipped before any request. |
| `fetchDetails` | boolean | `true` | Add one store's stock to each row (needs a store; charged per row that received it). |
| `storeId` | string | `1292` in the form | B\&Q store number whose stock is read; empty skips in-store stock. |
| `postalCode` | string | (none) | Optional postcode area sent with the stock lookup; only used with a Store ID. |
| `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 | Residential, United Kingdom | 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 or share the incremental state. |
| `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, review count, units on the shelf | 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. |
| `telegramBotToken` | string | (none) | Optional Telegram bot token for the run summary. |
| `telegramChatId` | string | (none) | Telegram chat ID that receives the summary. |

### Output Example

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

```json
{
  "kind": "product",
  "ean": "0000000000000",
  "sku": "0000000000000",
  "seoId": "0000000000000_BQ",
  "name": "Sample Brand Cordless Drill 18V",
  "shortName": "Cordless Drill",
  "brand": "Sample Brand",
  "description": "Sample product description.",
  "features": ["Sample feature one", "Sample feature two"],
  "infoBullets": ["Guarantee - 2 years"],
  "specifications": [{"name": "Voltage", "value": "18V"}],
  "price": 89,
  "priceExVat": 74.17,
  "originalPrice": 99,
  "saving": 10,
  "discountPercentage": 10.1,
  "currency": "GBP",
  "vatRate": 20,
  "unitOfMeasure": "Each",
  "rating": 4.8,
  "reviewCount": 113,
  "image": "https://media.example.com/sample-1.jpg",
  "images": ["https://media.example.com/sample-1.jpg"],
  "url": "https://www.diy.com/departments/sample-drill/0000000000000_BQ.prd",
  "category": "Combi drills",
  "categoryId": "DIY000000",
  "breadcrumbs": [{"name": "Power tools", "url": "https://www.diy.com/departments/tools-equipment/power-tools/DIY000000.cat"}],
  "sellerName": "B&Q",
  "isMarketplace": false,
  "productStatus": "Available",
  "purchasable": true,
  "promotions": [],
  "merchandisingTags": ["Free Next Day Delivery"],
  "multiSku": false,
  "deliveryChargeThreshold": 100,
  "deliveryChargeBelowThreshold": 6,
  "homeDeliveryAvailability": "Available",
  "clickCollectAvailability": "Available",
  "inStoreAvailability": "InStock",
  "storeId": "0000",
  "storeName": "B&Q Sample Store",
  "storeType": "Warehouse",
  "storeStockQty": 8,
  "aisle": "000",
  "bay": "00",
  "clickCollectNote": "Next day Click & Collect",
  "manuals": [],
  "query": "cordless drill",
  "position": 1,
  "page": 1,
  "scrapedAt": "2026-01-20T08:00:00+00:00"
}
```

### Plan Requirement

Pay per event: one unit per returned product row, plus an actor start event, plus an in-store stock unit for each row actually enriched with a store's stock (only when a store is set). Each unit is charged per row, as the row is delivered, never as a single total at the end. A row whose store stock could not be read still ships without the stock unit, and an unchanged product left out in incremental mode is neither returned nor charged. This actor needs an Apify Proxy connection; the default is the Residential group with the United Kingdom, which is billed to your own Apify plan. Apify free plans do not include residential proxies: a free-plan run continues on a backup connection where B\&Q refuses part of the requests, so it may return fewer products or end with the failure message described in the FAQ; your own proxy URLs are the other option.

### FAQ

#### How much does it cost?

You pay per product row returned, plus one in-store stock unit per row enriched with a store's stock (only when a store is set; turn `fetchDetails` off or leave the store empty for listing-only rows). The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

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

This actor collects only publicly available product data that B\&Q shows on its own pages. You are responsible for how you use it: follow B\&Q's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and specifications are generally facts, but images and description text may be subject to third-party rights, so handle them in line with the rules that apply to you.

#### 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 availability moves.

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

The site groups the options of one product (sizes, conditions) into a single entry, and marketplace sellers appear in the same results. Filters you set (brands, seller, price, rating, offers only) narrow the same result the site would show, and rows without a rating are dropped when you set a minimum rating.

#### How do I get stock for my store?

Set **Store ID** to your store's number (the number in a store address such as `/store/1292`). Each row then carries the units on the shelf, the aisle and bay, and that store's own collection and in-store status. Products shipped by marketplace sellers have no shelf stock. If the number is not recognised, the log says so and rows carry the listing-wide status only.

#### Which proxy should I use?

The default (Residential, United Kingdom) is the setting measured to serve every page this actor reads. 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 `DIY_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 pages are then read over the backup connection: "Served over the backup connection (the default connection was unavailable)." Set `DIY_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 no page 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 has no residential access and the backup connection still could not load a usable page: "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 B\&Q pages. Upgrade at https://apify.com/pricing or supply your own proxy URLs, then try again."
- If the run is about to reach its timeout, it stops reading 20 seconds before it, keeps every row already returned and its status says: "Partial results: stopped before the platform timeout (N item(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. Set `DIY_COM_STOP_BEFORE_TIMEOUT=0` in the run's environment variables to turn this off.
- 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 (or, in incremental mode, how many products were held back because their stock could not be read). A run with no keywords or no supported links fails at once with "Nothing to scrape: add search keywords in Search mode, or paste valid diy.com category, search, brand 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.

#### Why does a row have no aisle, bay or unit count?

Those fields come from the stock of the store you set and need **Fetch in-store stock** on with a store. Products a marketplace seller ships, and products a store does not stock on the shelf, carry no unit count or shelf location.

#### 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 e-commerce data?

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

<table>
<tr><td>🛒 <a href="https://apify.com/abotapi/hornbach-de-scraper"><b>HORNBACH Products, Prices &amp; Reviews Scraper</b></a><br>Scrape HORNBACH (hornbach.de) DIY, building &amp; garden products: current + strike-through...</td><td>🛒 <a href="https://apify.com/abotapi/obi-de-scraper"><b>OBI.de Scraper</b></a><br>Scrape OBI (obi.de) DIY/home-improvement products: current + strike-through original...</td></tr>
<tr><td>🛒 <a href="https://apify.com/abotapi/castorama-fr-scraper"><b>Castorama.fr</b></a><br>Scrape Castorama.fr DIY and home-improvement products by keyword, category, or URL...</td><td>🔌 <a href="https://apify.com/abotapi/mvideo-scraper"><b>M.Video Scraper</b></a><br>Scrape M.Video (mvideo.ru), the Russian electronics and home appliance retailer: prices...</td></tr>
<tr><td>🏷️ <a href="https://apify.com/abotapi/bol-com-scraper"><b>bol.com Scraper</b></a><br>Scrape bol.com products: title, price, list price and discount, EAN, brand, images...</td><td>🛒 <a href="https://apify.com/abotapi/cdon-scraper"><b>CDON Scraper</b></a><br>Scrape CDON (cdon.se, cdon.no, cdon.dk, cdon.fi) marketplace products in Sweden, Norway...</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/diy-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 searches or 'url' to paste category, search, brand or product links.

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

One or more keywords to search on B\&Q, for example 'hammer', 'cordless drill' or a brand and model. Each keyword is searched separately. A keyword the shop maps to one of its own categories (for example 'drill') reads that category instead; a product code (EAN) reads that product.

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

Order of the results (keyword searches).

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

Only return products of these brands, written the way B\&Q shows them (for example 'DeWalt', 'Bosch'). Several brands are combined (any of them). Leave empty for all brands.

## `soldBy` (type: `string`):

Limit keyword results to products sold by B\&Q itself or by verified marketplace sellers. 'Any seller' (default) returns both.

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

Lowest price in pounds sterling (GBP), VAT included. Leave empty for no lower bound.

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

Highest price in pounds sterling (GBP), VAT included. Leave empty for no upper bound.

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

Only products rated at least this many stars (1 to 5). Products with no rating are left out. Leave empty for all.

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

Only return products that currently show a saving (a was-price above the current price).

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

Paste B\&Q links: a category page (with its ?page=, ?sort= and facet parameters such as ?Brand=DeWalt), a keyword search (/search?term=..., a product barcode works too), a brand page (/brands/...) or a product page (.prd). The bare diy.com and the mobile m.diy.com addresses are read like www.diy.com. A link with ?page=N starts at that page. Tracking parameters are ignored. Sitemaps, robots.txt, the store finder and store pages, home pages, the seller directory, service addresses and files list no products: they are skipped before any request, with a note in the log. To read a store's stock, set the Store ID field.

## `fetchDetails` (type: `boolean`):

Add one store's stock to each row: units on the shelf, aisle and bay, and the store-specific collection status. Needs a Store ID below; without a store nothing extra is read or charged. Charged once per row that received stock. Turn off to skip it.

## `storeId` (type: `string`):

The B\&Q store number whose stock to read, for example 1292 (Plymouth Crownhill). It is the number in a store address (/store/1292). Leave empty to skip in-store stock.

## `postalCode` (type: `string`):

Optional postcode area sent with the stock lookup, for example PL2. Only used together with a Store ID.

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

Optional. Limits how many result pages each keyword or link walks. Empty or 0 means no page limit (there is no default). It does NOT cap the run and defers to Max items below, the single default cap (20).

## `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. Use 0 for no item cap (a whole category or search); the run is then bounded by the results and 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 (Residential, United Kingdom) for the most reliable results. It 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 position and page, the scrape and stock-check times, the keyword or link it was found through, and by default its rating, review count and units on the shelf (see Ignore fields below); with 'Price and availability only' just price, was-price, saving, promotions, product status, purchasable flag, delivery, collection and in-store availability and per-variant prices are compared. State is kept separately for each keyword, link, sort, filter, seller and store setup; use State key to name or deliberately share a monitoring campaign.

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

Optional. Name this monitoring campaign to keep its state stable. Use one state key per setup: if a run's keywords, links, sort, filters or store differ from the run that last saved the state, products are still compared but nothing is marked EXPIRED that run, and products only the earlier setup listed are never marked EXPIRED by the new one. Leave empty to derive a key automatically from this run's search, filter and store setup. One state key tracks up to 1,500 products at the minimum memory and 3,000 at the default memory (more with more memory).

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

'Price and availability only' compares just price, price excluding VAT, was-price, saving, promotions, product status, the purchasable flag, delivery, collection and in-store availability, the store's units on the shelf and per-variant prices; a description, image or tag 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/stock fields that actually moved (priceChanges, variantChanges), 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 walk started at page 1 and read as many distinct products as the site's result total, with every wanted stock lookup read. Never when Max items, Max pages or the maximum cost per run stopped it, when a pasted link started past page 1, for brand or keyword-redirect links, when the run stopped before its timeout, when the saved state was written by a different setup, when any page could not be read, or when Resume was used. For keyword searches, a product the search no longer lists is marked EXPIRED only once its own product page says it is gone. 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 (rating), the review count (reviewCount) and the units on the shelf (storeStockQty), which drift all day; 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.

## `telegramBotToken` (type: `string`):

Optional Telegram bot token to post the summary with (needs the chat ID below).

## `telegramChatId` (type: `string`):

Optional Telegram chat ID that receives the summary (needs the bot token above).

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "hammer"
  ],
  "sortBy": "relevance",
  "soldBy": "any",
  "onlyOffers": false,
  "urls": [
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=2",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?sort=product.price",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?Brand=DeWalt&sort=product.price",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=3&utm_source=x",
    "https://www.diy.com/search?term=drill",
    "https://www.diy.com/search?term=hammer",
    "https://www.diy.com/search?term=5035048741382",
    "https://www.diy.com/departments/dewalt-xr-18v-li-ion-brushed-cordless-combi-drill-1-x-2ah-dcd776d1t-gb/5035048741382_BQ.prd",
    "https://www.diy.com/brands/capietra",
    "https://diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
    "https://m.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat"
  ],
  "fetchDetails": true,
  "storeId": "1292",
  "maxItems": 20,
  "maxItemsPerSearch": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  },
  "incrementalMode": false,
  "changeScope": "all",
  "compactUpdates": false,
  "expireAfterMissedScans": 1,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "rating",
    "reviewCount",
    "storeStockQty"
  ],
  "maxNotifyListings": 50,
  "notifyOnlyChanges": false,
  "notificationLimit": 5
}
```

# Actor output Schema

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

No description

## `detail` (type: `string`):

No description

## `stock` (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": [
        "hammer"
    ],
    "sortBy": "relevance",
    "soldBy": "any",
    "onlyOffers": false,
    "urls": [
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=2",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?sort=product.price",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?Brand=DeWalt&sort=product.price",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=3&utm_source=x",
        "https://www.diy.com/search?term=drill",
        "https://www.diy.com/search?term=hammer",
        "https://www.diy.com/search?term=5035048741382",
        "https://www.diy.com/departments/dewalt-xr-18v-li-ion-brushed-cordless-combi-drill-1-x-2ah-dcd776d1t-gb/5035048741382_BQ.prd",
        "https://www.diy.com/brands/capietra",
        "https://diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
        "https://m.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat"
    ],
    "fetchDetails": true,
    "storeId": "1292",
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "GB"
    },
    "incrementalMode": false,
    "compactUpdates": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": [
        "rating",
        "reviewCount",
        "storeStockQty"
    ],
    "notifyOnlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/diy-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": ["hammer"],
    "sortBy": "relevance",
    "soldBy": "any",
    "onlyOffers": False,
    "urls": [
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=2",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?sort=product.price",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?Brand=DeWalt&sort=product.price",
        "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=3&utm_source=x",
        "https://www.diy.com/search?term=drill",
        "https://www.diy.com/search?term=hammer",
        "https://www.diy.com/search?term=5035048741382",
        "https://www.diy.com/departments/dewalt-xr-18v-li-ion-brushed-cordless-combi-drill-1-x-2ah-dcd776d1t-gb/5035048741382_BQ.prd",
        "https://www.diy.com/brands/capietra",
        "https://diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
        "https://m.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
    ],
    "fetchDetails": True,
    "storeId": "1292",
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "GB",
    },
    "incrementalMode": False,
    "compactUpdates": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [
        "rating",
        "reviewCount",
        "storeStockQty",
    ],
    "notifyOnlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/diy-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": [
    "hammer"
  ],
  "sortBy": "relevance",
  "soldBy": "any",
  "onlyOffers": false,
  "urls": [
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=2",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?sort=product.price",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?Brand=DeWalt&sort=product.price",
    "https://www.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat?page=3&utm_source=x",
    "https://www.diy.com/search?term=drill",
    "https://www.diy.com/search?term=hammer",
    "https://www.diy.com/search?term=5035048741382",
    "https://www.diy.com/departments/dewalt-xr-18v-li-ion-brushed-cordless-combi-drill-1-x-2ah-dcd776d1t-gb/5035048741382_BQ.prd",
    "https://www.diy.com/brands/capietra",
    "https://diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat",
    "https://m.diy.com/departments/tools-equipment/power-tools/drills/DIY637279.cat"
  ],
  "fetchDetails": true,
  "storeId": "1292",
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "GB"
  },
  "incrementalMode": false,
  "compactUpdates": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "rating",
    "reviewCount",
    "storeStockQty"
  ],
  "notifyOnlyChanges": false
}' |
apify call abotapi/diy-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/diy-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/7Cxm1k9McdVM9hJLN/builds/YKPiNOHanLs4B5Ycg/openapi.json
