# Walmart Mexico Scraper: Prices, Stock, Sellers (`reventadata/walmart-mexico-scraper`) Actor

Scrape walmart.com.mx by keyword or category: price in MXN, was-price and discount, stock status, Walmart or marketplace seller, rating and categories. Price band, rating and stock filters, sort by price. Mexican residential proxy built in.

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

## Pricing

from $2.90 / 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.

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 Mexico Scraper: Prices, Stock and Sellers by Keyword or Category

> **Unofficial.** This Actor is not affiliated with, authorised by, endorsed by, or in any way
> officially connected to Walmart or Walmart de Mexico. "Walmart" is a trademark of its
> respective owner and is used here only to describe what this tool reads. It reads the same
> public pages a browser does.

Give it keywords or category pages from walmart.com.mx and get one clean row per product: price in pesos,
was-price and discount, stock status, seller (Walmart or a marketplace seller), rating, review count and category path.

### What does it do?

For each keyword it walks the search result pages of walmart.com.mx, reads the product data the page embeds, and saves one
row per product. For each category page (`https://www.walmart.com.mx/browse/...`) it does the same. A result page holds 40 to 54
products. The site ends a keyword at its own last page (`televisor`: 23 pages, 924 products on 2026-10-21; `laptop`: 25) and a category at its own last page.

A keyword the site treats as a category (for example `laptop`) is followed to that category page.

It reads search results with the `z=1` parameter and `/browse/` category pages, the two page types walmart.com.mx's robots.txt leaves open
(`Disallow: /search*` with `Allow: /search?*z=1`). It does not read product pages (`/ip/`).

### Why use it?

- **Prices as shoppers see them.** `price` is the selling price in MXN shown on the result page; `wasPrice`, `savingsAmount` and `discountPercent` appear when the site shows a was-price.
- **Walmart or marketplace.** `sellerType` is `WALMART` or `MARKETPLACE`, and `seller` names the seller.
- **Stock status.** `availability` and `inStock` per product; out-of-stock products keep their price on the site.
- **Filters that run before you pay.** Price band (sent to the site), minimum rating, discounted only, in stock only, seller type, words the title or category must or must not contain.
- **Cheapest or dearest first.** Sort by price either way and a small `maxItems` returns the top of the list.
- **Retries built in.** The site answers some requests with a 21-byte stub instead of a page (4 of 27 in the 1,000-row test run, 12 of 37 in earlier probes); the Actor detects it and retries on a fresh residential exit.

### How to use it

1. Put keywords in `searchQueries` and/or category URLs in `startUrls`.
2. Set `maxItems` (rows to save) and, if you want, a sort order and filters.
3. Run the Actor and download the dataset as JSON, CSV or Excel.

#### Input

| Field | Type | Description |
|---|---|---|
| `searchQueries` | array | Keywords to search, for example `televisor`. |
| `startUrls` | array | Category pages `https://www.walmart.com.mx/browse/...`. Search and product URLs are refused. |
| `maxItems` | integer | Total products to save, counted after the filters. Default 100. |
| `maxPages` | integer | Result pages per keyword or category, 1 to 25. Default 5. The site's own last page ends the walk earlier. |
| `sort` | string | `BEST_MATCH`, `PRICE_ASC` or `PRICE_DESC`. |
| `minPrice`, `maxPrice` | number | Price band in MXN, sent to the site and checked again on each row. |
| `minRating` | number | Minimum average rating, 0 to 5. Unrated products are dropped when set. |
| `onlyDiscounted` | boolean | Keep only products with a was-price above the price. |
| `onlyInStock` | boolean | Drop products the site marks out of stock. |
| `seller` | string | `ANY`, `WALMART` or `MARKETPLACE`. |
| `includeSponsored` | boolean | Sponsored slots (7 to 10 per page, repeated on every page) are dropped by default. |
| `includeKeywords`, `excludeKeywords` | array | Words the title, brand or category must / must not contain, ignoring case and accents. |
| `proxyConfiguration` | object | Apify residential proxy in Mexico (default, and the transport measured to work). |

