# Walmart Review Scraper (`kawsar/walmart-review-scraper`) Actor

Walmart Review Scraper that pulls product reviews from walmart.com, so brand teams and researchers can monitor customer sentiment without copying reviews by hand.

- **URL**: https://apify.com/kawsar/walmart-review-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 2 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Review Scraper: Collect Product Reviews from Walmart

Walmart Review Scraper pulls customer reviews from walmart.com product pages. Give it a product URL or item ID and it returns review data you can analyze, export, or feed into other pipelines. It pages through results automatically, so you get everything available, not just the first screen.

### What data does this actor extract?

Each review record includes:

- Review text and headline
- Star rating (1 to 5)
- Reviewer display name and submission date
- Verified purchase status
- Helpful vote count
- Product name, item ID, and overall average rating
- Total review count for the product

### Use cases

- **Brand monitoring**: track what buyers say about your products or competitors on Walmart without checking pages manually
- **Sentiment analysis**: feed review text into NLP pipelines to measure satisfaction trends over time
- **Competitor research**: collect reviews for rival products to find gaps your own product can fill
- **Dataset building**: create training data for e-commerce models using real customer language from Walmart
- **Rating analysis**: compare star distributions across product variants to see which ones buyers actually prefer

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `productUrl` | string | — | Walmart product URL or numeric item ID |
| `productUrls` | array | — | List of Walmart product URLs or item IDs |
| `starRating` | string | `all` | Filter to a specific star rating |
| `sort` | string | `relevancy` | Order in which reviews are returned |
| `maxItems` | integer | 100 | Max reviews to collect per product (up to 1000) |
| `requestTimeoutSecs` | integer | 30 | Per-request timeout in seconds |

#### Example input

