# Walmart.ca Grocery Scraper — Canadian Prices & Rollbacks (`ocrad/walmart-ca-grocery-scraper`) Actor

Scrape Walmart Canada (walmart.ca) grocery products from any category or search URL, English or French: title, CAD price, was price, unit price per 100 g, rollback flag, availability, rating, reviews, seller, image, category; plus brand, UPC, ingredients and description.

- **URL**: https://apify.com/ocrad/walmart-ca-grocery-scraper.md
- **Developed by:** [Ocrad](https://apify.com/ocrad) (community)
- **Categories:** E-commerce, Lead generation, Agents
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-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

### Walmart.ca Grocery Scraper — Canadian Prices & Rollbacks

***

Scrape **Walmart Canada** (walmart.ca) grocery products as structured data. Point the Actor at any grocery category, aisle or search page, in English or French, and it returns every product with its CAD price, was price, unit price (per 100 g / 100 ml), Rollback flag, availability, rating, review count, seller, image and full category path. Turn on product pages to also get the brand, package size, UPC, Walmart item number, ingredients, description and specifications.

**Data source:** the page data Walmart.ca embeds in its own category, search and product pages (`__NEXT_DATA__`). No login and no browser: 40 products per listing request.

***

#### **📋 Example Output**

```json
{
  "id": "6000197838147",
  "url": "https://www.walmart.ca/en/ip/Great-Value-Smooth-Peanut-Butter/6000197838147",
  "title": "Great Value Smooth Peanut Butter",
  "brand": "Great Value",
  "size": "1 kg",
  "price": 4.47,
  "wasPrice": null,
  "savings": null,
  "unitPrice": 0.45,
  "unitPriceUnit": "100g",
  "unitPriceText": "45.0 ¢/100g",
  "currency": "CAD",
  "onSale": false,
  "rollback": false,
  "clearance": false,
  "soldByWeight": false,
  "availability": "IN_STOCK",
  "imageUrl": "https://i5.walmartimages.ca/asr/53823b45-d885-4e02-9c7c-a34a30525397.60eabf7e45f6621335d45492ddc169a7.jpeg",
  "category": "Grocery > Pantry Food > Nut Butters & Spreads > Peanut Butter",
  "rating": 4.5,
  "reviewCount": 409,
  "sellerName": "Walmart",
  "storeId": "3180",
  "badges": "BESTSELLER",
  "upc": "628915641745",
  "walmartItemNumber": "30266921",
  "description": "For a classic treat you can enjoy any time, reach for Great Value Smooth Peanut Butter. Prepared using dry roasted peanuts, this smooth peanut butter delivers that nutty flavour you know and love with a creamy texture that's easy to spread and serves up a delectable finish. …",
  "ingredients": "Dry roasted peanuts, icing sugar, modified palm oil, salt. Contains: Peanuts. May contain: Tree nuts.",
  "nutrition": null,
  "specifications": "Flavor: Peanut; Texture: Smooth; Food Form: Spread; Food Condition: Shelf-Stable; Container Type: Jar; SKU: 6000197838147; Universal Product Code (UPC check): 628915641745; Walmart Item #: 30266921",
  "storeName": "MONTREAL MARCHE CENTRAL",
  "language": "en",
  "scrapedAt": "2026-11-03T21:18:13.394Z"
}
```

*(Record from a run with `detailedInfo: true`; the description is shortened here.)*

#### ⚙️ **Configuration**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | String | *(required)* | A walmart.ca category or search URL, English or French, e.g. `https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370` or `https://www.walmart.ca/en/search?q=peanut+butter`. |
| `maxItems` | Integer | `100` | Maximum number of products to return (0 = all). Walmart shows 40 products per page and at most 20 pages (800 products) per category or search. |
| `detailedInfo` | Boolean | `false` | Also open each product page for brand, package size, UPC, Walmart item number, ingredients, description, specifications and store name. One extra request per product, so it is much slower. |
| `proxyConfiguration` | Object | Apify Proxy (auto) | Proxy settings. Switch to RESIDENTIAL (country Canada) only if results are empty. |

##### Example Input

```json
{
  "url": "https://www.walmart.ca/en/browse/grocery/dairy-eggs/10019_6000194327369",
  "maxItems": 200,
  "detailedInfo": false
}
```

##### Getting your start URL

1. Open walmart.ca, go to **Grocery** and pick a department or aisle (Fruits & Vegetables, Dairy & Eggs, Pantry…), or type a search keyword
2. Copy the address from your browser, e.g. `https://www.walmart.ca/en/browse/grocery/pantry-food/10019_6000194326346` or `https://www.walmart.ca/fr/browse/epicerie/fruits-legumes/10019_6000194327370`
3. Paste it as the `url` input. Sorting and filters in the URL are kept and the Actor handles pagination. French `/fr/` URLs return French titles and categories.

##### Notes

- **Prices are for one store.** Walmart.ca shows prices and availability for the store it picks from the visitor's location. `storeId` (and `storeName` with `detailedInfo`) tell you which store a record is for. The store cannot be chosen in the input.
- `price` is the current shelf price. For items sold by weight (`soldByWeight: true`, such as bananas or peppers) it is Walmart's average price per item. `wasPrice` and `savings` are filled only when the item is reduced. `rollback` is `true` when Walmart shows its Rollback badge.
- `unitPrice` is in CAD per `unitPriceUnit` (e.g. `0.45` per `100g`). Walmart shows it only for some products.
- Listing pages do not include the brand. `brand`, `upc`, `ingredients` and the other detail fields come from product pages (`detailedInfo: true`). Without it, `size` is read from the product title.
- `nutrition` is filled only when Walmart publishes nutrition facts as data. Most Walmart.ca grocery items show them only as a label image, so expect this field to be empty most of the time.
- Search results cover the whole Walmart.ca catalogue, not only grocery, and include marketplace sellers (`sellerName`).
- Walmart uses bot protection. The Actor sends one request at a time with pauses between them. If product pages are refused, the remaining products are still returned with their listing data.

***

#### 💬 **Support and Feedback**

Reach out via Apify support channels or leave feedback on the Actor's page.

#### **Is it legal to scrape Walmart.ca data?**

It is legal to scrape publicly available product data such as names, prices and availability for price monitoring, research and comparison. The Actor collects no personal data. Consult your legal advisor if unsure about your specific use.

# Actor input Schema

## `url` (type: `string`):

A walmart.ca grocery category or search URL, English (/en/) or French (/fr/), e.g. https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370 or https://www.walmart.ca/en/search?q=peanut+butter. Sorting and filter parameters in the URL are kept.

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

Maximum number of products to return (0 = all). Walmart serves 40 products per page and shows at most 20 pages (800 products) per category or search.

## `detailedInfo` (type: `boolean`):

Also open each product page for the brand, package size, UPC, Walmart item number, ingredients, full description, specifications and the store name. Slower: one extra request per product.

## `proxyConfiguration` (type: `object`):

Proxy settings. Defaults to Apify Proxy (auto). Switch to RESIDENTIAL only if results are empty.

## Actor input object example

```json
{
  "url": "https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370",
  "maxItems": 40,
  "detailedInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `id` (type: `string`):

Walmart item id (usItemId)

## `url` (type: `string`):

Product page on walmart.ca

## `title` (type: `string`):

Product name

## `brand` (type: `string`):

Brand (product pages only, with detailedInfo; null in listing mode)

## `size` (type: `string`):

Package size (from the product page with detailedInfo, otherwise parsed from the title, e.g. '1 kg')

## `price` (type: `string`):

Current price in CAD (average price for items sold by weight)

## `wasPrice` (type: `string`):

Regular price before the reduction in CAD (null when not on sale)

## `savings` (type: `string`):

Amount saved in CAD (null when not on sale)

## `unitPrice` (type: `string`):

Unit price in CAD per unitPriceUnit (e.g. 0.25 per 100g)

## `unitPriceUnit` (type: `string`):

Unit of the unit price (100g, 100ml, ea…)

## `unitPriceText` (type: `string`):

Unit price as displayed (e.g. '25.0 ¢/100g')

## `currency` (type: `string`):

Always CAD

## `onSale` (type: `string`):

true when the item shows a was price (rollback / reduced)

## `rollback` (type: `string`):

true when Walmart flags the item as a Rollback

## `clearance` (type: `string`):

true when Walmart flags the item as Clearance

## `soldByWeight` (type: `string`):

true for items priced by weight (price is an average)

## `availability` (type: `string`):

Availability status (IN_STOCK, OUT_OF_STOCK…)

## `imageUrl` (type: `string`):

Main product image

## `category` (type: `string`):

Category path, e.g. 'Grocery > Pantry Food > Nut Butters & Spreads > Peanut Butter'

## `rating` (type: `string`):

Average customer rating (0-5)

## `reviewCount` (type: `string`):

Number of customer reviews

## `sellerName` (type: `string`):

Seller (Walmart or a marketplace seller)

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

Walmart store the prices and availability refer to

## `badges` (type: `string`):

Merchandising badges joined with ', ' (ROLLBACK, BESTSELLER…)

## `upc` (type: `string`):

UPC barcode (detailedInfo)

## `walmartItemNumber` (type: `string`):

Walmart item # (detailedInfo)

## `description` (type: `string`):

Short + long description as plain text (detailedInfo)

## `ingredients` (type: `string`):

Ingredients list (detailedInfo, when published)

## `nutrition` (type: `string`):

Nutrition facts as text (detailedInfo, only when Walmart publishes them as data)

## `specifications` (type: `string`):

Specifications as 'Name: value; …' (detailedInfo)

## `storeName` (type: `string`):

Name of the pickup store (detailedInfo)

## `language` (type: `string`):

Site language of the record (en or fr)

## `scrapedAt` (type: `string`):

ISO 8601 timestamp when the record was scraped

# 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 = {
    "url": "https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370",
    "maxItems": 40,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ocrad/walmart-ca-grocery-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 = {
    "url": "https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370",
    "maxItems": 40,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ocrad/walmart-ca-grocery-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 '{
  "url": "https://www.walmart.ca/en/browse/grocery/fruits-vegetables/10019_6000194327370",
  "maxItems": 40,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ocrad/walmart-ca-grocery-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ocrad/walmart-ca-grocery-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/OUqaC95lFppIZA6RX/builds/g3Cnj8wJtxjyDqNvK/openapi.json