#### Sample input

```json
{
    "searchQueries": ["televisor"],
    "maxItems": 20,
    "maxPages": 1,
    "sort": "PRICE_ASC"
}
```

#### Output

One row per product:

| Field | Type | Description |
|---|---|---|
| `id` | string | Walmart Mexico item id (14 digits, leading zeros kept). |
| `title` | string | Product title. |
| `url` | string | Product page URL. |
| `brand` | string / null | Brand. The site gives it on sponsored slots only; organic results carry null. |
| `price` | number | Selling price in MXN as shown on the result page. |
| `currency` | string | Always `MXN`. |
| `wasPrice`, `savingsAmount` | number / null | Was-price and the saving the site states, when a was-price is shown. |
| `discountPercent` | integer / null | Computed from `price` and `wasPrice`. |
| `installments` | string / null | Interest-free instalment text on the tile. |
| `availability`, `inStock` | string / boolean | Site stock status (`IN_STOCK` or `OUT_OF_STOCK` in testing; any other value the site sends is passed through) and whether it is `IN_STOCK`. |
| `seller`, `sellerType` | string / string | Seller name as shown (null when none) and `WALMART` or `MARKETPLACE`. |
| `rating`, `reviewCount` | number / integer | Average rating out of 5 and number of ratings; both null when unrated. |
| `department` | string / null | Department name when shown. |
| `categories` | array | Category path names. |
| `image` | string | Main image URL. |
| `badges` | array | Promotion labels on the tile, for example `Rebaja`. |
| `variantCount` | integer / null | Variants offered, null when none. |
| `isSponsored` | boolean | True for sponsored placements. |
| `sourceQuery`, `sourceUrl`, `page` | string / string / integer | Keyword (null for a category URL), result page URL and page number. |
| `scrapedAt` | string | ISO 8601 timestamp. |

#### Sample output

Taken from a real row (2026-10-21), with `scrapedAt` set to a fixed time:

```json
{
    "id": "00084046404537",
    "title": "TV TCL Pantalla 55 Pulgadas QD-Mini Led Smart Google TV 55QM5K",
    "url": "https://www.walmart.com.mx/ip/TV-TCL-Pantalla-55-Pulgadas-QD-Mini-Led-Smart-Google-TV-55QM5K/00084046404537",
    "brand": null,
    "price": 6990,
    "currency": "MXN",
    "wasPrice": 12599,
    "savingsAmount": 5609,
    "discountPercent": 45,
    "installments": "Hasta 24 meses sin intereses",
    "availability": "IN_STOCK",
    "inStock": true,
    "seller": "Walmart",
    "sellerType": "WALMART",
    "rating": 4.7,
    "reviewCount": 388,
    "department": "Electrónica",
    "categories": ["TV y Video", "Pantallas", "55 a 64 pulgadas"],
    "image": "https://i5-mx.walmartimages.com/asr/f4278e57-3e3a-45ac-b6fb-338393d99e3e.abe85adac76fac42c5ff4ac18ecfdcfa.jpeg",
    "badges": ["Más vendido"],
    "variantCount": null,
    "isSponsored": false,
    "sourceQuery": "televisor",
    "sourceUrl": "https://www.walmart.com.mx/search?q=televisor&z=1&page=1",
    "page": 1,
    "scrapedAt": "2026-10-21T12:00:00+00:00"
}
```

### Limits

- Products shown on the result page without a price (some marketplace offers) are skipped.
- A keyword ends at the site's own last page. Results repeat across pages, so the full `televisor` walk returned 924 unique products (2026-10-21, 23 pages, sponsored dropped; the Actor now also skips offers with no price, 7 of them in that walk).
- Price and stock are what the site showed to an anonymous visitor with no store chosen; they can differ from what a signed-in shopper near a given store sees.
- The site answers some requests with a stub page (between one in seven and one in three in testing); the Actor retries them on the run clock. A run that cannot get any page fails rather than returning an empty dataset.
- Only public pages are read, with no login.

