# Walmart Product & Local Store Scraper (`hypebridge/walmart-product-scraper`) Actor

Extracts structured product data, physical store-bound shelf prices, local inventory, in-store aisle locations, seller details, technical specifications, nutrition facts, and paginated customer reviews from Walmart US (walmart.com, USD) and Walmart Mexico.

- **URL**: https://apify.com/hypebridge/walmart-product-scraper.md
- **Developed by:** [Hypebridge](https://apify.com/hypebridge) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 basic products

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/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

### What does Walmart Product & Local Store Scraper do?

**Walmart Product & Local Store Scraper** extracts structured product data, **physical store-bound shelf prices**, local inventory, **in-store aisle locations**, seller details, technical specifications, nutrition facts, and **paginated customer reviews** from [Walmart US](https://www.walmart.com) (`walmart.com`, `USD`) and [Walmart Mexico](https://www.walmart.com.mx) (`walmart.com.mx`, `MXN`) without needing an official API.

Provide keyword searches, category or browse URLs, curated shop/landing pages, the Walmart homepage, or direct product URLs and item IDs. Each unique product is saved as a single clean dataset record, with optional full product details and up to 1,000 customer reviews nested directly inside the product row. Unsupported regional domains (such as `walmart.ca`) and non-catalog account links are skipped with an explicit warning.

### What makes this Walmart scraper unique?

Most Walmart scrapers in the Apify Store only capture generic national prices from search results or require you to chain multiple separate Actors for search, product details, and reviews. **Walmart Product & Local Store Scraper** is built for store-accurate retail intelligence in a single workflow:

| Capability | Typical Store Walmart Actors | This Actor (`walmart-product-scraper`) |
|------------|------------------------------|----------------------------------------|
| **Physical Store Price & Inventory Binding** | Generic online prices or ignored location parameters | Resolves and binds an actual Walmart store by **US ZIP code / Store ID** or **Mexico postal code / Store ID**, verifying that returned prices and stock match that store |
| **In-Store Aisle & Fulfillment Details** | Rarely extracted or limited to basic stock flags | Extracts physical **in-store aisle locations** (e.g., `"A32"`, `"G5"`), `fulfillmentType` (`STORE`, `FC`, `MARKETPLACE`), pickup/delivery/shipping eligibility, and full store address/hours |
| **Products + Details + Reviews in One Run** | Split across separate Search, Detail, and Review Actors | Combines fast listing discovery, full product detail enrichment, and **up to 1,000 nested customer reviews per product** in one Actor |
| **US & Mexico Dual-Market Support** | US-only or requires separate regional scrapers | Supports both **Walmart US** (`walmart.com`, `USD`) and **Walmart Mexico** (`walmart.com.mx`, `MXN`), preserving leading zeros on Mexican item IDs |
| **Discovery Beyond Keyword Search** | Restricted to keyword search or direct `/ip/` URLs | Supports **keywords, `/search`, `/browse`, `/cp`, `/shop`, `/c`, `/ip`, bare item IDs, `/store/{id}`**, and the **Walmart homepage** |
| **Grocery, Unit Price & Barcode Depth** | Package price only; missing barcodes or nutrition | Normalizes `unitPrice` (e.g., `2.0 ¢/fl oz` → `0.02`), `unit`, `sizeText`, `isHouseBrand`, **12-digit UPC**, **14-digit GTIN**, `ingredients`, and `nutritionFacts` |
| **1P vs. 3P Seller & WFS Attribution** | Seller name only (often missing on 1P items) | Captures `sellerName`, `sellerId`, `catalogSellerId`, `isWalmartSold`, and Walmart Fulfillment Services (`wfsEnabled`) status |
| **Verifiable Completion & Review Provenance** | Silent truncation when pagination or review limits hit | Writes `PAGINATION_SUMMARY` completion reports and per-product `reviewStatus`, `reviewStopReason`, and `reviewPoolId` |
| **Pay-Per-Event Cost Control** | Flat rate regardless of data depth | Low **$0.006** basic listing rate; only pay for full details (**$0.03**) or returned reviews (**$0.002**) when requested, never double-charging basic and detailed events |

### Why scrape Walmart?

- **Hyper-Local Store & ZIP Price Audits**: Compare shelf prices, rollbacks, and stock availability across specific US ZIP codes, Mexican postal codes, or exact Walmart Supercenter store numbers.
- **Grocery & CPG Assortment Benchmarking**: Track unit prices (`¢/fl oz`, `$/oz`), package sizes, ingredients, nutrition panels, and Walmart private-label house brands (*Great Value*, *Marketside*, *Equate*, *Mainstays*, *Sam's Choice*, *Bettergoods*).
- **1P vs. 3P Marketplace Seller Intelligence**: Identify whether Walmart or a third-party seller owns the offer, verify Walmart Fulfillment Services (`wfsEnabled`) adoption, and monitor catalog barcode coverage (`upc` and `gtin`).
- **In-Store Merchandising & Availability Tracking**: Audit exact physical aisle placements (such as `"A32"` or `"K1"`) alongside curbside pickup, local delivery, and shipping availability.
- **Voice-of-Customer & Sentiment Analysis**: Collect up to 1,000 full customer reviews per product—including review text, star ratings, verified-purchase badges, helpful votes, customer photos, and variant review pool provenance.

### What data can Walmart Product & Local Store Scraper extract?

| Field | Type | Description |
|-------|------|-------------|
| `usItemId` | String | Walmart catalog item ID (preserved as a string, including Mexican leading zeros) |
| `upc` / `gtin` | String | 12-digit UPC and 14-digit GTIN barcodes (populated when details are enabled) |
| `title` / `brand` | String | Product name and brand name (plus `isHouseBrand` boolean flag) |
| `url` / `sourceUrl` | String | Canonical product URL on the source market and original input seed URL |
| `price` / `regularPrice` | Number | Current store-bound price and prior/comparison price in `USD` or `MXN` |
| `isOnSale` / `discountPercent` | Boolean / Number | Rollback/discount indicator, `discountAmount`, and percentage savings |
| `unitPrice` / `unit` | Number / String | Normalized price per unit (e.g., `0.02` per `fl oz`), `unitPriceDisplay`, and `sizeText` |
| `inStock` / `aisle` | Boolean / String | Stock availability and physical in-store aisle location (e.g., `"A32"`, `"G5"`) |
| `fulfillment` / `fulfillmentType` | Object / String | `pickup`, `delivery`, and `shipping` booleans plus classification (`STORE`, `FC`, `MARKETPLACE`) |
| `seller` | Object | `sellerName`, `sellerId`, `catalogSellerId`, `isWalmartSold`, and `wfsEnabled` |
| `storeLocation` | Object | Resolved physical store (`storeId`, `storeName`, address, ZIP, coordinates, distance, hours) |
| `rating` / `reviewCount` | Number | Average customer star rating and total rating count |
| `reviews` / `reviewStatus` | Array / String | Nested customer review records, `reviewsFetched`, `reviewStopReason`, and `reviewPoolId` |
| `specifications` / `variants` | Object / Array | Key-value technical specifications, `descriptionHtml`, and variant options (`usItemId`, `name`, `price`, `inStock`) |
| `ingredients` / `nutritionFacts` | String / Object | Full ingredient statement and structured nutrition facts panel (when supplied by Walmart) |

*8–15 of the most commonly used fields are summarized above. See the **Output** section below and the **Output** tab for the complete schema, including all 51 product fields and 17 nested review fields.*

### How to scrape Walmart

1. [Create a free Apify account](https://apify.com) if you don't have one.
2. Open **Walmart Product & Local Store Scraper** and click **Try for free**.
3. Add your Walmart URLs in **Start URLs**, enter keywords in **Search queries**, or paste product IDs in **Direct Item IDs**.
4. Set your target location using **ZIP code** (`zipCode`) or **Store ID override** (`storeId`) for the US, or select `MX` in **Market** with a **Mexico postal code** (`mexicoPostalCode`).
5. Set **Maximum items** (`maxItems`) to cap your run, and optionally toggle **Enrich with full product details** (`getProductDetails`) or **Include product reviews** (`getProductReviews`).
6. Click **Start** and download your results from the **Dataset** tab in JSON, CSV, Excel, or HTML format.

### How much will it cost?

Pay-per-result pricing — charged per item scraped, not per compute unit. Each product row is billed as **either** a Basic product **or** a Detailed product, never both.

#### Event pricing

| Event | Free / Standard Tier | Gold Tier & Above | Description |
|-------|---------------------:|------------------:|-------------|
| **Basic product** (`walmart-basic-item`) | **$0.006 / product** ($6 / 1K) | **$0.004 / product** ($4 / 1K) | One product extracted from a search, category, home, or overview listing without detail enrichment |
| **Detailed product** (`walmart-detailed-item`) | **$0.03 / product** ($30 / 1K) | **$0.02 / product** ($20 / 1K) | One product enriched with full product page details (replaces the basic-product charge on that row) |
| **Returned review** (`walmart-review`) | **$0.002 / review** ($2 / 1K) | **$0.00133 / review** ($1.33 / 1K) | One unique customer review included in a product's `reviews` array (charged in addition to the detailed product) |
| **Actor start** (`apify-actor-start`) | **$0.05 / GB** | **$0.03333 / GB** | One-time startup fee per GB of allocated memory (minimum one event) |

#### Approximate results by plan

| Plan | Credits | Approx. Basic Products | Approx. Detailed Products |
|------|---------|------------------------|---------------------------|
| **Free** | $5/mo | ~825 products | ~165 products |
| **Starter ($49/mo)** | $49/mo | ~8,150 products | ~1,630 products |
| **Scale ($199/mo)** | $199/mo | ~39,000+ products | ~7,800+ products |
| **Business ($999/mo)** | $999/mo (Gold rates) | ~249,700 products | ~49,900 products |

*Cost examples at 1 GB memory on the Standard tier: 100 basic search products cost **$0.65** ($0.05 start + $0.60 items). 100 detailed products with 20 returned reviews each cost **$7.05** ($0.05 start + $3.00 detailed products + $4.00 for 2,000 reviews).*

### Input

See the **Input** tab for the full schema. Key fields:

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | Array | `[]` | Walmart US (`walmart.com`) or Mexico (`walmart.com.mx`) search, category, browse, shop, home, store, or product URLs (up to 5,000) |
| `maxItems` | Number | `50` | Maximum total unique products to extract across all queries, URLs, and markets (`1`–`5000`) |
| `getProductDetails` | Boolean | `false` | Enrich discovered listing products with full product page details (`upc`, `gtin`, `aisle`, `specifications`, `nutritionFacts`, `variants`). Direct product URLs and `itemIds` always return full details |
| `getProductReviews` | Boolean | `false` | Fetch individual customer reviews (automatically enables `getProductDetails`) |
| `maxReviewsPerProduct` | Number | `20` | Maximum unique reviews nested per product when `getProductReviews` is enabled (`1`–`1000`) |
| `maxReviewPagesPerProduct` | Number | `10` | Maximum review pages attempted per product (`1`–`50`) |
| `searchQueries` | Array | `[]` | Keywords to search in the selected `market` (up to 100 queries) |
| `itemIds` | Array | `[]` | Direct Walmart item IDs in the selected `market` (up to 5,000; always enriched with full details) |
| `zipCode` | String | `"77001"` | 5-digit US ZIP code used to resolve and bind the nearest physical Walmart store |
| `storeId` | String | none | Optional explicit US Walmart store number (e.g., `"5959"`, `"3081"`); overrides `zipCode` and store URLs |
| `market` | String | `"US"` | Market for `searchQueries` and bare `itemIds`: `"US"` (United States) or `"MX"` (Mexico). `startUrls` automatically detect their market from the domain |
| `mexicoPostalCode` | String | `"11220"` | 5-digit Mexican postal code used to resolve and bind a Walmart Mexico store (`MXN`) |
| `mexicoStoreId` | String | none | Optional Mexican store number override (supply a nearby `mexicoPostalCode` as well) |
| `maxPagesPerSearch` | Number | `25` | Maximum discovery pages per search, category, home, or overview seed (`1`–`25`) |
| `debugMode` | Boolean | `false` | Save sanitized failure diagnostics and available screenshots to the Key-Value Store |

#### Example input: Local US search (basic listings)

```json
{
  "searchQueries": ["whole milk 1 gallon"],
  "zipCode": "77001",
  "maxItems": 50,
  "getProductDetails": false
}
```

#### Example input: Direct item IDs bound to a specific Walmart store

Direct product URLs and `itemIds` always extract full product details (`upc`, `gtin`, `aisle`, `specifications`, `ingredients`, `nutritionFacts`, `variants`) even when `getProductDetails` is `false`:

```json
{
  "itemIds": ["10450114", "3922639115"],
  "storeId": "5959",
  "maxItems": 2
}
```

#### Example input: Product details with nested customer reviews

```json
{
  "startUrls": [
    { "url": "https://www.walmart.com/ip/3922639115" }
  ],
  "zipCode": "77001",
  "getProductReviews": true,
  "maxReviewsPerProduct": 20,
  "maxReviewPagesPerProduct": 10,
  "maxItems": 1
}
```

#### Example input: Walmart Mexico product and reviews (`MXN`)

```json
{
  "market": "MX",
  "itemIds": ["00750105591286"],
  "mexicoPostalCode": "11220",
  "getProductReviews": true,
  "maxReviewsPerProduct": 20,
  "maxItems": 1
}
```

### Output

Saved to the **Dataset** tab. Download as JSON, CSV, Excel, or HTML.

Each item includes:

- **Product Identity & Barcodes**: `usItemId`, `productId`, `offerId`, `upc`, `gtin`, `title`, `brand`, `isHouseBrand`, `url`, `imageUrl`, `allImages`
- **Localized Pricing & Unit Value**: `price`, `regularPrice`, `isOnSale`, `discountAmount`, `discountPercent`, `currency`, `unitPrice`, `unitPriceDisplay`, `unit`, `sizeText`
- **Store Inventory, Aisle & Fulfillment**: `inStock`, `aisle`, `fulfillmentType`, `fulfillment` (`pickup`, `delivery`, `shipping`), `storeLocation` (`storeId`, `storeName`, `storeType`, `streetAddress`, `city`, `state`, `zipCode`, `phoneNumber`, `distanceMiles`, `latitude`, `longitude`, `open24Hours`, `operationalHours`), `seller` (`sellerName`, `sellerId`, `catalogSellerId`, `isWalmartSold`, `wfsEnabled`)
- **Specifications, Variants & Grocery Data**: `shortDescription`, `descriptionHtml`, `specifications`, `variants`, `ingredients`, `nutritionFacts`
- **Ratings & Nested Customer Reviews**: `rating`, `reviewCount`, `reviews`, `reviewStatus` (`not_requested`, `complete`, `empty`, `truncated`, `error`, `partial_error`), `reviewsFetched`, `reviewPagesFetched`, `reviewsAvailable`, `reviewPoolId`, `reviewSourceUrl`, `reviewsTruncated`, `reviewStopReason`, `reviewError`
- **Nested Review Item Fields (`reviews[]`)**: `reviewId`, `title`, `text`, `rating`, `author`, `submittedAt`, `submittedAtRaw`, `submittedAtPrecision`, `verifiedPurchase`, `helpfulVotes`, `unhelpfulVotes`, `locale`, `translatedLocale`, `reviewedProductId`, `badgeIds`, `photos`, `sourceUrl`
- **Metadata**: `sourceType`, `sourceUrl`, `market`, `language`, `searchQuery`, `scrapedAt`

In addition, each run writes a `PAGINATION_SUMMARY` record to the default **Key-Value Store** tracking per-source completion status (`exhausted`, `limited`, `unsupported`, or `error`) and stop reasons.

#### Sample output

```json
{
  "usItemId": "10450114",
  "productId": "3H34WSS08ANB",
  "offerId": "E262E6B27BDE4ABA86CA2C1DF82ADEF4",
  "upc": "078742351865",
  "gtin": "00078742351865",
  "title": "Great Value Whole Vitamin D Milk, Gallon",
  "brand": "Great Value",
  "url": "https://www.walmart.com/ip/Great-Value-Whole-Vitamin-D-Milk-Gallon-Plastic-Jug-128-Fl-Oz/10450114",
  "imageUrl": "https://i5.walmartimages.com/seo/Great-Value-Whole-Vitamin-D-Milk-Gallon-Plastic-Jug-128-Fl-Oz_6a7b09b4-f51d-4bea-a01c-85767f1b481a.86876244397d83ce6cdedb030abe6e4a.jpeg",
  "price": 2.53,
  "regularPrice": null,
  "isOnSale": false,
  "discountAmount": null,
  "discountPercent": null,
  "currency": "USD",
  "unitPrice": 0.02,
  "unitPriceDisplay": "2.0 ¢/fl oz",
  "unit": "fl oz",
  "sizeText": "Gallon",
  "isHouseBrand": true,
  "inStock": true,
  "aisle": "A32",
  "fulfillmentType": "STORE",
  "fulfillment": {
    "pickup": true,
    "delivery": true,
    "shipping": false
  },
  "seller": {
    "sellerName": "Walmart.com",
    "sellerId": "F55CDC31AB754BB68FE0B39041159D63",
    "catalogSellerId": "0",
    "isWalmartSold": true,
    "wfsEnabled": false
  },
  "storeLocation": {
    "storeId": "5959",
    "storeName": "Houston Heights Supercenter",
    "storeType": "Walmart Supercenter",
    "streetAddress": "111 Yale St",
    "city": "Houston",
    "state": "TX",
    "zipCode": "77007",
    "phoneNumber": "713-860-0700",
    "distanceMiles": 1.89,
    "latitude": 29.772821,
    "longitude": -95.401322,
    "open24Hours": false
  },
  "rating": 4.6,
  "reviewCount": 417131,
  "reviews": [
    {
      "reviewId": "443090657",
      "title": "Gallon Great Value While Vitamin D Milk Good Price",
      "text": "Great Value Whole Vitamin D milk in the gallon is an excellent product. The price is much lower than regular name brand milk and the quality is outstanding.",
      "rating": 5,
      "author": "Lou",
      "submittedAt": "2026-10-05",
      "submittedAtRaw": "10/5/2026",
      "submittedAtPrecision": "date",
      "verifiedPurchase": true,
      "helpfulVotes": 0,
      "unhelpfulVotes": 0,
      "locale": "en_US",
      "translatedLocale": "en",
      "reviewedProductId": "10450114",
      "badgeIds": ["VerifiedPurchaser", "TOP_REVIEWER", "REVIEW_COUNT"],
      "photos": [],
      "sourceUrl": "https://www.walmart.com/reviews/product/10450114?sort=relevancy&page=1"
    }
  ],
  "reviewStatus": "truncated",
  "reviewError": null,
  "reviewsFetched": 1,
  "reviewPagesFetched": 1,
  "reviewPoolId": "3H34WSS08ANB",
  "reviewSourceUrl": "https://www.walmart.com/reviews/product/10450114?sort=relevancy&page=1",
  "reviewsTruncated": true,
  "reviewStopReason": "max_reviews",
  "reviewsAvailable": 28163,
  "specifications": {
    "Milk type": "Cow Milk",
    "Percent of milk fat in dairy": "3.5",
    "Net content statement": "1 GAL (378 L)",
    "Container type": "Jug",
    "Brand": "Great Value"
  },
  "ingredients": "MILK, VITAMIN D3",
  "sourceType": "search",
  "sourceUrl": "https://www.walmart.com/search?q=whole%20milk%201%20gallon",
  "market": "US",
  "language": "en-US",
  "searchQuery": "whole milk 1 gallon",
  "scrapedAt": "2026-10-16T13:55:25.180Z"
}
```

### Tips

- **Set `maxItems` before committing to a large run** to control runtime and total cost across all inputs and markets.
- **Use Basic mode for broad catalog sweeps**: Keep `getProductDetails: false` and `getProductReviews: false` when scanning search or category pages for titles, store-bound prices, unit prices, ratings, and stock—then enable `getProductDetails: true` or pass `itemIds` only for the products that need barcodes (`upc`/`gtin`), aisle locations, nutrition facts, or specifications.
- **Pin an exact `storeId` for recurring price tracking**: A `zipCode` resolves the nearest physical store, whose own street address may sit in a neighboring ZIP code (reported in `storeLocation.zipCode`). For longitudinal store audits, pass `storeId` directly (or include a single `/store/{id}` URL).
- **Preserve leading zeros on Mexican item IDs**: Always pass Mexican `itemIds` as strings (e.g., `"00750105591286"`). When using `mexicoStoreId`, also supply a nearby `mexicoPostalCode` so the store can be verified in that region.
- **Mix US and Mexico URLs effortlessly**: `startUrls` automatically route each URL to its matching country storefront and currency (`USD` or `MXN`), while `market` controls where `searchQueries` and bare `itemIds` run.

### FAQ

#### Is scraping Walmart legal?

**Walmart Product & Local Store Scraper** only extracts publicly available product, pricing, store, and review information displayed to unauthenticated shoppers. It never accesses private customer accounts or personal data behind login walls. Always review the target site's Terms of Service and ensure you have a legitimate purpose for your data collection.

#### How does local store pricing work?

Walmart prices, inventory, and aisle numbers vary by physical store location. Before extracting products, the Actor resolves your `zipCode` (or `mexicoPostalCode`) to the nearest physical store—or uses your explicit `storeId`—and binds the session to that location. Every returned product includes a `storeLocation` object confirming the exact store ID, address, and operating hours used for the run.

#### Why is `reviewCount` higher than `reviewsFetched` or `reviewsAvailable`?

`reviewCount` reflects Walmart's total aggregate rating count, which includes star-only ratings submitted without written text. `reviewsAvailable` reflects written customer reviews, and `reviewsFetched` is the number of unique review records saved to the product's `reviews` array (capped by `maxReviewsPerProduct` and `maxReviewPagesPerProduct`).

#### What is `reviewPoolId` and why can it differ from `usItemId`?

Walmart frequently groups reviews across related product variants (such as different sizes, colors, or pack counts) under a shared review pool. The Actor preserves your exact requested `usItemId` on the product record, records the shared pool identifier in `reviewPoolId`, and includes `reviewedProductId` on each individual review so you can tell which specific variant a reviewer purchased.

#### Which Walmart countries are supported, and what differs between US and Mexico?

Both **United States (`walmart.com`, `en-US`, `USD`)** and **Mexico (`walmart.com.mx`, `es-MX`, `MXN`)** support search, category/browse, homepage/overview discovery, direct product details, store location binding, and paginated customer reviews. Because Walmart Mexico does not expose aisle numbers, 14-digit GTINs, normalized unit prices, or structured nutrition panels on its storefront pages, those optional fields remain `null` on Mexican records rather than being guessed. Other domains such as `walmart.ca` are skipped with a warning.

### Support

- Bugs / feature requests → **Issues** tab
- Programmatic access → **API** tab

> **Disclaimer**: Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

# Actor input Schema

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

Walmart US (.com) or Mexico (.com.mx) collection, store or direct product URLs. URLs select their own market; unsupported countries, including Canada, are skipped with a warning.

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

Maximum number of total products to extract across all queries and URLs.

## `getProductDetails` (type: `boolean`):

Visit discovered products for full PDP details. Off by default; getProductReviews automatically enables this. Direct product URLs and itemIds always return full details.

## `getProductReviews` (type: `boolean`):

Fetch individual product review titles, bodies, ratings, dates, and available provenance. Also works on direct PDP URLs/itemIds. Automatically enables PDP details for products discovered from home, overview, search, or category pages. Reviews stay nested on each product and are bounded by the limits below. Each returned review is charged separately in addition to the detailed product; see Pricing.

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

Maximum unique review records per product when reviews are enabled. The page and output-size caps can return fewer.

## `maxReviewPagesPerProduct` (type: `integer`):

Hard maximum logical review pages attempted per product, including failed pages. Stops even if the review count limit is not met.

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

Keywords to search in the selected US or Mexican market.

## `itemIds` (type: `array`):

IDs in the selected market. Keep leading zeros for Mexican IDs. Direct IDs always return full details.

## `zipCode` (type: `string`):

5-digit US ZIP code to resolve the nearest physical Walmart Supercenter and bind the session for localized shelf prices, inventory, aisle locations, and store metadata (e.g. '77001', '95829', '96814').

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

Optional direct Walmart Store Number (e.g. '5959', '3081', '3478'). Overrides zipCode lookup if provided.

## `maxPagesPerSearch` (type: `integer`):

Maximum discovery pages per search, category, home, or overview seed, including paginated product feeds. Continues until maxItems, source exhaustion, or this cap. Defaults to 25; source limits can stop sooner. Review pages use a separate limit.

## `debugMode` (type: `boolean`):

Save bounded sanitized failure HTML/JSON and available screenshots for diagnosis. Off by default.

## `market` (type: `string`):

Applies to searchQueries and itemIds. Start URLs select their own market and can mix countries in one run. The maximum items and spending limits apply to the whole run.

## `mexicoPostalCode` (type: `string`):

Five-digit postal code used to resolve and bind the Mexican store. Prices are returned in MXN.

## `mexicoStoreId` (type: `string`):

Optional Mexican store number. Supply its nearby Mexico postal code too; the selected store must occur in the location response. Overrides Mexican store URLs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.walmart.com/search?q=whole+milk"
    }
  ],
  "maxItems": 50,
  "getProductDetails": false,
  "getProductReviews": false,
  "maxReviewsPerProduct": 20,
  "maxReviewPagesPerProduct": 10,
  "searchQueries": [],
  "zipCode": "77001",
  "maxPagesPerSearch": 25,
  "debugMode": false,
  "market": "US",
  "mexicoPostalCode": "11220"
}
```

# Actor output Schema

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

All product fields and nested reviews.

## `pagination` (type: `string`):

Limits, failures and per-source pagination reports.

## `files` (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/search?q=whole+milk"
        }
    ],
    "searchQueries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hypebridge/walmart-product-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 = {
    "startUrls": [{ "url": "https://www.walmart.com/search?q=whole+milk" }],
    "searchQueries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hypebridge/walmart-product-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 '{
  "startUrls": [
    {
      "url": "https://www.walmart.com/search?q=whole+milk"
    }
  ],
  "searchQueries": []
}' |
apify call hypebridge/walmart-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hypebridge/walmart-product-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/G45iBvxjyUwR8q1Xv/builds/08oyQP8eZgbNzNIdB/openapi.json
