# Walmart Scraper (Pay-Per-Event) (`prodiger/walmart-scraper`) Actor

Scrape Walmart search results for prices, discounts, ratings, review counts, sellers, and deal badges. Pay-per-event pricing — only pay for the products you actually scrape.

- **URL**: https://apify.com/prodiger/walmart-scraper.md
- **Developed by:** [Arnas](https://apify.com/prodiger) (community)
- **Categories:** E-commerce, Lead generation, News
- **Stats:** 5 total users, 1 monthly users, 100.0% runs succeeded, 1 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Scrape Walmart product data including prices, ratings, reviews, seller info, brand, and deal badges from search results.

### What does Walmart Scraper do?

**Walmart Scraper** extracts product data from [Walmart](https://www.walmart.com) search results. For every keyword you provide, it returns one structured record per unique product including current price, original "was" price, savings amount and percent, rating, review count, seller name, deal badges (Rollback, Best seller, "100+ bought since yesterday"), brand, and the direct product URL.

Use it for **price monitoring**, **competitive intelligence**, **dropshipping research**, **market analysis**, and **deal tracking** — without managing proxies, retries, or HTML parsing yourself.

Run it once on demand or [schedule it](https://docs.apify.com/platform/schedules) to track price changes over time. Results download as **JSON, CSV, or Excel**, or stream live via the [Apify API](https://docs.apify.com/api/v2).

### Who is it for?

- **E-commerce analysts** building competitive pricing dashboards
- **Dropshippers** finding products with strong ratings and pricing gaps
- **Price comparison services** cross-referencing Walmart against Amazon, Target, and others
- **Market researchers** analyzing product availability and seller distribution
- **Deal trackers** finding Rollback and Clearance items in specific categories

### Use cases

- **Price monitoring** — track current vs original prices, savings, and discount percentages over time.
- **Competitive intelligence** — research product listings, seller distribution, and pricing strategies.
- **Dropshipping research** — find high-rated products with strong margins.
- **Market analysis** — analyze availability, rating distributions, and seller competition across categories.
- **Deal tracking** — monitor Rollback deals, Clearance items, and "Best seller" badges.
- **E-commerce analytics** — build price-history datasets by keyword and category.

### Why use Walmart Scraper?

- **Rich data extraction** — price, original price, savings, discount percent, rating, review count, seller, deal badge, brand, thumbnail, product URL.
- **Run-level deduplication** — duplicate products that appear in overlapping searches or sponsored-then-organic placements are written once and **billed once**, not twice.
- **Numeric prices** — `price` and `wasPriceValue` are returned as numbers, ready for math without string parsing.
- **Computed `discountPercent`** — Walmart returns the savings dollar amount; we also calculate the percentage so you can sort by deepest discount directly.
- **Multiple sort options** — best match, best seller, price low/high, highest rating, new arrivals.
- **Multi-page pagination** — up to 25 pages per keyword (~1000 products).
- **Residential proxy** — uses Apify's residential proxy for reliability against Walmart's bot detection.
- **Pay-per-event pricing** — only pay for products written to the dataset. No monthly subscription.

### What data can you extract?

Each product in the output includes:

| Field | Description |
|---|---|
| `usItemId` | Walmart item identifier (stable across pages — used for deduplication) |
| `name` | Product name |
| `price` | Current price as a number (USD) |
| `priceString` | Formatted price string (e.g., `"$23.78"`) |
| `wasPrice` | Original price as a string (e.g., `"$29.38"`) |
| `wasPriceValue` | Original price as a number — easier to math against |
| `savings` | Savings text (e.g., `"SAVE $5.60"`) |
| `onSale` | Whether the product is discounted |
| `discountPercent` | Computed discount percentage (1 decimal place) |
| `rating` | Average rating (0–5) |
| `reviewCount` | Number of customer reviews |
| `seller` | Seller name (e.g., `"Walmart.com"`) |
| `fulfillmentType` | Delivery / fulfillment method |
| `flag` | Deal badge (e.g., `"Rollback"`, `"Best seller"`, `"100+ bought since yesterday"`) |
| `thumbnail` | Product image URL |
| `url` | Direct link to the Walmart product page |
| `isSponsored` | Whether the listing is a sponsored placement |
| `brand` | Product brand. Best-effort: read from Walmart when present, otherwise inferred from the first token of `name` against a generic-word denylist. Null when neither path is confident. |
| `currency` | ISO 4217 currency code (always `"USD"`) |
| `pageNumber` | Which search result page this product appeared on |
| `searchQuery` | Which input keyword surfaced this product |
| `scrapedAt` | ISO 8601 timestamp when the record was extracted |

### Output example

```json
{
  "usItemId": "17828556665",
  "name": "JLab Go Air Pop Bluetooth Earbuds, True Wireless with Charging Case",
  "price": 23.78,
  "priceString": "$23.78",
  "wasPrice": "$29.38",
  "wasPriceValue": 29.38,
  "savings": "SAVE $5.60",
  "onSale": true,
  "discountPercent": 19.1,
  "rating": 4.5,
  "reviewCount": 34286,
  "seller": "Walmart.com",
  "fulfillmentType": "Free shipping, arrives tomorrow",
  "flag": "500+ bought since yesterday",
  "thumbnail": "https://i5.walmartimages.com/seo/...",
  "url": "https://www.walmart.com/ip/JLab-Go-Air-Pop-Bluetooth-Earbuds/...",
  "isSponsored": false,
  "brand": "JLab",
  "currency": "USD",
  "pageNumber": 1,
  "searchQuery": "wireless earbuds",
  "scrapedAt": "2026-05-22T13:40:32.821Z"
}
```

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | array | — | **Required.** List of keywords to search on Walmart. Each keyword runs a separate search. |
| `maxProductsPerSearch` | integer | 100 | Maximum number of unique products to return for each keyword. |
| `maxSearchPages` | integer | 5 | Max search result pages per keyword (capped at 25; ~40 products per page). |
| `sort` | string | `"best_match"` | One of `best_match`, `best_seller`, `price_low`, `price_high`, `rating_high`, `new`. |
| `maxRequestRetries` | integer | 5 | Number of retry attempts for failed requests (1–10). |
| `proxyConfiguration` | object | residential | Apify proxy configuration. Residential is strongly recommended. |

### How to scrape Walmart products

1. Open **Walmart Scraper** in Apify Console.
2. Enter one or more search keywords (e.g., `laptop`, `wireless earbuds`).
3. Choose a sort order.
4. Set `maxProductsPerSearch` and `maxSearchPages`.
5. Click **Start** and download results as **JSON, CSV, or Excel**.

### How much does it cost to scrape Walmart?

Walmart Scraper uses **pay-per-event** pricing — you only pay for products written to the dataset. Duplicates across keywords and pages are deduplicated by `usItemId` and **not double-billed**.

| Event | Price (Free / Bronze) | Price (Business Gold, –48%) |
|---|---|---|
| Actor start (per run) | $0.001 | $0.001 |
| Product scraped | $4.60 / 1,000 | $2.40 / 1,000 |

**Cost examples:**

- 40 products (1 page): ~$0.18
- 100 products (2–3 pages): ~$0.46
- 200 products (5 pages): ~$0.92
- 1000 products (25 pages): ~$4.60

Platform usage costs (compute, residential proxy) are **included** in the per-event price.

### API usage

#### Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('prodiger/walmart-scraper').call({
    searchQueries: ['laptop'],
    maxProductsPerSearch: 40,
    sort: 'price_low',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((product) => {
    console.log(`$${product.price} - ${product.name} (${product.rating}/5, ${product.reviewCount} reviews)`);
});
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run = client.actor('prodiger/walmart-scraper').call(run_input={
    'searchQueries': ['laptop'],
    'maxProductsPerSearch': 40,
    'sort': 'price_low',
})

for product in client.dataset(run['defaultDatasetId']).list_items().items:
    print(f"${product['price']} - {product['name']} ({product['rating']}/5, {product['reviewCount']} reviews)")
```

#### cURL

```sh
curl "https://api.apify.com/v2/acts/prodiger~walmart-scraper/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "searchQueries": ["organic coffee"],
    "maxProductsPerSearch": 40,
    "sort": "best_match"
  }'
```

### Use with AI agents via MCP

Walmart Scraper is available as a tool for AI assistants that support the **Model Context Protocol (MCP)**.

#### Setup for Claude Code

```sh
claude mcp add --transport http apify "https://mcp.apify.com/?tools=prodiger/walmart-scraper"
```

#### Setup for Claude Desktop, Cursor, or VS Code

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?tools=prodiger/walmart-scraper"
        }
    }
}
```

#### Example prompts

- "Search Walmart for organic coffee and show me the cheapest 20 products."
- "Find the best-selling laptops on Walmart sorted by rating."
- "Compare Walmart prices for these 10 product keywords."

### Integrations

Walmart Scraper works with all standard Apify integrations:

- **Webhooks** — get notified when a run finishes.
- **API** — start runs and fetch results programmatically.
- **Scheduling** — run daily to build price history datasets.
- **Storage** — export as JSON, CSV, or Excel; push to Google Sheets, Slack, or email.
- **Zapier / Make / n8n** — connect Walmart data to thousands of apps.

### Tips and best practices

- **Use `price_low`** to surface deep discounts first.
- **Check `onSale` and `discountPercent`** to filter for genuine deals — `discountPercent` is computed for you.
- **Filter by `seller === "Walmart.com"`** to isolate first-party listings from third-party marketplace sellers.
- **Schedule daily** with the same keywords to build a price history. At ~$0.0046 per product, tracking 200 products daily costs about $0.92/day on Free tier or $0.48/day on Business Gold.
- **Combine keywords** — passing multiple keywords in one run is cheaper than starting multiple runs because of run-level deduplication on overlapping items.

### Limitations

- Walmart uses aggressive bot detection. The scraper uses residential proxies and automatic retries. Increase `maxRequestRetries` to 7–10 for noisier IP pools.
- Returns ~40 products per page, up to 25 pages (~1000 products per keyword).
- `brand` may be null for sponsored placements that omit it.
- Walmart.com (US) only. Does not support international Walmart sites.
- Does not scrape individual product pages, reviews, or seller profiles.

### FAQ

**The scraper returns 0 results for my keyword. What's wrong?** Walmart's bot detection may temporarily block a request. Try increasing `maxRequestRetries` to 7–10 and re-running. Verify the keyword returns results on walmart.com directly — very niche or misspelled terms may return empty pages.

**Are duplicate products charged twice?** No. We deduplicate by `usItemId` across the whole run, so the same item showing up under two keywords (or as sponsored on page 1 and organic on page 2) is written and billed exactly once.

**Can I filter by seller (Walmart.com vs third-party)?** There's no input filter for seller, but the output includes the `seller` field. Filter in your pipeline by `seller === "Walmart.com"` to isolate first-party listings.

### Legality

Scraping publicly accessible product data from Walmart.com — prices, ratings, and other information visible to any shopper without logging in — is generally legal based on established case law (notably *hiQ Labs v. LinkedIn*, 9th Cir. 2022).

Walmart Scraper:

- Does not require authentication or bypass any login
- Does not access private account data or restricted pages
- Does not download or reproduce copyrighted content beyond facts (prices, ratings, product names)
- Uses publicly visible search results that any shopper can see

Walmart's Terms of Use prohibit scraping. For personal research or small-scale use, enforcement is rare. For enterprise or legally sensitive use cases, consult legal counsel about the specific application.

# Actor input Schema

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

List of keywords to search on Walmart. Each keyword runs a separate search. Examples: 'wireless earbuds', 'laptop', 'organic coffee'.

## `maxProductsPerSearch` (type: `integer`):

Maximum number of unique products to return for each keyword. Walmart returns roughly 40 products per page.

## `maxSearchPages` (type: `integer`):

Maximum number of search result pages per keyword. Each page has ~40 products. Pagination stops when this limit OR maxProductsPerSearch is reached, whichever comes first.

## `sort` (type: `string`):

How to sort search results.

## `maxRequestRetries` (type: `integer`):

Number of retry attempts for failed requests (429, 5xx, 403 from bot-detection gateways). Higher values improve reliability on flaky residential IPs.

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

Apify proxy. Residential proxies are strongly recommended — Walmart blocks datacenter IPs almost immediately. Leaving the default keeps you on RESIDENTIAL.

## Actor input object example

```json
{
  "searchQueries": [
    "wireless earbuds"
  ],
  "maxProductsPerSearch": 100,
  "maxSearchPages": 5,
  "sort": "best_match",
  "maxRequestRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Scraped Walmart products. One record per unique usItemId across the run.

# 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 = {
    "searchQueries": [
        "wireless earbuds"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("prodiger/walmart-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 = {
    "searchQueries": ["wireless earbuds"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("prodiger/walmart-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 '{
  "searchQueries": [
    "wireless earbuds"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call prodiger/walmart-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,prodiger/walmart-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/5vTVMdfXuw3UtqS1z/builds/kEuvQd8aSJf6g0Vyd/openapi.json