### How much does it cost to scrape Walmart Mexico?

Pay-per-event: **$0.0029 per result** saved to the dataset (**$2.90 per 1,000 results**), plus
**$0.00005** charged once when the run starts. No subscription. Price, rating, discount, stock,
seller and keyword filters run before a row is saved, so products they drop are not charged.

### Legal

This Actor reads only publicly accessible pages and returns the public data they show. It sends no login.
You are responsible for using the data in line with the site's terms and applicable law.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on walmart.com.mx, for example televisor or leche deslactosada. Each keyword is walked page by page. A keyword the site treats as a category (for example laptop) is followed to that category page. Give keywords, category pages, or both.

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

walmart.com.mx category pages copied from the site, for example https://www.walmart.com.mx/browse/tv-y-video/pantallas/smart-tv/264711_264712_264721. Search result pages and product pages are not accepted here; put keywords in Search keywords.

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

Total number of products to save across all keywords and category pages, counted after the filters. A result page holds 40 to 54 products.

## `maxPages` (type: `integer`):

Result pages to walk for each keyword or category page. The site ends a keyword or category at its own last page (23 pages for televisor, 11 for Smart TV on 2026-10-21), whichever comes first.

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

Order of the products on the site. Price orders let a small maxItems return the cheapest or dearest products first.

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

Keep only products priced at or above this amount in Mexican pesos. Sent to the site and checked again on each row. Leave empty for no minimum.

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

Keep only products priced at or below this amount in Mexican pesos. Sent to the site and checked again on each row. Leave empty for no maximum.

## `minRating` (type: `number`):

Keep only products with an average customer rating at or above this value (0 to 5). Unrated products are dropped when this is set.

## `onlyDiscounted` (type: `boolean`):

Keep only products shown with a was-price above the selling price.

## `onlyInStock` (type: `boolean`):

Drop products the site marks out of stock. Out-of-stock products keep their price on the site and are saved by default, with inStock false.

## `seller` (type: `string`):

Keep products sold by Walmart itself, products sold by marketplace sellers, or both.

## `includeSponsored` (type: `boolean`):

Sponsored slots are advertisements the site repeats on every page of a result (7 to 10 per page). They are dropped unless this is on; each row says whether it was sponsored.

## `includeKeywords` (type: `array`):

Keep only products whose title, brand or category contains every one of these words, ignoring case and accents.

## `excludeKeywords` (type: `array`):

Drop products whose title, brand or category contains any of these words, ignoring case and accents.

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

Apify residential proxy in Mexico is required: no proxy and datacenter proxies got the 'blocked - redirecting' stub from walmart.com.mx on the page measured. Some residential requests (one in seven to one in three in testing) also get the stub; the Actor retries those on a fresh exit.

## Actor input object example

```json
{
  "searchQueries": [
    "televisor"
  ],
  "maxItems": 20,
  "maxPages": 1,
  "sort": "BEST_MATCH",
  "onlyDiscounted": false,
  "onlyInStock": false,
  "seller": "ANY",
  "includeSponsored": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "MX"
  }
}
```

# Actor output Schema

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

Walmart Mexico products from search and category pages.

# 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 = {
    "searchQueries": [
        "televisor"
    ],
    "maxItems": 20,
    "maxPages": 1,
    "sort": "BEST_MATCH",
    "seller": "ANY",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "MX"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("reventadata/walmart-mexico-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 = {
    "searchQueries": ["televisor"],
    "maxItems": 20,
    "maxPages": 1,
    "sort": "BEST_MATCH",
    "seller": "ANY",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "MX",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("reventadata/walmart-mexico-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 '{
  "searchQueries": [
    "televisor"
  ],
  "maxItems": 20,
  "maxPages": 1,
  "sort": "BEST_MATCH",
  "seller": "ANY",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "MX"
  }
}' |
apify call reventadata/walmart-mexico-scraper --silent --output-dataset

```

## MCP server setup

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