# Walmart Product Search & Details Scraper (`diopside/walmart-products`) Actor

Walmart.com search results and product details as JSON: price, was-price, unit price, rating, reviews count, availability, seller, images, UPC, specifications. Passes bot protection with a browser fingerprint + Apify proxy.

- **URL**: https://apify.com/diopside/walmart-products.md
- **Developed by:** [DIOPSIDE AI](https://apify.com/diopside) (community)
- **Categories:** E-commerce, Other, Agents
- **Stats:** 2 total users, 1 monthly users, 87.5% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 product records

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 Product Search & Details Scraper

Walmart.com search results and product details as clean JSON — current price, was-price, unit price,
rating, review count, availability, seller, images; detail records add UPC, manufacturer, category
path and full specifications.

- **Reads Walmart's current price layout.** Walmart moved prices into `priceDetails.priceLines`; scrapers
  reading the old `linePrice` fields return empty prices. This one reads both.
- **US results from US IPs.** Walmart serves an empty catalog to non-US visitors. Apify proxy (country US)
  is on by default, with a browser TLS fingerprint to pass bot protection.
- Detail records are always emitted, even if the same item appeared in your search results.

### vs other Walmart scrapers

Two of the busiest alternatives (`walmart-reviews-scraper` ×2) only cover reviews, not product
search or pricing — you'd need a second actor either way. Of the ones that do products,
`walmart-product-detail-scraper` (82 monthly users) and `walmart-scraper` (43 monthly users) both
run reliably today; the gap this actor fills is combined search + detail with unit price and the
current `priceDetails.priceLines` layout in one pass.

### Input

| field | default | notes |
|---|---|---|
| `searchTerms` | `["milk"]` | one listing per term, paginated |
| `productIds` | `[]` | item IDs (`10450114`) or product URLs → detail records |
| `maxItemsPerQuery` | `80` | per search term; `0` = all pages |
| `proxyConfiguration` | Apify proxy, US | keep on; RESIDENTIAL US if you see `blocked` |

### Output

```json
{"us_item_id": "10450114", "name": "Great Value Whole Vitamin D Milk, Gallon", "brand": "Great Value",
 "price": 3.32, "price_was": null, "unit_price": "2.6 ¢/fl oz", "price_display": "$3.32", "currency": "USD",
 "rating": 4.6, "review_count": 392055, "availability": "IN_STOCK", "seller": "Walmart.com",
 "upc": "078742351865", "manufacturer": "Great Value",
 "category_path": "Food > Dairy & Eggs > Milk > Dairy Milk > Whole Milk",
 "specifications": [{"name": "Fat Content", "value": "Whole"}],
 "url": "https://www.walmart.com/ip/10450114", "query": "product:10450114", "scraped_at": "2026-09-18T15:45:00+00:00"}
```

Search records carry the same fields except `description`, `upc`, `manufacturer`, `specifications`, `category_path`.

### Pricing

Pay per product record. See the pricing tab.

### Notes

Public product data only. Some search tiles (variant groups, marketplace bundles) have no single price
and come back with `price: null`.

# Actor input Schema

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

Keywords to search on walmart.com; one listing per term (40 items per page, paginated).

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

Walmart item IDs (usItemId, e.g. 10450114) or product URLs. Returns the detail record with UPC and specifications.

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

Cap per search term. 0 = all pages.

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

Walmart serves US results to US IPs only and runs bot protection. Keep Apify proxy on; switch to RESIDENTIAL (country US) if you see 'blocked'.

## Actor input object example

```json
{
  "searchTerms": [
    "milk"
  ],
  "productIds": [],
  "maxItemsPerQuery": 80,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

All product records. Append ?format=csv for CSV.

## `datasetUrl` (type: `string`):

The default dataset.

# 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": [
        "milk"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("diopside/walmart-products").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": ["milk"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("diopside/walmart-products").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": [
    "milk"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US"
  }
}' |
apify call diopside/walmart-products --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,diopside/walmart-products"
        }
    }
}
```

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/1KzKeeGkmHdz6JRuJ/builds/HrBYaakRfg3oyEQaV/openapi.json
