# Walmart Product & Price Scraper (`devilscrapes/walmart-price-scraper`) Actor

Scrape Walmart.com (US) product and price data by search term, product URL, or item ID — title, current price, was/strike-through price, in-stock status, rating, review count, and Walmart-vs-marketplace seller type. Export to JSON or CSV.

- **URL**: https://apify.com/devilscrapes/walmart-price-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% 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/platform/actors/running/actors-in-store#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

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Walmart Product & Price Scraper

**💰 $2.02 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Scrape Walmart.com (US) product and price data by search term, product URL, or item ID — title, current price, was/strike-through price, in-stock status, rating, review count, and Walmart-vs-marketplace seller type. Export to JSON or CSV.

</div>

***

### 🎯 What this scrapes

Walmart runs no public product-data API. This Actor looks up products three ways — search term, direct product URL, or Walmart item ID — and returns one clean schema across all three: current + was price, stock status, rating, and an explicit seller\_type field (Walmart-fulfilled vs third-party marketplace) that most Walmart scrapers leave out. Built on `curl-cffi` with browser TLS impersonation.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes so the target sees a browser, not Python.
- 🌐 **Residential proxy rotation** via Apify Proxy — fresh session and exit IP on every block.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, `Retry-After` honoured.
- 🧱 **Rate-limit-aware pacing** — when the target pushes back, we slow down instead of getting banned.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **Reseller/arbitrage margin checks** — pull current price + stock across a candidate SKU list before buying to resell.
- **Retail price intelligence** — track price and "was" price movement across a competitor catalog by search term or item ID.
- **Marketplace-vs-Walmart mix analysis** — use <code>seller\_type</code> to see which listings are Walmart-fulfilled vs third-party, at scale.
- **Stock/availability monitoring** — schedule re-runs and diff <code>in\_stock</code> / <code>availability\_status</code> for restock alerts.
- **Catalog enrichment** — resolve a list of Walmart item IDs into title, brand, rating, and image in one call.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `searchTerms` | `array` | no | \[] | Search queries to run on walmart.com. Each term returns up to <code>maxResultsPerSearch</code> products. |
| `productUrls` | `array` | no | \[] | Direct Walmart product-detail-page URLs (<code>walmart.com/ip/...</code>). |
| `productIds` | `array` | no | \[] | Walmart <code>usItemId</code> values — the numeric (8-11 digit) trailing segment of a <code>/ip/{slug}/{itemId}</code>… |
| `maxResultsPerSearch` | `integer` | no | 20 | Cap on the number of products returned per search term. |
| `includeOutOfStock` | `boolean` | no | True | When off, out-of-stock rows are dropped (and not billed). |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True, 'apifyProxyGroups': \['RESIDENTIAL'], 'apifyProxyCountry': 'US'} | Apify Proxy spec. Walmart hard-blocks Apify's shared datacenter pool (block-interstitial on every request) —… |

#### Example input

