Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APIB&M

    bmstores.search

    Products in B&M's UK range that match a search: price, was price and RRP, size, brand, categories, stock status, Special Buys and promotions.

    Id
    bmstores.search
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/bmstores.search/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of bmstores.search
    FieldTypeDescription
    queryrequiredstringWhat to look for, e.g. paint, garden chair.Limit: at least 1 characters, at most 200 characters.
    pageintegerThe page of the results, from 1.Limit: 1 to 100. Default: 1.
    max_resultsintegerHow many products a page holds. Up to 48.Limit: 1 to 48. Default: 24.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of bmstores.search
    FieldTypeNotes
    product_codestringB&M's product code, the number at the end of the product's address, e.g. 236925.
    titlestringThe product's name.
    urlstringThe product's page on bmstores.co.uk.
    pricenumber or nullThe price, in pounds. Null where B&M does not show it online (an age-restricted product).
    was_pricenumber or nullThe earlier price the page shows struck through, in pounds. Null when none is shown.
    rrpnumber or nullThe recommended retail price the page shows, in pounds. Null when none is shown.
    unit_pricestring or nullThe price per unit as printed, e.g. £5.80/litre.
    sizestring or nullThe pack size, e.g. 5L.
    brandstring or nullThe brand, e.g. Johnstone's Paint.
    categoriesarray of stringThe product's categories from the widest to the narrowest, e.g. DIY, Paint, Interior Paint, Emulsion.
    stock_statusstring or nullB&M's stock status as it states it, e.g. In Stock.
    buy_onlineboolean or nullTrue when the product can be bought online; most of B&M's range is sold in stores only.
    special_buyboolean or nullTrue for a Special Buy, a product in stores for a limited time.
    on_saleboolean or nullTrue when the product is marked as reduced.
    labelstring or nullThe label printed on the product's picture, e.g. WOW, NEW.
    promotionstring or nullA promotion the product is in, as worded, e.g. 2 for £5.
    imagestring or nullThe product's picture.
    summarystring or nullB&M's short description of the product.
    descriptionstring or nullThe product's full description, as plain text.
    fetched_atstring (date-time)When the search was read, in UTC.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/bmstores.search/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"query":"paint"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("bmstores.search", {"query": "paint"})
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("bmstores.search", { query: "paint" });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "bmstores.search", map[string]any{"query": "paint"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("bmstores.search", Map.of("query", "paint"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run bmstores.search --input query=paint

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "query": "paint"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "bmstores.search",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "query": "paint"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "product_code": "236925",
          "title": "Johnstone's Paint Vinyl Silk Emulsion 5L - Seashell",
          "url": "https://www.bmstores.co.uk/products/johnstone-s-paint-vinyl-silk-emulsion-5l-seashell-236925",
          "price": 29,
          "was_price": null,
          "rrp": null,
          "unit_price": "£5.80/litre",
          "size": "5L",
          "brand": "Johnstone's Paint",
          "categories": [
            "DIY",
            "Paint",
            "Interior Paint"
          ],
          "stock_status": "In Stock",
          "buy_online": false,
          "special_buy": false,
          "on_sale": false,
          "label": null,
          "promotion": null,
          "image": "https://cdn.bmstores.co.uk/images/hpcProductImage/imgTeaserBox/236925-johnstones-seashell-silk-5l-paint.jpg",
          "summary": "Johnstone's Paint Vinyl Silk Emulsion - Seashell. A smooth, rich and non-reflective finish for interior walls & ceilings. Buy matt emulsion paint at B&M",
          "description": "Johnstone's Paint Vinyl Silk Emulsion.\nJohnstone’s Silk emulsion provides an attractive high sheen finish for interior walls and ceilings.\nLow odour and quick drying.\nColour: Seashell\nSize: 5L (Approx.)\nSee Specification tab for coverage. … [truncated]",
          "fetched_at": "2026-11-19T18:52:21.789873Z"
        }
      ],
      "next_cursor": null
    }

    What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].

    • Shortened: categories: 4 items, the first 3 shown.
    • Shortened: description: 303 characters, the first 238 shown.

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the B&M scrapers are in their own section there.