# Walmart Search & Product Scraper (UPC, Price, Rating) (`jaybird/walmart-search-scraper`) Actor

Scrape Walmart.com search, category and product pages: price, was-price, rating, reviews, seller, stock, plus UPC/GTIN, brand and images. Pay per item from $2.50 per 1,000.

- **URL**: https://apify.com/jaybird/walmart-search-scraper.md
- **Developed by:** [Jaybird Technologies](https://apify.com/jaybird) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Search & Product Scraper (UPC, price, rating)

Scrape public Walmart.com search results, category pages and product pages into clean JSON. Get price, was-price, rating, review count, seller, availability and badges for every item. Turn on **Add UPC/GTIN and product details** (or pass product IDs / `/ip/` URLs) to also get the UPC, a 14-digit GTIN, brand, model, description and images, so you can match Walmart items to Amazon and other retailers.

### What you can do with it

- Price and rollback monitoring for any keyword or category
- Competitor and assortment research by brand, seller or category path
- Match Walmart items to other marketplaces by UPC/GTIN
- Feed a catalog, repricer or deal finder with fresh Walmart data

### Input

| Field | Meaning |
|---|---|
| `queries` | Search terms, one Walmart search each |
| `startUrls` | Walmart search (`/search?q=`), category (`/browse/...`) or product (`/ip/...`) URLs |
| `productIds` | Walmart item IDs; each returns a full product record with UPC |
| `maxItems` | Stop after this many saved items (default 100) |
| `maxPagesPerQuery` | Result pages per query or URL, about 40-70 items per page (default 3) |
| `includeDetails` | Add UPC/GTIN, brand, model, description, images to search results |
| `sort` | `best_match`, `price_low`, `price_high`, `best_seller` |
| `minPrice` / `maxPrice` | Skip items with a known price outside this range (USD) |
| `proxyConfiguration` | Residential US proxy is the default and is required |

Example:

```json
{ "queries": ["air fryer"], "maxPagesPerQuery": 2, "maxItems": 100, "includeDetails": true }
```

### Output

Each item has: `itemId`, `url`, `title`, `brand`, `price`, `wasPrice`, `savings`, `currency`, `rating`, `reviewCount`, `availability`, `seller`, `fulfillmentType`, `badge` (Rollback, Clearance, Reduced price...), `isSponsored`, `image`, `category`, `productType`, `query`, `page`, `position`, `scrapedAt`. With details: `upc`, `gtin`, `model`, `description`, `images`.

Search results alone do not include UPC, model, description or brand for most items (brand is filled in only with details).

### Pricing (pay per event)

- **Search result: $0.0025 per item** saved from search or category pages.
- **Result with details: $0.006 per item** when the item includes UPC/GTIN and product details (an extra product page is fetched per item). If a product page cannot be fetched, the item is saved and billed as a plain search result.

You are only charged for items saved to the dataset. Set a max charge on the run to cap spend.

### How reliable is it?

Walmart blocks many automated requests. The Actor retries every blocked request automatically through a fresh residential IP (up to 12 attempts per page) and only charges for items it saves. In our tests, 100% of search and product pages were eventually fetched, but only about 75-90% of individual attempts get through, so runs take a few seconds longer per page. If every attempt on a run is blocked, the run fails with a clear message and nothing is charged. UPC was present on 47 of 50 detailed items in our test.

### Limits

- Public data only, no login. Prices are the default online price for the proxy country (US); store-specific pickup prices and inventory are not included.
- Walmart limits how deep a search can paginate (14 pages for a typical search in testing).
- Customer reviews, Q\&A and variants are not included in this version.
- Respect Walmart's terms and applicable law when using the data.

# Actor input Schema

## `queries` (type: `array`):

Product search terms, one Walmart search per term.

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

walmart.com search (/search?q=...), browse/category (/browse/..., /cp/...) or product (/ip/...) URLs. Product URLs return full product details.

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

Walmart item IDs (the number at the end of an /ip/ URL). Each one returns a full product record with UPC/GTIN.

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

Stop after this many items have been saved (across all queries, URLs and IDs).

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

Result pages to open per query or list URL (about 40-70 items per page). Walmart limits how many pages a search exposes; pagination stops automatically.

## `includeDetails` (type: `boolean`):

Opens each product page to add UPC, GTIN, model, description and images. Items that get details are billed at the higher 'result with details' price. Product IDs and /ip/ URLs always return details.

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

Optional sort for search queries.

## `minPrice` (type: `number`):

Skip items with a known price below this.

## `maxPrice` (type: `number`):

Skip items with a known price above this.

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

Residential proxies in the US are required; Walmart blocks datacenter IPs. Blocked requests are retried automatically with a fresh IP.

## Actor input object example

```json
{
  "queries": [
    "wireless earbuds",
    "air fryer"
  ],
  "startUrls": [
    {
      "url": "https://www.walmart.com/search?q=lego+set"
    }
  ],
  "productIds": [
    "18910103324"
  ],
  "maxItems": 100,
  "maxPagesPerQuery": 3,
  "includeDetails": false,
  "sort": "best_match",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "queries": [
        "wireless earbuds"
    ],
    "maxItems": 100,
    "maxPagesPerQuery": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaybird/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 = {
    "queries": ["wireless earbuds"],
    "maxItems": 100,
    "maxPagesPerQuery": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("jaybird/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 '{
  "queries": [
    "wireless earbuds"
  ],
  "maxItems": 100,
  "maxPagesPerQuery": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call jaybird/walmart-search-scraper --silent --output-dataset

```

## MCP server setup

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