```json
{
  "searchTerms": [
    "nintendo switch"
  ],
  "productIds": [
    "487976361"
  ],
  "maxResultsPerSearch": 2,
  "includeOutOfStock": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `item_id` | `string` | Walmart usItemId. |
| `title` | `string` | Product name. |
| `brand` | `['string', 'null']` | Brand name. |
| `url` | `string` | Canonical /ip/{slug}/{itemId} product URL. |
| `price_current` | `['number', 'null']` | Current listed USD price. |
| `price_was` | `['number', 'null']` | Strike-through/list price, only if present — never copied from price\_current. |
| `currency` | `string` | Always <code>USD</code>. |
| `in_stock` | `boolean` | Derived from the availability field. |
| `availability_status` | `['string', 'null']` | Raw Walmart availability status string. |
| `rating_average` | `['number', 'null']` | Average star rating. |
| `rating_count` | `['integer', 'null']` | Review count. |
| `seller_name` | `['string', 'null']` | Offer's seller display name. |
| `seller_type` | `['string', 'null']` | <code>walmart</code> (sold/shipped by Walmart) or <code>marketplace</code> (third-party seller). |
| `image_url` | `['string', 'null']` | Primary product image URL. |
| `search_term` | `['string', 'null']` | Populated only for search-mode rows. |
| `scraped_at` | `string` | ISO 8601 UTC row-creation time. |

#### Example output

```json
{
  "item_id": "487976361",
  "title": "Nintendo Switch OLED Model - White",
  "brand": "Nintendo",
  "url": "https://www.walmart.com/ip/Nintendo-Switch-OLED-White/487976361",
  "price_current": 349.0,
  "price_was": 399.99,
  "currency": "USD",
  "in_stock": true,
  "availability_status": "IN_STOCK",
  "rating_average": 4.8,
  "rating_count": 3241,
  "seller_name": "Walmart.com",
  "seller_type": "walmart",
  "image_url": "https://i5.walmartimages.com/asr/example.jpeg",
  "search_term": null,
  "scraped_at": "2026-08-01T17:40:00.000Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.02 | One-off warm-up charge per run |
| `result-item` | $0.002 | Per unique dataset item |

Example: 1 000 results at the rates above ≈ **$2.02**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

US <code>walmart.com</code> storefront only — no Canada, Mexico, or the Marketplace seller console. Review text isn't included, only <code>rating\_average</code>/<code>rating\_count</code>. No historical price time-series — only the current-vs-was pair present at scrape time. Anonymous public pricing only, not Walmart+ member pricing. Variant/option fan-out is limited to the variant resolved on the given input.

### ❓ FAQ

**Does this cover Walmart Canada or Mexico?**

No — <code>walmart.com</code> (US storefront) only. See Limitations.

**Does it return historical price history?**

No — Walmart's page data exposes at most one current-vs-was price pair per scrape. Run this Actor on a schedule and diff the rows yourself for a time series.

**What's the difference between price\_current and price\_was?**

<code>price\_current</code> is the live listed price. <code>price\_was</code> is the strike-through/list price, only populated when Walmart's page actually shows one — it is never fabricated or copied from <code>price\_current</code>.

**How does seller\_type work?**

<code>walmart</code> means sold and shipped by Walmart.com; <code>marketplace</code> means a third-party seller fulfills the order. Useful for filtering out marketplace mark-ups.

**Can I mix search terms, URLs, and item IDs in one run?**

Yes — provide any combination of the three input fields. Rows are de-duplicated by <code>item\_id</code> across all three modes so you're never charged twice for the same product.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `searchTerms` (type: `array`):

Search queries to run on walmart.com. Each term returns up to <code>maxResultsPerSearch</code> products.

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

Direct Walmart product-detail-page URLs (<code>walmart.com/ip/...</code>).

## `productIds` (type: `array`):

Walmart <code>usItemId</code> values — the numeric (8-11 digit) trailing segment of a <code>/ip/{slug}/{itemId}</code> URL.

## `maxResultsPerSearch` (type: `integer`):

Cap on the number of products returned per search term.

## `includeOutOfStock` (type: `boolean`):

When off, out-of-stock rows are dropped (and not billed).

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

Apify Proxy spec. Walmart hard-blocks Apify's shared datacenter pool (block-interstitial on every request) — RESIDENTIAL is required, not optional.

## Actor input object example

```json
{
  "searchTerms": [
    "nintendo switch"
  ],
  "productUrls": [],
  "productIds": [],
  "maxResultsPerSearch": 20,
  "includeOutOfStock": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "searchTerms": [
        "nintendo switch"
    ],
    "maxResultsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/walmart-price-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 = {
    "searchTerms": ["nintendo switch"],
    "maxResultsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/walmart-price-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 '{
  "searchTerms": [
    "nintendo switch"
  ],
  "maxResultsPerSearch": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call devilscrapes/walmart-price-scraper --silent --output-dataset

```

## MCP server setup

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