# Walmart Product Scraper (`f-keys/walmart-product-scraper`) Actor

Bulk-scrape Walmart search results: item ID, name, price, was-price, rating, review count, seller, brand, availability, image, and sponsored flag. Any keyword, proxy-backed.

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

## Pricing

from $2.00 / 1,000 products

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

## Walmart Product Scraper

Bulk-collect product data from Walmart search results: **item ID, name, price, was-price, rating, review count, seller, brand, availability, image, and sponsored flag** — for any keyword, at whatever volume you need. Proxy-backed to get through Walmart's bot protection.

Built for price monitoring, competitive research, catalog building, and market analysis across Walmart's marketplace.

***

### What it does

- **Rich, structured product data** pulled straight from Walmart's own embedded page data (not fragile HTML scraping) — so fields are clean and consistent.
- **Price, was-price, rating, reviews, seller, availability, condition** for every result, plus the sponsored flag so you can separate ads from organic.
- **Paginates and dedupes.** Walks the result pages per keyword, honors Walmart's own last-page marker, removes duplicate item IDs, and stops at your limit.
- **Skip sponsored** with one toggle for organic-only results.
- **Built for Walmart's defenses.** Walmart blocks datacenter IPs; this actor retries blocked pages on fresh proxy sessions and defaults to the residential proxy group.

### Input

| Field | Type | Description |
|---|---|---|
| `keywords` | array (required) | Search terms, e.g. `"air fryer"`, `"office chair"`. |
| `maxItems` | integer | Stop after this many products total. `0` = no limit. |
| `skipSponsored` | boolean | Exclude ad listings. |
| `maxPagesPerKeyword` | integer | Pagination-depth cap (also stops at Walmart's last page). |
| `maxRetries` | integer | Retries per blocked page, each on a fresh proxy session. |
| `proxyConfiguration` | object | Required in practice — Apify Proxy `RESIDENTIAL`. |

#### Example input

```json
{
  "keywords": ["air fryer", "office chair"],
  "maxItems": 200,
  "skipSponsored": false,
  "proxyConfiguration": { "useApifyProxy": true, "groups": ["RESIDENTIAL"] }
}
```

### Output

One row per product.

```json
{
  "itemId": "14807770498",
  "name": "Thyme & Table 6QT Slate Grey Air Fryer",
  "url": "https://www.walmart.com/ip/Thyme-Table-6QT-Air-Fryer/14807770498",
  "price": 89.98,
  "currency": "USD",
  "wasPrice": 109.00,
  "rating": 4.5,
  "reviewsCount": 815,
  "seller": "Walmart.com",
  "brand": null,
  "availability": "IN_STOCK",
  "condition": "New",
  "image": "https://i5.walmartimages.com/seo/...png",
  "sponsored": true,
  "searchKeyword": "air fryer",
  "page": 1
}
```

### Pricing

Pay-per-event: charged per product returned. A run that is blocked and returns nothing costs nothing.

### Notes & limits

- **Residential proxies are effectively required.** Datacenter IPs get blocked almost immediately — a property of Walmart, and the reason the proxy default is residential.
- Fields are read from Walmart's embedded product data; some listings legitimately have no price, brand, or reviews (returned as `null`).
- Covers Walmart.com (US).
- This actor reads publicly listed product data. Use the output in accordance with Walmart's Terms of Use and applicable law in your jurisdiction.

### Running locally (developers)

```
npm install
npm test
```

`src/test-local.js` proves the parser offline against a fixture that mirrors Walmart's real embedded-data structure, then attempts one live search. Core logic lives in `src/walmart.js` with no dependency on the Apify SDK and no HTML parser — Walmart's data is JSON.

***

www.f-keys.com | © 2026 F-Keys Creative LLC

# Actor input Schema

## `keywords` (type: `array`):

What to search for on Walmart.com, e.g. "air fryer", "office chair". One search per entry.

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

Stop after this many products across all keywords. 0 = no limit.

## `skipSponsored` (type: `boolean`):

Exclude ad/sponsored listings, keeping only organic results.

## `maxPagesPerKeyword` (type: `integer`):

Safety cap on pagination depth (the actor also stops at Walmart's own last page).

## `maxRetries` (type: `integer`):

Retries on a blocked/failed page, each on a fresh proxy session.

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

REQUIRED in practice. Walmart blocks datacenter IPs; use Apify Proxy RESIDENTIAL group.

## Actor input object example

```json
{
  "keywords": [
    "air fryer",
    "office chair"
  ],
  "maxItems": 100,
  "skipSponsored": false,
  "maxPagesPerKeyword": 25,
  "maxRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "groups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

The scraped Walmart products, as JSON dataset items.

# 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 = {
    "keywords": [
        "air fryer",
        "office chair"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "groups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("f-keys/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 = {
    "keywords": [
        "air fryer",
        "office chair",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "groups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("f-keys/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 '{
  "keywords": [
    "air fryer",
    "office chair"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "groups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call f-keys/walmart-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,f-keys/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/nTyl4C45lgnEhe7kA/builds/3bIazG5UTp0IXC9c4/openapi.json
