# Walmart Product Scraper (`usestring/walmart-products`) Actor

Reads Walmart.com product pages by item ID or /ip/ URL and returns one row per item: numeric price, was-price, brand, star rating, review count, availability status, the marketplace seller behind the buy box and the main image. Values come from Walmart's own item record, not display strings.

- **URL**: https://apify.com/usestring/walmart-products.md
- **Developed by:** [String](https://apify.com/usestring) (community)
- **Categories:** E-commerce, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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?

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 — price, stock, ratings and seller by item ID

This Actor scrapes Walmart.com product pages by item ID or product URL and returns one row per item:
a **numeric** `price`, plus `wasPrice`, `rating`, `reviewCount`, `availability`, `sellerName`,
`brand` and the main image. Every value is read out of the item record Walmart's own storefront
renders from, so prices, ratings and stock arrive as typed values rather than display strings.

No Walmart account, API key or cookies are used — the Walmart Product Scraper reads what a
logged-out visitor sees on the product page. One row per item, about 3.3 seconds per product page at
the measured median.

### What it returns

| Field | Type | Notes |
| --- | --- | --- |
| `itemId` | string | Walmart's US item ID — stable, use it to join or de-duplicate |
| `title` | string | |
| `brand` | string | |
| `price` | number | `2.36`, not `"$2.36"` |
| `priceText` | string | The formatted price as shown, e.g. `$2.36` |
| `wasPrice` | number | The pre-markdown price, and only while it is genuinely higher than `price` |
| `currency` | string | `USD` |
| `rating` | number | Average stars out of 5 |
| `reviewCount` | number | Exact review count |
| `availability` | string | Walmart's own status, e.g. `IN_STOCK`, `OUT_OF_STOCK`; `UNKNOWN` if the record states none |
| `sellerName` | string | The storefront the buyer sees — `Walmart.com` for Walmart's own items, otherwise the marketplace seller |
| `imageUrl` | string | The main product image |
| `productUrl` | string | Walmart's canonical URL for the item |
| `sourceUrl`, `collectedAt` | string | Provenance for every row |

A `wasPrice` stays on Walmart's record after a promotion ends, so this Actor reports it only when it
actually exceeds what the item sells for today. A stale one is returned as `null` rather than as a
discount that no longer exists.

### Input

```json
{
  "products": ["10450114", "https://www.walmart.com/ip/10450114"],
  "maxItems": 1000
}
```

| Field | Description |
| --- | --- |
| `products` | Walmart item IDs or full walmart.com product URLs. Required, 1–300. |
| `maxItems` | Cap on dataset items. Default 1000. Free plans stop at 250 requests and 250 results — see below. |
| `concurrency` | Items fetched in parallel. Default 2, maximum 5. |

**A Walmart item is addressed by its numeric item ID**, which is the last path segment of a `/ip/`
URL — `https://www.walmart.com/ip/Great-Value-Whole-Milk-Gallon/10450114` is item `10450114`. The
bare ID and the full URL resolve to the same page and are fetched once, so a mixed list is never
billed twice for one item.

A URL on another host, or a walmart.com URL that is not an item page — a `/browse/` shelf, a seller
storefront — is rejected before it costs a fetch and is reported under `failures`.

### How it reads the page

Walmart server-renders the whole item record into its Next.js page data, and the Walmart Product
Scraper reads the row out of that object rather than out of the rendered markup. That record carries
prices, ratings and stock as typed values, which is why `price`, `wasPrice`, `rating` and
`reviewCount` come back as numbers with no display strings to clean up.

### Use cases

- Price and rollback monitoring across a catalogue of Walmart items
- Stock checks on items you resell or source
- Marketplace-seller intelligence — which third-party seller holds the buy box
- Enriching a product feed with brand, rating and review count
- Feeding a repricing or competitive-pricing dashboard on a schedule

### Frequently asked questions

**Do I need a Walmart account, API key or cookies to scrape Walmart products?** No. The Walmart
Product Scraper reads only the public product page a logged-out visitor sees.

**What is a Walmart item ID?** The numeric identifier at the end of a Walmart product URL, for
example `10450114` in `walmart.com/ip/Great-Value-Whole-Milk-Gallon/10450114`. Pass it bare or pass
the whole URL — both work.

**Can this Actor search Walmart or crawl a category?** No. You supply the items; this Actor does not
do discovery, so it never spends fetches on pages you did not ask for.

**Does it return third-party marketplace sellers?** Yes. `sellerName` is the storefront name shown on
the item — `Walmart.com` for Walmart's own inventory, or the marketplace seller's name.

**How many rows does one item produce?** One. The Walmart Product Scraper fetches one product page
per item and emits one row from it.

**What happens to an item ID that no longer exists?** That target is recorded under `failures` in the
run's `SUMMARY` key, with Walmart's own error reason where it gives one, and the rest of the batch
still returns.

### Limitations

Product pages on walmart.com (US) only. This Actor does not return review text, variant matrices,
specification tables, per-store shelf inventory, or the full offer list behind the buy box, and it
does not search or crawl categories. Values reflect what Walmart showed at collection time, stamped
in `collectedAt`.

### Free plan limit

Runs started from an Apify **free plan** stop at **250 requests and 250 results**, and the run
reports that it reached the limit. Any paid plan runs the full input and `maxItems` you set.

The limit exists because this Actor fetches through our own infrastructure, which Apify does not
cover for free-plan runs. It binds on requests as well as results so that a large input list cannot
spend those fetches for rows the run will not return.

# Actor input Schema

## `products` (type: `array`):

Walmart item IDs or full product URLs.

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

Global cap on dataset items. Runs started from an Apify free plan stop at 250 requests and 250 results; any paid plan runs the full amount.

## `concurrency` (type: `integer`):

Targets fetched in parallel.

## Actor input object example

```json
{
  "products": [
    "10450114"
  ],
  "maxItems": 1000,
  "concurrency": 2
}
```

# Actor output Schema

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

Collect Walmart product detail by item ID or URL - price, was-price, rating, availability and seller.

## `summary` (type: `string`):

Item count, failure count and every target that failed, with its error.

# 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 = {
    "products": [
        "10450114"
    ]
};

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

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

```

## MCP server setup

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