# 🛒 Walmart Product Detail Scraper (`scrapier/walmart-product-detail-scraper`) Actor

🛒 Walmart Product Detail Scraper extracts key product data from Walmart—titles, prices, ratings, availability & more. ⚡ Fast, reliable scraping for eCommerce research, price tracking, and competitive analysis. 📈 Grow smarter decisions.

- **URL**: https://apify.com/scrapier/walmart-product-detail-scraper.md
- **Developed by:** [Scrapier](https://apify.com/scrapier) (community)
- **Categories:** Automation, E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🛒 Walmart Product Detail Scraper

Extract **rich, structured product data** from [Walmart](https://www.walmart.com) — straight from product pages, search results, or whole category listings. Paste your URLs, hit **Start**, and get clean JSON with prices, ratings, images, variants, seller info, and dozens more fields.

No accounts, no cookies, no headless browser hassle — just URLs in, structured data out. 🚀

---

### ✨ Why Choose This Actor?

- **🔗 One input, three page types** — product (`/ip/…`), search (`/search?q=…`), and category/browse URLs all work out of the box.
- **📦 Bulk-friendly** — drop in dozens of URLs at once; each is scraped and tagged to its own section.
- **🎨 Variant expansion** — optionally pull every colour/size variant as its own full record.
- **🛡️ Smart, cost-efficient networking** — starts with **no proxy** and only upgrades the connection (datacenter → residential) if Walmart pushes back. You pay for premium routing only when it's actually needed.
- **💾 Live saving** — every product is written to the dataset the moment it's scraped, so a long run never loses progress.
- **📊 Clean tables** — results render in a tidy Output table, groupable per input section.

---

### 🔑 Key Features

| Feature | Details |
|--------|---------|
| 💲 Pricing | Current price, display price, "was" price, unit price, price range |
| ⭐ Reviews | Average rating, review count, full 1–5 star breakdown |
| 🖼️ Media | Thumbnail + full image gallery |
| 🎨 Variants | Variant list with images, prices, attributes, availability |
| 🏪 Seller | Seller ID, name, rating, review count |
| 📦 Fulfilment | Availability, fulfilment type, return policy, order limits |
| 🏷️ Identity | Brand, model, UPC, manufacturer ID, category path |

---

### 📥 Input

| Field | Type | Description |
|-------|------|-------------|
| `startUrls` | array | Walmart product / search / category URLs (bulk supported). |
| `maxProductsPerStartUrl` | integer | Max products per start URL. `0` = unlimited. Default `10`. |
| `enqueueProductVariants` | boolean | Also scrape each product's variants. Default `false`. |
| `proxyConfiguration` | object | Optional Apify Proxy (used as the datacenter rung). |

#### Example input

```json
{
  "startUrls": [
    { "url": "https://www.walmart.com/ip/866170578" },
    { "url": "https://www.walmart.com/search?q=mens+t-shirt" }
  ],
  "maxProductsPerStartUrl": 10,
  "enqueueProductVariants": false,
  "proxyConfiguration": { "useApifyProxy": true }
}
````

***

### 📤 Output

Each record is a `DetailProduct` with 50+ fields. Example (trimmed):

```json
{
  "sectionIndex": 1,
  "sourceUrl": "https://www.walmart.com/ip/866170578",
  "itemType": "DetailProduct",
  "type": "VARIANT",
  "productId": "1031FX5S95RH",
  "usItemId": "866170578",
  "name": "Hanes T-Shirt, 6-Pack, Moisture-Wicking T-Shirt Undershirts, Black/Grey/Blue",
  "url": "https://walmart.com/ip/.../866170578",
  "brand": "Hanes",
  "priceInfo": { "price": "$23.98", "priceDisplay": "$23.98", "unitPrice": "$4.00/ea" },
  "averageRating": 4.3,
  "numberOfReviews": 57,
  "ratingCounts": { "1": 375, "2": 124, "3": 257, "4": 514, "5": 3742 },
  "sellerName": "Walmart.com",
  "availability": "IN_STOCK",
  "variantList": [ { "...": "..." } ]
}
```

Every record is tagged with `sectionIndex` and `sourceUrl` so you can group the Output table per input URL.

***

### 🚀 How to Use (Apify Console)

1. Log in at [console.apify.com](https://console.apify.com) → **Actors**.
2. Open **Walmart Product Detail Scraper**.
3. Paste your Walmart URLs into **Start URLs**.
4. Set **Max products per start URL** and optionally enable **variants**.
5. Click **Start** and watch the live log fill up. 🎉
6. Open the **Output** tab and export to JSON / CSV / XLSX.

### 🤖 Use via API

```bash
curl -X POST "https://api.apify.com/v2/acts/<ACTOR_ID>/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"startUrls":[{"url":"https://www.walmart.com/ip/866170578"}],"maxProductsPerStartUrl":10}'
```

***

### 💡 Best Use Cases

- 📈 Price & deal monitoring across competitors
- 🛍️ Catalogue / assortment research
- ⭐ Review & rating analysis
- 🎨 Variant and availability tracking

### 💲 Pricing

This Actor is billed on a **pay-per-usage** basis — you pay only for the Apify platform resources (compute + any proxy traffic) a run consumes. Because it starts proxy-free and only upgrades when blocked, typical runs stay lightweight.

### ❓ FAQ

**Which URLs are supported?** Product (`/ip/`), search (`/search`), and category/browse (`/cp`, `/browse`, `/shop`, `/c/`) pages.

**Do I need a proxy?** No. The Actor runs direct first and auto-upgrades to datacenter then residential only if Walmart blocks a request.

**Will it get all variants?** Enable **Scrape product variants** to fetch each variant as its own record.

### ⚖️ Caution / Legal

Data is collected only from **publicly available** Walmart pages. You are responsible for complying with applicable laws (GDPR, CCPA, etc.) and Walmart's Terms of Service.

### 🛟 Support & Feedback

Found a bug or need a custom field? Open an issue on the Actor's page — we read every message.

# Actor input Schema

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

Walmart product (/ip/...), search (/search?q=...) or category URLs. Bulk input supported — add as many as you like.

## `maxProductsPerStartUrl` (type: `integer`):

Cap how many products to scrape per start URL. For a single product URL this is effectively 1 (+ its variants if enabled). Set 0 for unlimited.

## `enqueueProductVariants` (type: `boolean`):

When ON, every colour / size variant of a scraped product is also fetched and emitted as its own product record.

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

Optional Apify Proxy configuration used as the mid-tier (datacenter) network. Residential is applied automatically as the final fallback.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.walmart.com/ip/866170578",
    "https://www.walmart.com/search?q=mens+t-shirt"
  ],
  "maxProductsPerStartUrl": 10,
  "enqueueProductVariants": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "https://www.walmart.com/ip/866170578",
        "https://www.walmart.com/search?q=mens+t-shirt"
    ],
    "maxProductsPerStartUrl": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapier/walmart-product-detail-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": [
        "https://www.walmart.com/ip/866170578",
        "https://www.walmart.com/search?q=mens+t-shirt",
    ],
    "maxProductsPerStartUrl": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapier/walmart-product-detail-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "https://www.walmart.com/ip/866170578",
    "https://www.walmart.com/search?q=mens+t-shirt"
  ],
  "maxProductsPerStartUrl": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapier/walmart-product-detail-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapier/walmart-product-detail-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🛒 Walmart Product Detail Scraper",
        "description": "🛒 Walmart Product Detail Scraper extracts key product data from Walmart—titles, prices, ratings, availability & more. ⚡ Fast, reliable scraping for eCommerce research, price tracking, and competitive analysis. 📈 Grow smarter decisions.",
        "version": "0.1",
        "x-build-id": "qSLXqjQqpm8rwcN7m"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapier~walmart-product-detail-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapier-walmart-product-detail-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapier~walmart-product-detail-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapier-walmart-product-detail-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapier~walmart-product-detail-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapier-walmart-product-detail-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "🔗 Start URLs",
                        "type": "array",
                        "description": "Walmart product (/ip/...), search (/search?q=...) or category URLs. Bulk input supported — add as many as you like.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxProductsPerStartUrl": {
                        "title": "🎯 Max products (per start URL)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap how many products to scrape per start URL. For a single product URL this is effectively 1 (+ its variants if enabled). Set 0 for unlimited.",
                        "default": 10
                    },
                    "enqueueProductVariants": {
                        "title": "🎨 Scrape product variants",
                        "type": "boolean",
                        "description": "When ON, every colour / size variant of a scraped product is also fetched and emitted as its own product record.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "🛡️ Proxy",
                        "type": "object",
                        "description": "Optional Apify Proxy configuration used as the mid-tier (datacenter) network. Residential is applied automatically as the final fallback."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
