# Walmart Search Scraper — Products By Keyword (`thenetaji/walmart-search-scraper`) Actor

Search Walmart for any keyword and export the products it returns, each with its item ID and product page link. Turn on product details to add the full product page to every row.

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

## Pricing

from $2.55 / 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 Search Scraper

The Actor searches Walmart for a keyword and saves the products it returns, each with its name, price, star rating and review count, the seller offering it, its stock state, and whether the row is a paid placement. Enabling `enrichProductDetails` adds the product page to every row, which is where the brand, model, UPC and return policy come from.

```json
{
  "keyword": "coffee maker",
  "maxItems": 100,
  "enrichProductDetails": false
}
```

### Accepted input

`keyword` is required and is the term the search is run for. `maxItems` bounds the number of products saved and defaults to `100`; a value of `0` disables the bound. `enrichProductDetails` defaults to `false`.

### Result fields

`item_id` is Walmart's item identifier and `url` is the product page link. `name`, `price`, `rating`, and `review_count` describe the product; `price_info` holds every price Walmart publishes for it, including any was-price, savings, unit price, and subscription pricing, with fields that do not apply returned as empty strings rather than omitted.

`seller_id` and `seller_name` identify who is selling it. Walmart's own listings carry a seller ID like any marketplace seller's and report `Walmart.com` as the name, so first-party and third-party offers are distinguishable. `availability` is the stock state as Walmart displays it, `fulfillment_title` is its shipping summary, `image_url` and `image_info` cover the imagery, and `category` is the Walmart category path.

`sponsored` records whether the row is a paid placement. Walmart mixes sponsored listings into organic results, and they are kept rather than dropped so a run can count or filter them; a search that silently discarded them would misrepresent what the results page contains.

`brand` is present but frequently `null` on search rows even where the product page records one. `product` carries the complete listing record for anything not broken out into its own field.

With `enrichProductDetails` enabled each row additionally carries `brand` filled in, plus `model`, `upc`, `currency`, `return_policy`, `variants`, and `product_detail`.

```json
{
  "item_id": "5020183504",
  "url": "https://www.walmart.com/ip/Beautiful-Slim-Espresso-Maker/5020183504",
  "name": "Beautiful Slim Espresso Machine with 20-Bar Pressure, Black Sesame",
  "price": 139,
  "rating": 3.9,
  "review_count": 2802,
  "seller_name": "Walmart.com",
  "availability": "In stock",
  "sponsored": true,
  "brand": null,
  "price_info": { "linePrice": "$139.00", "wasPrice": "", "savingsAmt": 0 }
}
```

This is a trimmed, live-verified row. Note the `null` brand alongside a fully populated name and price; that combination is normal on this surface rather than a parsing failure.

### Why the product link matters more than the item ID

`url` is not a convenience field. It is the only accepted input to a Walmart product page lookup, both for the [Walmart Product Scraper](https://apify.com/thenetaji/walmart-product-scraper) and for this Actor's own enrichment step. A link rebuilt from `item_id` alone is refused: Walmart's anti-bot gate treats the shortened `/ip/<id>` shape differently from the real `/ip/<name>/<id>` one, so the assembled link fails where the genuine link succeeds.

Walmart publishes the link as a relative path. It is returned here as a full link, since a relative path is not clickable in an export and the product lookup accepts either form.

### How far a search goes, and where it stops

The search is advanced by asking for a total number of products rather than by walking pages, and each run requests exactly the shortfall between what has been saved and `maxItems`. Walmart serves roughly 54 products per underlying page, so a higher figure costs proportionally more upstream work behind a single call. A single request returns at most 300 products.

Consecutive underlying pages overlap by a handful of promoted listings, so the run keeps every `item_id` it has already saved and yields each one only once. It stops when `maxItems` is reached, when Walmart reports no further results, or when two consecutive requests return nothing that has not already been saved. That last condition is what ends a run against a keyword whose results have been exhausted but which still reports more available.

### What enrichment costs, and what it adds

Enrichment is one additional request per product and is charged per product as a separate event, billed only after the product page has been read successfully. A product whose page cannot be read keeps its search row unchanged and is not charged.

Where the page and the card disagree, the page wins on the fields it actually has a value for. Where the page has nothing, the card's value survives — which matters for `price`, because the card quotes it at the top level of the listing while the page quotes it under its own price info, and a page that omits it must not blank out a figure already collected.

Enriching a run of 1,000 products means 1,000 extra requests, which is why the setting is off by default.

### Related Actors

For a known list of product links rather than a keyword search, the [Walmart Product Scraper](https://apify.com/thenetaji/walmart-product-scraper) reads them directly and skips the search entirely. For the same job on other marketplaces, the [eBay Category Products Scraper](https://apify.com/thenetaji/ebay-category-products-scraper) browses a whole eBay category, the [Etsy Search Scraper](https://apify.com/thenetaji/etsy-search-scraper) searches Etsy by keyword, and the [eBay Keyword Tool](https://apify.com/thenetaji/ebay-keyword-suggestions-scraper) expands seed terms into the phrases shoppers search.

# Actor input Schema

## `keyword` (type: `string`):

Keyword to search Walmart products for.

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

Maximum number of products to save. Set 0 for no limit.

## `enrichProductDetails` (type: `boolean`):

Add the full product page to every search row — model, UPC, every variant, the seller's storefront, and the return policy. This makes one extra request per product.

## Actor input object example

```json
{
  "keyword": "coffee maker",
  "maxItems": 20,
  "enrichProductDetails": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "keyword": "coffee maker",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/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 = {
    "keyword": "coffee maker",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/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 '{
  "keyword": "coffee maker",
  "maxItems": 20
}' |
apify call thenetaji/walmart-search-scraper --silent --output-dataset

```

## MCP server setup

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