# Walmart (`datasaurus/walmart`) Actor

Scrape products from Walmart browse and search pages.

- **URL**: https://apify.com/datasaurus/walmart.md
- **Developed by:** [datasaurus](https://apify.com/datasaurus) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Products Scraper — Search, Prices & Details

Collect Walmart US, Canada and Mexico products for price monitoring, assortment research and competitor analysis. Search by keyword, use a Walmart search or category URL with its filters, or supply individual product URLs. Product-page enrichment adds descriptions, specifications and rating summaries where Walmart provides them.

| Feature | Listing results | With product-page details |
| --- | --- | --- |
| Price, availability, ratings and seller | When provided | When provided |
| UPC, model, specifications and variants | Limited | When provided |
| Product event cost | $0.001 | $0.004 for a newly fetched detail page |

The $0.005 run start is additional. At the configured rates, 100 listings cost $0.105 in events and 1,000 cost $1.005; 100 newly enriched listings cost $0.405 and 1,000 cost $4.005. These examples assume all results are delivered, no cache reuse and no spending cap. Check the Console for actual pricing and platform-usage settings.

### Input

- `searchQueries`: Search terms. Each term is a separate source.
- `marketplace`: `US`, `CA` or `MX`; selects the storefront for generated keyword searches. Defaults to `US`.
- `startUrls`: Walmart US, Canada or Mexico search, category or product URLs. The URL host determines its storefront. These are processed in addition to search terms. Listing filters and starting page are preserved.
- `maxResults`: Maximum unique products per search or URL; default 10, minimum 1. A direct product URL yields at most one product.
- `includeDetails`: Fetch product pages for listing results; default false. Direct product URLs already include detail data. Enrichment adds requests and proxy traffic; failed enrichment leaves the listing record intact.
- `maxReviewsPerProduct`: Maximum unique customer reviews per product, from 0 to 200; default 0 disables reviews. Reviews are attached to the product record and charged separately.

At least one URL or keyword is required. The earlier input names `start_urls`, `search_queries` and `include_details` remain supported. The former `max_results` input is no longer supported; runs that provide it fail with a migration message. Update saved tasks to use `maxResults`. If both detail options are supplied and `includeDetails` is false, the legacy `include_details` value takes precedence.

```json
{
  "searchQueries": ["Ninja coffee maker"],
  "startUrls": [{"url": "https://www.walmart.com/ip/997508948"}],
  "maxResults": 2,
  "includeDetails": true
}
```

To search the Canadian storefront:

```json
{"marketplace": "CA", "searchQueries": ["coffee maker"], "maxResults": 10}
```

Or provide a Walmart.ca URL directly:

```json
{"startUrls": [{"url": "https://www.walmart.ca/en/search?q=coffee"}], "maxResults": 10}
```

To search Walmart Mexico:

```json
{"marketplace": "MX", "searchQueries": ["café"], "maxResults": 10}
```

Or provide a Walmart.com.mx URL directly:

```json
{"startUrls": [{"url": "https://www.walmart.com.mx/search?q=cafe"}], "maxResults": 10}
```

For a category or direct product, use:

```json
{"startUrls": [{"url": "https://www.walmart.com/browse/food/peanut-butter/976759_976794_3642122_6347787"}], "maxResults": 10}
```

```json
{"startUrls": [{"url": "https://www.walmart.com/ip/997508948"}]}
```

### Output

Each dataset item preserves Walmart's product fields and adds `productId`, `title`, `normalizedBrand`, `currentPrice`, `wasPrice`, `savings`, `currency`, `inStock`, `ratingValue`, `reviewCount`, `seller`, `normalizedUpc`, `normalizedModel`, `unitPrice`, `unitPriceDisplay`, `unitPriceSource`, `variantPriceMin`, `variantPriceMax`, `variantPriceSource`, `sellerTypeNormalized`, `fulfillmentTypeNormalized`, `imageUrl`, `marketplace`, `scrapedAt`, `productUrl` and `sourceUrl` when available. Canadian rows use the same normalized fields, identify `marketplace` as `CA`, and report Canadian prices in `CAD`; Mexican rows identify `marketplace` as `MX` and report prices in `MXN`. Raw Walmart fields remain available alongside the normalized values. Unknown values are null. Unit-price display strings are preserved as Walmart presents them; numeric `unitPrice` is supplied only when it can be derived. `unitPriceSource` identifies the listing or product page. Variant price bounds describe Walmart’s range across options, which can differ from the selected item price; `variantPriceSource` identifies the listing or product page. Listing fields can include `priceInfo`, `availabilityStatus`, ratings, review counts, sellers and images. Enriched listing records also include the complete product-page fields in `productPage` (including UPC, model, variants, seller, price and availability when supplied), alongside `productDetails` and `reviewSummary`. Direct product records contain the product-page fields at the top level. Available fields vary. Walmart may return different price structures for listing and product pages, and prices and availability depend on its fulfillment and location context.

This excerpt is from a locally saved enriched product record; prices and ratings can change. The full record contains additional source fields.

```json
{
  "productId": "13700912880",
  "title": "Ninja Hot & Iced 10-Cup Drip Coffee Maker, 4 Brew Styles, Rapid Cold Brew, CM360WM, Black",
  "normalizedBrand": "Ninja",
  "currentPrice": 98.0,
  "wasPrice": 114.0,
  "savings": 16.0,
  "currency": "USD",
  "inStock": true,
  "ratingValue": 4.5,
  "reviewCount": 2695,
  "seller": "Walmart.com",
  "normalizedUpc": "622356675949",
  "normalizedModel": "CM360WM",
  "marketplace": "US",
  "scrapedAt": "2026-10-31T21:07:19.237446Z",
  "productUrl": "https://www.walmart.com/ip/Ninja-Hot-Iced-10-Cup-Drip-Coffee-Maker-4-Brew-Styles-Rapid-Cold-Brew-CM360WM-Black/13700912880?classType=VARIANT&athbdg=L1300",
  "sourceUrl": "https://www.walmart.com/search?q=Ninja+coffee+maker"
}
```

An enriched listing also includes product-page fields (excerpt from a saved run):

```json
{
  "usItemId": "13700912880",
  "name": "Ninja Hot & Iced 10-Cup Drip Coffee Maker, 4 Brew Styles, Rapid Cold Brew, CM360WM, Black",
  "productPage": {
    "upc": "622356675949",
    "model": "CM360WM",
    "brand": "Ninja",
    "sellerDisplayName": "Walmart.com"
  }
}
```

A unit-price excerpt from a saved product-page run (values can change):

```json
{
  "productId": "10308119",
  "currentPrice": 4.12,
  "currency": "USD",
  "unitPrice": 0.258,
  "unitPriceDisplay": "25.8 ¢/oz",
  "unitPriceSource": "productPage",
  "sellerTypeNormalized": "INTERNAL",
  "fulfillmentTypeNormalized": "STORE"
}
```

The Products, Prices and Product reviews views project the same dataset. Reviews remain nested in each product row. `reviewCollection.total` is Walmart’s review-page total, while `reviews` contains only the reviews collected for this run. `reviewCollection.status` reports whether the requested cap, source end, charge limit or an incomplete request stopped collection. URLs are normalized and deduplicated before fetching, and products are deduplicated by Walmart item ID across the run. Direct product URLs are processed first; the first source to deliver a product determines its `sourceUrl`. Product pages already fetched are reused within the run.

`RUN_SUMMARY` in the key-value store reports each source's count, status and detail failures. `COMPLETE` means Walmart's available pages were exhausted, `CAPPED` means the per-source limit was reached, `DEDUPLICATED` means the URL or product was already processed, `NOT_FOUND` means Walmart returned HTTP 404 or 410, `CHARGE_LIMIT` means the spending cap stopped the run, and `PARTIAL` means listing collection or requested detail enrichment was incomplete; `listingStatus` retains the listing stop reason. Walmart may limit the depth of its listings. Mixed runs retain successful results; an all-partial run fails. The summary also reports datacenter and residential request attempts, response-body download bytes, content encodings, and proxy-session creation/reuse/replacement counts. Download byte figures exclude headers, uploads and requests that failed before a response.

This Actor does not select a store or postal code, and does not promise a complete list of other seller offers. Canadian search listings and Mexican homepage product data share the product structure used by the US path. Walmart.ca challenged direct product-page requests in the live probe; Walmart.com.mx keyword search returned stale results and direct product pages were challenged, so verify live result quality before relying on those markets. Failed detail enrichment is reported as partial while listing data is retained. Review collection for Canada and Mexico is currently unavailable and reports partial status without retrying requests. It reuses HTTP sessions and connections per marketplace and proxy route, requests compressed responses, and tries marketplace-matched Apify datacenter proxies first. Recoverable transport failures and detected challenge pages get bounded retries through datacenter and then marketplace-matched residential proxies; malformed but successful responses do not trigger repeat downloads. Detail enrichment uses at most three concurrent product-page requests, reduced to one while review collection is enabled. The Actor uses at most 20 residential attempts per run; legacy proxy inputs are ignored.

### Pricing

The intended pay-per-event rates are:

- **Actor start:** $0.005 per run at the configured 1 GB memory. Apify applies its synthetic start event automatically.
- **Product listing:** $0.001 for each delivered listing record.
- **Product page:** $0.003 for each delivered direct product page or newly fetched detail page included with a listing. A listing with newly fetched details therefore costs $0.004 in product events. Reused cached details are not charged again.
- **Review:** $0.0003 for each unique review delivered in a product record. Review collection is optional.

Failed detail requests are not charged as product-page events. The Actor stops when the configured event spending limit is reached. Proxy work already in progress can still incur platform traffic costs; check the Apify Console pricing tab for the live rates and whether platform usage is charged separately.

To collect up to 12 reviews for a product:

```json
{"startUrls": [{"url": "https://www.walmart.com/ip/10308119"}], "maxReviewsPerProduct": 12}
```

A saved review result looks like this (excerpt; the full record includes additional Walmart review fields):

```json
{
  "productId": "10308119",
  "reviews": [
    {
      "reviewId": "438541297",
      "rating": 5,
      "reviewSubmissionTime": "8/28/2026"
    }
  ],
  "reviewCollection": {
    "status": "CAPPED",
    "pages": 2,
    "total": 959
  }
}
```

For one direct product and 12 delivered reviews, the event total at these rates is $0.0116: $0.005 start, $0.003 product page and $0.0036 for reviews. A review page may contain fewer reviews than requested, and a failed page is reported as partial; unsuccessful or omitted reviews are not charged.

# Actor input Schema

## `startUrls` (type: `array`):

Add Walmart US, Canada or Mexico search, category or product URLs. URLs and keywords are processed separately; listing URL filters are preserved.

## `searchQueries` (type: `array`):

Search each keyword or phrase separately. Supply at least one keyword or URL; results are additive.

## `marketplace` (type: `string`):

Marketplace used to create Walmart search URLs from searchQueries. Choose US, CA or MX. startUrls use the marketplace in each URL.

## `maxResults` (type: `integer`):

Maximum unique products per search or URL. Must be at least 1.

## `includeDetails` (type: `boolean`):

Fetch each listing product page for specifications, descriptions and rating summaries. This uses more proxy traffic.

## `maxReviewsPerProduct` (type: `integer`):

Collect up to this many customer reviews for each product. Zero disables review collection. Each delivered review is charged separately.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.walmart.com/browse/food/peanut-butter/976759_976794_3642122_6347787"
    }
  ],
  "marketplace": "US",
  "maxResults": 10,
  "includeDetails": false,
  "maxReviewsPerProduct": 0
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (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 = {
    "startUrls": [
        {
            "url": "https://www.walmart.com/browse/food/peanut-butter/976759_976794_3642122_6347787"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datasaurus/walmart").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 = { "startUrls": [{ "url": "https://www.walmart.com/browse/food/peanut-butter/976759_976794_3642122_6347787" }] }

# Run the Actor and wait for it to finish
run = client.actor("datasaurus/walmart").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 '{
  "startUrls": [
    {
      "url": "https://www.walmart.com/browse/food/peanut-butter/976759_976794_3642122_6347787"
    }
  ]
}' |
apify call datasaurus/walmart --silent --output-dataset

```

## MCP server setup

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

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/he4SavYMRAvDMzSY6/builds/odrDf1htcsSnodNaD/openapi.json
