# Walmart Search Scraper: Product Prices & Ratings by Keyword (`mjohnson7cd/walmart-search-scraper`) Actor

Scrape Walmart.com search results by keyword. Returns product name, current price, was-price, rating, review count, seller, item ID and product URL for every result. Page through multiple result pages per query. Export CSV, Excel, JSON or API. Beta: feedback welcome.

- **URL**: https://apify.com/mjohnson7cd/walmart-search-scraper.md
- **Developed by:** [Mara Johnson](https://apify.com/mjohnson7cd) (community)
- **Categories:** E-commerce, SEO tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.83 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

This **Walmart search scraper** searches Walmart.com by keyword and returns one row per product, straight from Walmart's own embedded page data: name, current price, was-price, rating, review count, seller, stock, item ID and product URL. Page through several result pages per keyword and export to CSV, Excel, JSON or the API, for Walmart price monitoring, assortment research and competitor tracking.

### What data can this Walmart search scraper extract?

One row per product, with: name, current price, was-price, price range, currency, average rating, review count, seller name, availability, sponsored flag, badges (Rollback, Best seller...), delivery and pickup options, brand, image, item ID and URL.

Optionally set `includeSellerOffers` to open each product's page and add UPC, model, specifications, condition offers (new / pre-owned with prices) and the buy-box seller's rating. Those rows are billed as `product-with-offers-scraped` (see pricing).

### How to scrape Walmart search results

1. Click **Try for free** and open the **Input** tab.
2. Enter your keywords in `searchQueries`, exactly as you would type them on Walmart.com.
3. Choose how many result pages (`maxPagesPerQuery`) and products (`maxResultsPerQuery`) to read per keyword.
4. Set a maximum cost per run if you want a hard spending cap.
5. Click **Start**, then download the results from the **Output** tab as CSV, Excel or JSON, or fetch them through the API.

| Field | Description |
|---|---|
| `searchQueries` | Keywords to search, exactly as you would type them on Walmart.com. Required. Up to 100 per run. |
| `maxPagesPerQuery` | Search result pages to read per query (about 40-50 products each). Default 2. |
| `maxResultsPerQuery` | Stop a query after this many unique products. Default 100. |
| `includeSellerOffers` | Open each product page for seller and offer detail. One extra page per product, billed as `product-with-offers-scraped` instead of `product-scraped`. |

#### Example input

```json
{
  "searchQueries": ["air fryer", "65 inch tv"],
  "maxPagesPerQuery": 2,
  "maxResultsPerQuery": 100
}
```

#### Example output row (abridged)

```json
{
  "row_type": "product", "query": "air fryer", "position": 2,
  "us_item_id": "16412759179",
  "name": "Ninja DualZone FlexBasket Air Fryer 8-Qt, 4-in-1, ...",
  "price": 109.0, "was_price": 149.0, "currency": "USD",
  "average_rating": 4.6, "review_count": 7149,
  "seller_name": "Walmart.com", "availability_status": "IN_STOCK",
  "from_cache": false, "cached_at": null, "cache_age_seconds": null
}
```

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

You pay per delivered row, and each row is billed exactly once:

| Event | Free | Starter | Scale | Business | Billed for |
|---|---|---|---|---|---|
| `product-scraped` | $0.0015 | $0.00128 | $0.00105 | $0.00083 | a product from a search results page |
| `product-with-offers-scraped` | $0.0055 | $0.005 | $0.0045 | $0.0039 | with `includeSellerOffers` on: a product whose page was opened for offer data, billed **instead of** `product-scraped`, never both |

Plan names are Apify's subscription plans. Plans above Business pay the Business price. What realistic runs cost:

| Run | Free | Starter | Scale | Business |
|---|---|---|---|---|
| 100 search results (one keyword) | $0.15 | $0.128 | $0.105 | $0.083 |
| 1,000 search results (10 keywords x 100) | $1.50 | $1.28 | $1.05 | $0.83 |
| 100 search results with seller offers | $0.55 | $0.50 | $0.45 | $0.39 |

Apify also charges its own Actor start fee of $0.002 per run. This Actor never charges it itself, and because a run uses at most 1 GB of memory, you pay that fee once per run.

**Not billed:** blocked or failed pages, out-of-stock products (delivered free, so you still see them), Walmart's "Other options to consider" padding, and duplicates: a product found on two pages or by two of your queries is billed once, even if the run is migrated to another server. Set a maximum cost per run and the Actor stops cleanly before the next row would exceed it.

**Cache hits are billed like fresh fetches.** `useCache` is ON by default, and a row served from the cache is charged exactly like one fetched live. Set `useCache` to `false`, or `forceRefresh` to `true`, for a live read.

### Only real Walmart search results

For a query with no matches, Walmart pads the page with "Other options to consider". Those rows are dropped, so you never pay for products you did not search for. Duplicate sponsored copies are removed too.

- **Prices that are actually there.** Walmart moved its prices into a new data structure and the old price fields are now empty. This Actor reads the current structure and is regression-tested against real saved Walmart pages.
- **Blocked pages never fail your run.** Requests go through US residential IPs and are retried on fresh ones. If Walmart still refuses a page, the run finishes successfully with everything else.
- **Uniform columns.** Every row carries the same key set, so CSV and Excel exports are never ragged.

### Limits

- US Walmart.com only, prices in USD.
- Walmart shows about 13 result pages for a broad query, so very deep searches stop there.
- Search rows do not include UPC, specifications or condition offers; turn on `includeSellerOffers` or use the Walmart Product Scraper for those.
- Store-level and ZIP-code availability is not included.
- Every run writes a `RUN_STATS` record: rows per billing event, blocked or failed pages, items with a missing price, bandwidth and cache hit rate.

### Does this Walmart scraper store data in my account?

Yes, a small short-lived cache. **`useCache` is ON by default**, and the cache is used only while it stays on. **Cache hits are billed like fresh fetches:** a row served from the cache is charged the same event and price as a row fetched live from Walmart. The Actor opens a **named key-value store called `walmart-search-cache` in your own Apify account**. It holds the finished rows of recently scraped pages, under hashed keys, so a repeat request within the cache lifetime does not fetch Walmart again. Search and product results are kept for 3 hours by default and never more than 6 hours. Every entry expires after at most 24 hours, and expired entries are deleted when a read finds them and by a sweep at the end of every run.

Apify keeps named stores until you delete them, so the store itself stays in your account's **Storage** tab between runs. You can delete it at any time; the next run simply starts with an empty cache. Set `useCache` to `false` and the store is not opened at all. The cache is never shared with other users. Every row says whether it came from the cache (`from_cache`, `cached_at`, `cache_age_seconds`), and `forceRefresh` fetches everything live.

### Other Walmart scrapers

- [Walmart Scraper](https://apify.com/mjohnson7cd/walmart-scraper): search, product pages, seller offers and reviews in one Actor
- [Walmart Product Scraper](https://apify.com/mjohnson7cd/walmart-product-scraper): price, stock and seller offers by product URL or item ID
- [Walmart Reviews Scraper](https://apify.com/mjohnson7cd/walmart-reviews-scraper): customer reviews by product URL or item ID

### Other Actors by the same author

| Actor | What it does |
|---|---|
| [AliExpress Scraper](https://apify.com/mjohnson7cd/aliexpress-scraper) | Products, prices, discounts and units sold from AliExpress search |
| [EU Company Registry & KYB Lookup](https://apify.com/mjohnson7cd/eu-company-registry-kyb) | Company lookups in the official FR, NO, FI and CZ registries |
| [API Endpoint Crawler](https://apify.com/mjohnson7cd/api-endpoint-crawler) | Finds the API endpoints a website's JavaScript calls |
| [Tech Stack Fingerprinter](https://apify.com/mjohnson7cd/tech-stack-fingerprinter) | Detects a website's server, CDN, frameworks, CMS, analytics and security headers |
| [Subdomain Finder](https://apify.com/mjohnson7cd/subdomain-finder) | Finds a domain's subdomains from certificate transparency and DNS, probed live |

### Why run it on Apify?

- **Schedule it** to track Walmart prices daily or weekly.
- **Use the API** or the Apify client libraries to start runs and download results from your own code.
- **Connect it** to Google Sheets, Make, Zapier, Slack, webhooks and other integrations.
- **Proxy rotation is built in**: the Actor uses Apify's US residential proxy and rotates IPs for you.

### Beta

This Actor is in beta. The billing rules on this page and the row format are stable: new columns may be added, but none are removed or renamed. Walmart changes its pages from time to time, which can briefly break a field until it is fixed. Report a problem, or ask for a field, on the **Issues** tab.

### FAQ

#### Is it legal to scrape Walmart?

This Actor only reads pages that Walmart shows to any visitor without logging in. Scraping public data is generally lawful, but laws and Walmart's terms apply to how you use the data. If you are unsure, ask a lawyer.

#### Why did my run return fewer rows than I expected?

Walmart sometimes refuses a page even on a fresh residential IP. Those pages are retried, then skipped and not billed. The run's `RUN_STATS` record lists every blocked or failed page. If Walmart blocks 10 pages in a row, the run stops early and says so in its status message, instead of continuing to request blocked pages. Try again a little later.

#### Why does it need a residential proxy?

Walmart blocks datacenter and cloud IP addresses with a "Robot or human?" page. The Actor uses Apify's US residential proxy automatically. If your account has no residential proxy access, the run stops right away with a clear message instead of returning nothing.

### Not affiliated with Walmart

This Actor is not affiliated with or endorsed by Walmart Inc. Walmart is a trademark of its owner and is used here only to describe the source of the data.

# Changelog

This Actor's version history is a separate document: https://apify.com/mjohnson7cd/walmart-search-scraper/changelog.md

# Actor input Schema

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

Keywords to search on Walmart.com, exactly as you would type them in the Walmart search box. Each query returns one row per product (about 40-50 unique products per results page).

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

How many search result pages to read for each query. Walmart shows about 40-50 unique products per page and stops at roughly 13 pages.

## `maxResultsPerQuery` (type: `integer`):

Stop a query after this many unique products, even if more pages are allowed.

## `includeSellerOffers` (type: `boolean`):

Open each product's page to add buy-box seller details, condition offers (new / pre-owned with prices), secondary offer price, UPC, model and specifications. Billed as the premium product event. Slower: one extra page per product.

## `useCache` (type: `boolean`):

Reuse a result fetched in the last few hours (3 hours by default, never more than 6 for price data) instead of fetching it again. Every row shows from_cache, cached_at and cache_age_seconds so you always know how fresh a price is. Turn off for a guaranteed-live read.

## `cacheMaxAgeHours` (type: `integer`):

Ignore cached results older than this many hours. Leave empty to accept anything within the cache lifetime (3 hours for prices, 24 hours for reviews).

## `forceRefresh` (type: `boolean`):

Fetch everything live for this run and refresh the cache with the new results.

## Actor input object example

```json
{
  "searchQueries": [
    "air fryer"
  ],
  "maxPagesPerQuery": 2,
  "maxResultsPerQuery": 100,
  "includeSellerOffers": false,
  "useCache": true,
  "forceRefresh": false
}
```

# Actor output Schema

## `results` (type: `string`):

One row per product found for your keywords, with price, rating, seller and stock, plus freshness fields from_cache, cached_at and cache_age_seconds.

## `productsView` (type: `string`):

The same dataset opened on the Products table: price, was-price, rating, seller and stock columns.

## `sellerOffersView` (type: `string`):

The same dataset opened on the Seller & offers table: buy-box seller, condition offers and offer counts.

## `runStats` (type: `string`):

Rows per billing event, blocked or failed pages, items with a missing price, HTTP and proxy bandwidth used, and cache hit rate.

# 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": [
        "air fryer"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mjohnson7cd/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 = { "searchQueries": ["air fryer"] }

# Run the Actor and wait for it to finish
run = client.actor("mjohnson7cd/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 '{
  "searchQueries": [
    "air fryer"
  ]
}' |
apify call mjohnson7cd/walmart-search-scraper --silent --output-dataset

```

## MCP server setup

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