# Walmart Search Scraper - Products, Prices, Ratings (`zet46/walmart-search-scraper`) Actor

Scrape Walmart.com search results and product pages. Returns usItemId, name, price, wasPrice (sale), rating, review count, image, seller, availability, badge and sponsored flag. US pricing (Apify datacenter US proxy built-in). $1 per 1,000 products.

- **URL**: https://apify.com/zet46/walmart-search-scraper.md
- **Developed by:** [An Tan Huynh](https://apify.com/zet46) (community)
- **Categories:** E-commerce, AI, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 product scrapeds

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 Search Scraper

Scrape Walmart.com search results and product pages. Returns a flat row per product with usItemId, name, price, wasPrice (sale comparison), rating, review count, image, seller, availability, badge and sponsored flag.

- Pay per product: **$0.001** per item (= $1 per 1,000 products).
- No API key, no cookies to manage. Apify datacenter US proxy is wired in by default (Walmart only serves prices to US IPs).
- Up to 1,000 items per query, 25 pages, 20-57 products per page.

### Input

```json
{
  "queries": ["laptop", "coffee maker"],
  "maxItemsPerQuery": 100,
  "maxPagesPerQuery": 3,
  "includeSponsored": false,
  "onlyInStock": false,
  "minRating": 4.0,
  "minReviews": 50
}
```

- `queries` — list of Walmart search terms. Paginated until `maxItemsPerQuery` or `maxPagesPerQuery` is reached.
- `productUrls` — Walmart product URLs for detail scraping. Accepts full URLs, canonical paths (`/ip/<name>/<usItemId>`) or bare usItemId.
- `includeSponsored` — if false (default), paid ads injected into results are filtered out.
- `onlyInStock` — if true, only `IN_STOCK` items are kept.
- `minRating` / `minReviews` — filters before billing. Items that don't meet them are not charged.

### Output

Each row:

```json
{
  "usItemId": "5304824336",
  "name": "HP 14 inch HD Windows Laptop Intel Processor N150 4GB 128GB UFS Waterfall Blue",
  "url": "https://www.walmart.com/ip/HP-14-N150-4-128-Blue/5304824336",
  "price": 199.00,
  "wasPrice": 259.00,
  "currency": "USD",
  "rating": 4.1,
  "reviewCount": 1561,
  "image": "https://i5.walmartimages.com/.../laptop.jpg",
  "category": "Laptop Computers",
  "seller": "Walmart.com",
  "sellerId": "F55CDC31AB754BB68FE0B39041159D63",
  "availability": "IN_STOCK",
  "badge": "Rollback",
  "sponsored": false,
  "fulfillment": "SHIPPING",
  "position": 1,
  "page": 1,
  "query": "laptop",
  "scrapedAt": "2026-10-15T23:55:00+00:00"
}
```

CSV download also available (append `?format=csv` to the dataset URL).

### Use cases

- **Price monitoring** — rerun daily on your category to track price + Rollback badge drops.
- **Rank tracking** — see where your SKU lands for its target query (`position`, `page`, `query`).
- **Market research** — pull the top 100 results for a niche, filter sponsored, compute median price and rating distribution.
- **Competitor analysis** — compare Walmart first-party listings (`seller=Walmart.com`) vs third-party marketplace sellers.

### Pricing & cost

- `$0.001` per product scraped (= $1 per 1,000 items).
- Platform costs (compute + proxy) typically add $0.03 - $0.06 to a 1,000-item run; set via the Apify pricing model to be invisible to end users.

### Notes

- Walmart's search page is rendered server-side in `<script id="__NEXT_DATA__">`. The actor parses that JSON directly (no headless browser), so it is fast and cheap.
- `price` can be null on a few items (e.g. "See price in cart"). `wasPrice` is only set when Walmart shows a strikethrough comparison.
- Walmart serves prices only to US IPs. The actor forces Apify datacenter US proxy — do not override the country.
- Pagination caps around 25 pages per query. If `maxPagesPerQuery` exceeds that, the actor stops when Walmart returns no more items.

### Author

Built and maintained by [@zet46](https://apify.com/zet46).

# Actor input Schema

## `queries` (type: `array`):

List of Walmart search terms. Each query is paginated until maxItemsPerQuery or maxPagesPerQuery is reached. Example: \['laptop', 'coffee maker', 'nike shoes'].

## `productUrls` (type: `array`):

Walmart product URLs to scrape in detail. Accepts full URLs ('https://www.walmart.com/ip/.../5304824336'), canonical paths ('/ip/.../5304824336') or bare usItemId ('5304824336').

## `maxItemsPerQuery` (type: `integer`):

Upper bound on items returned per query. One search page yields 20-57 products.

## `maxPagesPerQuery` (type: `integer`):

How many search result pages to fetch per query. Walmart serves up to 25 pages.

## `includeSponsored` (type: `boolean`):

Walmart injects paid ads among organic results (isSponsoredFlag=true). Off by default to keep only organic rankings.

## `onlyInStock` (type: `boolean`):

Skip items whose availabilityStatus is OUT_OF_STOCK / RETIRED.

## `minRating` (type: `number`):

Skip (and don't charge for) items below this rating. Items without a rating are also skipped if set.

## `minReviews` (type: `integer`):

Skip (and don't charge for) items with fewer reviews. Items without a review count are also skipped if set.

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

Apify datacenter US proxy is used by default (country is always forced to US because Walmart only serves prices to US IPs). You rarely need to change this.

## Actor input object example

```json
{
  "queries": [
    "laptop",
    "coffee maker"
  ],
  "maxItemsPerQuery": 100,
  "maxPagesPerQuery": 3,
  "includeSponsored": false,
  "onlyInStock": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (type: `string`):

All scraped Walmart products as JSON items (one per row).

## `productsCsv` (type: `string`):

The same products as a CSV file.

# 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 = {
    "queries": [
        "laptop",
        "coffee maker"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zet46/walmart-search-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 = {
    "queries": [
        "laptop",
        "coffee maker",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zet46/walmart-search-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 '{
  "queries": [
    "laptop",
    "coffee maker"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zet46/walmart-search-scraper --silent --output-dataset

```

## MCP server setup

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