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

Effortlessly extract detailed product information from Walmart.com using this powerful Apify Actor. Scrape product images, prices, availability, ratings, seller info, and more - simply by providing search terms or category URLs. Perfect for price monitoring, market analysis, and eCommerce insights.

- **URL**: https://apify.com/scraperapi/walmart-product-scraper.md
- **Developed by:** [ParseStream](https://apify.com/scraperapi) (community)
- **Categories:** E-commerce, Integrations, Automation
- **Stats:** 39 total users, 1 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$25.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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 - Apify Actor

This Apify Actor allows you to scrape product data from Walmart.com by either searching for products using a search term or by providing Walmart category or search URLs. It uses Apify Proxy with residential IPs to prevent blocking and to ensure reliable data extraction.

***

### Features

- Search Walmart products by keyword and retrieve detailed product data.
- Extract product information from Walmart category URLs.
- Uses Apify Proxy Residential IPs for enhanced reliability.
- Outputs data in a structured JSON format with key product details.
- Saves the results automatically to Apify Dataset.

***

### What You Can Do With This Actor

- Monitor prices and availability for products on Walmart.
- Collect product images, ratings, and seller info.
- Track product stock status and price changes over time.
- Aggregate product reviews and ratings (if available).
- Integrate Walmart product data into your eCommerce analytics or price comparison tools.

***

### Input

The input to this actor is a JSON object, which may include one or both of the following fields:

| Field      | Type       | Required | Description                                                            |
| ---------- | ---------- | -------- | ---------------------------------------------------------------------- |
| searchTerm | `string`   | Optional | A search query string to look for products on Walmart.                 |
| startUrls  | `string[]` | Optional | An array of specific Walmart product URLs to scrape product data from. |

**Note:** You must provide at least one of these fields.

#### Example Input

```json
{
    "searchTerm": "gaming pc",
    "startUrls": [
        "https://www.walmart.com/browse/electronics/pc-gaming/3944_1089430_7052607?povid=ETS_computingcp_hubspoke_pcgamingbrowse_WEB",
        "https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB"
    ]
}
```

Or just:

```json
{
    "searchTerm": "gaming pc"
}
```

Or just:

```json
{
    "startUrls": ["https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB"]
}
```

***

### Returned Data Structure

Each product is represented as a JSON object of the type `WalmartProduct` with the following properties:

| Property             | Type                | Description                                                                                                                                                                                                                                                                 |
| -------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                 | `string`            | Walmart product unique identifier                                                                                                                                                                                                                                           |
| `title`              | `string`            | Product title/name                                                                                                                                                                                                                                                          |
| `imageUrl`           | `string`            | URL to the product image                                                                                                                                                                                                                                                    |
| `availabilityStatus` | `string`            | Availability info: e.g. "In Stock", "Out of Stock", "Limited Stock", etc.                                                                                                                                                                                                   |
| `priceInfo`          | `object`            | Prices details including:<br>- `itemPrice`: product price<br>- `linePrice`: total if bundled<br>- `minPrice`: lowest price available<br>- `savings`: amount saved<br>- `subscriptionPrice`: discounted subscription price<br>- `linePriceDisplay`: display string for price |
| `rating`             | `string` (optional) | Average product rating (stars) if available                                                                                                                                                                                                                                 |
| `reviews`            | `string` (optional) | Number of product reviews if available                                                                                                                                                                                                                                      |
| `isOutOfStock`       | `boolean`           | `true` if product is out of stock, `false` otherwise                                                                                                                                                                                                                        |
| `catalogProductType` | `string`            | Product type/category                                                                                                                                                                                                                                                       |
| `sellerName`         | `string`            | Name of the seller / vendor                                                                                                                                                                                                                                                 |
| `isPreowned`         | `boolean`           | `true` if the product is preowned/refurbished                                                                                                                                                                                                                               |
| `priceNumber`        | `number`            | Numeric representation of the product price (useful for sorting/comparisons)                                                                                                                                                                                                |
| `flag`               | `string`            | Additional flags such as "Best Seller", "Rollback", etc.                                                                                                                                                                                                                    |
| `productUrl`         | `string`            | Direct URL to the product page on Walmart                                                                                                                                                                                                                                   |

***

### Example Output

```json
{
    "products": [
        {
            "id": "3RZ5BTN0KR6U",
            "title": "Apple AirPods Pro 2, Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature",
            "imageUrl": "https://i5.walmartimages.com/seo/Apple-AirPods-Pro-2-Wireless-Earbuds-Active-Noise-Cancellation-Hearing-Aid-Feature_4e23623d-94ed-4bac-851a-b1fde7eeb962.1523af65ffb7f2e2be28c8b3f0a008fa.jpeg",
            "availabilityStatus": "In stock",
            "priceInfo": {
                "itemPrice": "$239.00",
                "linePrice": "$169.00",
                "minPrice": 0,
                "savings": "SAVE $70.00",
                "subscriptionPrice": "",
                "linePriceDisplay": "Now $169.00"
            },
            "rating": "4.6",
            "reviews": "22174",
            "isOutOfStock": false,
            "catalogProductType": "Headphones",
            "sellerName": "Walmart.com",
            "isPreowned": false,
            "priceNumber": 169,
            "flag": "Popular pick",
            "productUrl": "https://www.walmart.com/ip/Apple-AirPods-Pro-2-Wireless-Earbuds-Active-Noise-Cancellation-Hearing-Aid-Feature/5689919121?classType=REGULAR&athbdg=L1200"
        }
        // ... more products
    ]
}
```

***

### Notes

- Results are saved to Apify default dataset, so you can also customize output or post-processing as needed.
- Ensure your input URLs are valid Walmart category or search pages for best results.

***

### Contact

Our team is ready to implement custom features or data extraction tasks tailored for your specific project requirements. Just reach out and let us know how we can help enhance your workflow!

***

## Summary

This actor provides a convenient, programmatic way to collect detailed Walmart product data either by search queries or by category product URLs, leveraging Apify infrastructure with proxy and dataset integration to enable scalable and reliable scraping workflows.

# Actor input Schema

## `searchTerm` (type: `string`):

The keyword or phrase to search for products

## `startUrls` (type: `array`):

Provide urls of Walmart category or search pages

## Actor input object example

```json
{
  "searchTerm": "airpods",
  "startUrls": [
    "https://www.walmart.com/browse/electronics/pc-gaming/3944_1089430_7052607?povid=ETS_computingcp_hubspoke_pcgamingbrowse_WEB",
    "https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB"
  ]
}
```

# 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 = {
    "searchTerm": "airpods",
    "startUrls": [
        "https://www.walmart.com/browse/electronics/pc-gaming/3944_1089430_7052607?povid=ETS_computingcp_hubspoke_pcgamingbrowse_WEB",
        "https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperapi/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 = {
    "searchTerm": "airpods",
    "startUrls": [
        "https://www.walmart.com/browse/electronics/pc-gaming/3944_1089430_7052607?povid=ETS_computingcp_hubspoke_pcgamingbrowse_WEB",
        "https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("scraperapi/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 '{
  "searchTerm": "airpods",
  "startUrls": [
    "https://www.walmart.com/browse/electronics/pc-gaming/3944_1089430_7052607?povid=ETS_computingcp_hubspoke_pcgamingbrowse_WEB",
    "https://www.walmart.com/browse/electronics/all-laptop-computers/3944_1089430_3951_132960?povid=ETS_computingcp_hubspoke_Laptopsbrowse_WEB"
  ]
}' |
apify call scraperapi/walmart-product-scraper --silent --output-dataset

```

## MCP server setup

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