```json
{
    "productUrl": "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441",
    "starRating": "5",
    "sort": "submission_desc",
    "maxItems": 200
}
````

#### Star rating filter

| Value | Meaning |
|-------|---------|
| `all` | All star ratings (default) |
| `5` | 5-star reviews only |
| `4` | 4-star reviews only |
| `3` | 3-star reviews only |
| `2` | 2-star reviews only |
| `1` | 1-star reviews only |

#### Sort options

| Value | Meaning |
|-------|---------|
| `relevancy` | Most relevant (default) |
| `submission_desc` | Newest reviews first |
| `submission_asc` | Oldest reviews first |
| `helpfulness` | Most helpful first |
| `rating_desc` | Highest rated first |
| `rating_asc` | Lowest rated first |

### Output

Results are stored in the Apify dataset. Each entry looks like this:

```json
{
    "reviewId": "89f24a1c-1234-5678-abcd-ef0123456789",
    "reviewTitle": "Great product, fast delivery",
    "reviewText": "I ordered this last week and it arrived two days early. Works exactly as described and the sound quality is solid.",
    "rating": 5,
    "reviewerName": "JohnDoe123",
    "reviewDate": "2024-11-15T00:00:00.000Z",
    "helpfulCount": 12,
    "isVerifiedPurchase": true,
    "productId": "604342441",
    "productName": "Apple AirPods with Charging Case (2nd Generation)",
    "productUrl": "https://www.walmart.com/reviews/product/604342441",
    "overallRating": 4.5,
    "totalReviewCount": 1247,
    "scrapedAt": "2024-12-01T09:32:11.423Z",
    "error": null
}
```

| Field | Type | Description |
|-------|------|-------------|
| `reviewId` | string | Unique review identifier |
| `reviewTitle` | string | Review headline |
| `reviewText` | string | Full review body |
| `rating` | number | Star rating (1 to 5) |
| `reviewerName` | string | Display name of the reviewer |
| `reviewDate` | string | Date review was submitted |
| `helpfulCount` | integer | Number of helpful votes |
| `isVerifiedPurchase` | boolean | True if reviewer made a verified purchase |
| `productId` | string | Walmart numeric item ID |
| `productName` | string | Product display name |
| `productUrl` | string | URL to the Walmart review page |
| `overallRating` | number | Product average star rating |
| `totalReviewCount` | integer | Total reviews on the product |
| `scrapedAt` | string | ISO 8601 timestamp of when the record was collected |
| `error` | string | Error message if extraction failed, null otherwise |

### How it works

1. Parse the Walmart item ID from the URL you provide (or use the numeric ID directly)
2. Fetch product review pages through built-in bypass infrastructure
3. Extract review data from the embedded page JSON
4. Paginate until your review limit is reached or all reviews are collected
5. Push each review as a structured record to the Apify dataset

### Integrations

Connect Walmart Review Scraper with other apps using [Apify integrations](https://apify.com/integrations). Export results to Google Sheets, trigger workflows in Make or Zapier, or push data to Slack. You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to kick off downstream processes as soon as scraping finishes.

### FAQ

**What Walmart URLs does this accept?**
Any walmart.com product URL works, including `/ip/` product pages and `/reviews/product/` review pages. You can also pass a bare numeric item ID.

**How many reviews can I collect per run?**
Up to 1000 reviews per run. Set `maxItems` to control the exact count.

**What does "verified purchase" mean?**
Walmart marks reviews from shoppers who bought the product through walmart.com. The `isVerifiedPurchase` field reflects that badge.

**Can I get the newest reviews first?**
Yes. Set `sort` to `submission_desc` and the actor returns the most recent reviews first. Combine it with `starRating` to get, say, the newest 1-star reviews.

**What if a product has no reviews?**
The actor finishes cleanly and returns an empty dataset. The run log will note that no reviews were found on the first page.

# Actor input Schema

## `productUrl` (type: `string`):

Single Walmart product URL or numeric item ID. Use this for one product. For multiple products, use the field below.

## `productUrls` (type: `array`):

List of Walmart product URLs or numeric item IDs — one per line. Use this to scrape reviews for several products in one run. Can be combined with the single URL field above.

## `starRating` (type: `string`):

Filter reviews by star rating. Select a specific star rating to collect only those reviews, or choose All Reviews to collect everything.

## `sort` (type: `string`):

Order in which reviews are returned.

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

Maximum number of reviews to collect per run.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds. Increase if you see timeout errors on slow connections.

## Actor input object example

```json
{
  "productUrl": "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441",
  "productUrls": [
    "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441",
    "https://www.walmart.com/ip/Apple-iPhone-15-Unlocked/5042092040",
    "762298909"
  ],
  "starRating": "all",
  "sort": "relevancy",
  "maxItems": 100,
  "requestTimeoutSecs": 30
}
```

# 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 = {
    "productUrl": "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441"
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/walmart-review-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 = { "productUrl": "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441" }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/walmart-review-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "productUrl": "https://www.walmart.com/ip/Apple-AirPods-with-Charging-Case-2nd-Generation/604342441"
}' |
apify call kawsar/walmart-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=kawsar/walmart-review-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Walmart Review Scraper",
        "description": "Walmart Review Scraper that pulls product reviews from walmart.com, so brand teams and researchers can monitor customer sentiment without copying reviews by hand.",
        "version": "0.0",
        "x-build-id": "tdq9r4GTMyFBx1Vk4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~walmart-review-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-walmart-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/kawsar~walmart-review-scraper/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-walmart-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/kawsar~walmart-review-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-walmart-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "productUrl": {
                        "title": "Product URL or item ID",
                        "type": "string",
                        "description": "Single Walmart product URL or numeric item ID. Use this for one product. For multiple products, use the field below."
                    },
                    "productUrls": {
                        "title": "Product URLs or item IDs (multiple)",
                        "type": "array",
                        "description": "List of Walmart product URLs or numeric item IDs — one per line. Use this to scrape reviews for several products in one run. Can be combined with the single URL field above.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "starRating": {
                        "title": "Filter by star rating",
                        "enum": [
                            "all",
                            "5",
                            "4",
                            "3",
                            "2",
                            "1"
                        ],
                        "type": "string",
                        "description": "Filter reviews by star rating. Select a specific star rating to collect only those reviews, or choose All Reviews to collect everything.",
                        "default": "all"
                    },
                    "sort": {
                        "title": "Sort order",
                        "enum": [
                            "relevancy",
                            "submission_desc",
                            "submission_asc",
                            "helpfulness",
                            "rating_desc",
                            "rating_asc"
                        ],
                        "type": "string",
                        "description": "Order in which reviews are returned.",
                        "default": "relevancy"
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of reviews to collect per run.",
                        "default": 100
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Per-request timeout in seconds. Increase if you see timeout errors on slow connections.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
