Discover/Walmart API
live

Walmart APIwalmart.com.mx

Access Walmart Mexico product data via API. Search products, get pricing and availability, browse categories, and fetch similar items from walmart.com.mx.

Endpoints
4
Updated
2mo ago

What is the Walmart API?

The Walmart Mexico API exposes 4 endpoints that cover product search, full product details, category listings, and similar-product recommendations from walmart.com.mx. The get_product_details endpoint returns over 8 distinct fields per product — including current price, savings data, fulfillment options, and stock status — identified by Walmart Mexico product ID.

Try it
Page number for pagination
Sort order: best_match, price_low, price_high
Facet filter string for additional filtering
Search keyword
Category ID filter to narrow search to a specific department
Maximum price filter value
Minimum price filter value
api.parse.bot/scraper/ea0bc2df-b753-4a65-9458-80d8167fb00d/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/ea0bc2df-b753-4a65-9458-80d8167fb00d/search_products?page=1&limit=44&query=televisor' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace walmart-com-mx-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
Walmart Mexico API Client - Parse Bot Integration
Get your API key from: https://parse.bot/settings
"""

import os
import requests
from typing import Optional, Any, Dict, List


class ParseClient:
    """Client for interacting with the Walmart Mexico API via Parse Bot."""
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the Parse API client.
        
        Args:
            api_key: API key for Parse Bot. If not provided, reads from PARSE_API_KEY env var.
        """
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "ea0bc2df-b753-4a65-9458-80d8167fb00d"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")
        
        if not self.api_key:
            raise ValueError("API key must be provided or set in PARSE_API_KEY environment variable")
    
    def _call(self, endpoint: str, method: str = "POST", **params) -> Dict[str, Any]:
        """Make a request to the Parse API.
        
        Args:
            endpoint: The endpoint name (e.g., 'search_products')
            method: HTTP method (GET or POST)
            **params: Parameters to pass to the endpoint
            
        Returns:
            API response as a dictionary
        """
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {
            "X-API-Key": self.api_key,
            "Content-Type": "application/json"
        }
        
        try:
            if method.upper() == "GET":
                response = requests.get(url, headers=headers, params=params, timeout=30)
            elif method.upper() == "POST":
                response = requests.post(url, headers=headers, json=params, timeout=30)
            else:
                raise ValueError(f"Unsupported HTTP method: {method}")
            
            response.raise_for_status()
            return response.json()
        except requests.exceptions.RequestException as e:
            print(f"API request failed: {e}")
            raise
    
    def search_products(
        self,
        query: str,
        page: int = 1,
        sort: str = "best_match",
        cat_id: Optional[str] = None,
        min_price: Optional[str] = None,
        max_price: Optional[str] = None,
        facet: Optional[str] = None
    ) -> Dict[str, Any]:
        """Search for products on walmart.com.mx.
        
        Args:
            query: Search keyword (required)
            page: Page number, 1-indexed (default: 1)
            sort: Sort order - best_match, price_low, price_high (default: best_match)
            cat_id: Category ID to filter results
            min_price: Minimum price filter
            max_price: Maximum price filter
            facet: Additional filter facets
            
        Returns:
            Search results with item stacks
        """
        params = {
            "query": query,
            "page": page,
            "sort": sort,
        }
        
        if cat_id:
            params["cat_id"] = cat_id
        if min_price:
            params["min_price"] = min_price
        if max_price:
            params["max_price"] = max_price
        if facet:
            params["facet"] = facet
        
        return self._call("search_products", method="GET", **params)
    
    def get_product_details(self, product_id: str) -> Dict[str, Any]:
        """Get full product details including pricing and availability.
        
        Args:
            product_id: The Walmart product ID
            
        Returns:
            Product details including name, brand, price, and availability
        """
        return self._call("get_product_details", method="GET", product_id=product_id)
    
    def list_categories(self) -> Dict[str, Any]:
        """List top-level departments and navigation links.
        
        Returns:
            List of categories with display names and URLs
        """
        return self._call("list_categories", method="GET")
    
    def get_similar_products(self, product_id: str) -> Dict[str, Any]:
        """Get similar and recommended products for a given item.
        
        Args:
            product_id: The Walmart product ID
            
        Returns:
            Carousels with similar products
        """
        return self._call("get_similar_products", method="GET", product_id=product_id)


def extract_products_from_search(search_result: Dict[str, Any]) -> List[Dict[str, Any]]:
    """Extract product items from search response.
    
    Args:
        search_result: The searchResult object from search response
        
    Returns:
        List of product items
    """
    products = []
    
    item_stacks = search_result.get("itemStacks", [])
    for stack in item_stacks:
        items = stack.get("items", [])
        products.extend(items)
    
    return products


def format_price(price: float) -> str:
    """Format price for display.
    
    Args:
        price: Price value
        
    Returns:
        Formatted price string
    """
    return f"${price:.2f}" if isinstance(price, (int, float)) else "N/A"


def print_product_summary(product: Dict[str, Any]) -> None:
    """Print a summary of a product.
    
    Args:
        product: Product dictionary from search results
    """
    name = product.get("name", "Unknown")
    brand = product.get("brand", "Unknown")
    price = product.get("price", "N/A")
    rating = product.get("rating", {})
    avg_rating = rating.get("averageRating", "N/A")
    num_reviews = rating.get("numberOfReviews", 0)
    availability = product.get("availabilityStatusV2", {}).get("display", "Unknown")
    
    print(f"  • {name}")
    print(f"    Brand: {brand} | Price: {format_price(price)}")
    print(f"    Rating: {avg_rating} ⭐ ({num_reviews} reviews) | {availability}")


def main():
    """Practical workflow demonstrating the Walmart Mexico API."""
    
    # Initialize the client
    client = ParseClient()
    
    print("=" * 80)
    print("Walmart Mexico Product Search & Analysis Workflow")
    print("=" * 80)
    
    # Step 1: Explore categories
    print("\n[Step 1] Discovering available product categories...")
    try:
        categories_response = client.list_categories()
        categories = categories_response.get("data", {}).get("categories", [])
        print(f"✓ Found {len(categories)} main categories")
        
        if categories:
            print("\n  Available categories:")
            for i, cat in enumerate(categories[:5], 1):
                cat_name = cat.get("name", {}).get("title", "Unknown")
                subcats = cat.get("subcategories", [])
                print(f"    {i}. {cat_name} ({len(subcats)} subcategories)")
    except Exception as e:
        print(f"✗ Error fetching categories: {e}")
        return
    
    # Step 2: Search for products
    search_query = "leche"
    print(f"\n[Step 2] Searching for '{search_query}' products...")
    
    try:
        search_response = client.search_products(
            query=search_query,
            page=1,
            sort="best_match"
        )
        
        search_result = search_response.get("data", {}).get("searchResult", {})
        total_count = search_result.get("aggregatedCount", 0)
        products = extract_products_from_search(search_result)
        max_pages = search_result.get("paginationV2", {}).get("maxPage", 1)
        
        print(f"✓ Search found {total_count} total results ({max_pages} pages)")
        print(f"  Showing {len(products)} products on page 1:\n")
        
        for product in products[:3]:
            print_product_summary(product)
        
        if not products:
            print("  No products found.")
            return
        
        # Step 3: Get detailed information for top products
        print(f"\n[Step 3] Fetching detailed information for top {min(3, len(products))} products...")
        
        selected_products = []
        for idx, product in enumerate(products[:3], 1):
            product_id = product.get("id")
            product_name = product.get("name", "Unknown")
            
            if not product_id:
                continue
            
            print(f"\n  Fetching details for: {product_name}...")
            
            try:
                details = client.get_product_details(product_id)
                product_data = details.get("data", {})
                
                selected_products.append({
                    "id": product_id,
                    "name": product_name,
                    "details": product_data
                })
                
                brand = product_data.get("brand", "Unknown")
                price_info = product_data.get("priceInfo", {})
                current_price = price_info.get("currentPrice", {})
                price_value = current_price.get("price", "N/A")
                availability = product_data.get("availabilityStatus", "Unknown")
                short_desc = product_data.get("shortDescription", "")
                
                print(f"    ✓ Brand: {brand}")
                print(f"    ✓ Price: {format_price(price_value)}")
                print(f"    ✓ Availability: {availability}")
                
                if short_desc:
                    desc_preview = short_desc[:80] + "..." if len(short_desc) > 80 else short_desc
                    print(f"    ✓ Description: {desc_preview}")
            
            except Exception as e:
                print(f"    ✗ Error fetching details: {e}")
        
        # Step 4: Compare prices across similar products
        print(f"\n[Step 4] Comparing prices for similar products...")
        
        if selected_products:
            first_product = selected_products[0]
            print(f"\n  Looking for alternatives to: {first_product['name']}")
            
            try:
                similar_response = client.get_similar_products(first_product["id"])
                
                # Parse similar products data
                similar_data = similar_response.get("data", {})
                if isinstance(similar_data, str):
                    print("    (Similar products data available but in complex format)")
                else:
                    carousels = similar_data.get("carousels", []) if isinstance(similar_data, dict) else []
                    
                    if carousels:
                        carousel = carousels[0]
                        carousel_title = carousel.get("title", "Similar Products")
                        similar_products = carousel.get("products", [])
                        
                        print(f"    ✓ {carousel_title}: {len(similar_products)} items")
                        
                        price_list = []
                        for similar in similar_products[:5]:
                            similar_name = similar.get("name", "Unknown")
                            similar_price_info = similar.get("priceInfo", {})
                            similar_price = similar_price_info.get("currentPrice", {})
                            price_val = similar_price.get("price", "N/A")
                            
                            if isinstance(price_val, (int, float)):
                                price_list.append((similar_name, price_val))
                        
                        if price_list:
                            price_list.sort(key=lambda x: x[1])
                            print("\n      Cheapest alternatives:")
                            for name, price in price_list[:3]:
                                print(f"        • {name}: {format_price(price)}")
                    else:
                        print("    No similar products carousel found")
            
            except Exception as e:
                print(f"    ✗ Error finding similar products: {e}")
        
        # Step 5: Search with price filters
        print(f"\n[Step 5] Searching for budget options (max $50)...")
        
        try:
            budget_response = client.search_products(
                query=search_query,
                page=1,
                sort="price_low",
                max_price="50"
            )
            
            budget_result = budget_response.get("data", {}).get("searchResult", {})
            budget_products = extract_products_from_search(budget_result)
            
            print(f"✓ Found {len(budget_products)} products under $50 (sorted by price):\n")
            
            for product in budget_products[:5]:
                price = product.get("price", "N/A")
                name = product.get("name", "Unknown")
                availability = product.get("availabilityStatusV2", {}).get("display", "Unknown")
                print(f"  • {name}")
                print(f"    Price: {format_price(price)} | {availability}\n")
        
        except Exception as e:
            print(f"✗ Error with budget search: {e}")
    
    except Exception as e:
        print(f"✗ Error during workflow: {e}")
    
    print("=" * 80)
    print("Workflow completed successfully!")
    print("=" * 80)


if __name__ == "__main__":
    main()
All endpoints · 4 totalmissing one? ·

Search for products on walmart.com.mx. Returns paginated search results including product names, prices, images, ratings, and availability. Results are extracted from server-side rendered pages.

Input
ParamTypeDescription
pageintegerPage number for pagination
sortstringSort order: best_match, price_low, price_high
facetstringFacet filter string for additional filtering
queryrequiredstringSearch keyword
cat_idstringCategory ID filter to narrow search to a specific department
max_pricestringMaximum price filter value
min_pricestringMinimum price filter value
Response
{
  "type": "object",
  "fields": {
    "query": "search query string",
    "searchResult": "object containing title, aggregatedCount, itemStacks (array of product groups with items), paginationV2, and categoryNavigation"
  },
  "sample": {
    "data": {
      "query": "leche",
      "searchResult": {
        "title": "Resultados para \"leche\"",
        "itemStacks": [
          {
            "count": 166,
            "items": [
              {
                "id": "00750105590414",
                "name": "Leche Alpura deslactosada light 1 l",
                "brand": "Alpura",
                "image": "https://i5.walmartimages.com/asr/878d6552-55eb-4992-9628-3fbd4111e5a4.36b77e05b114fce7296bfa62b8ff92d6.jpeg",
                "price": 37,
                "rating": {
                  "averageRating": 4.8,
                  "numberOfReviews": 5
                },
                "usItemId": "00750105590414",
                "canonicalUrl": "/ip/leche-alpura-deslactosada-light-1-l/00750105590414",
                "availabilityStatusV2": {
                  "value": "IN_STOCK",
                  "display": "Disponible"
                }
              }
            ],
            "title": "Resultados para \"leche\""
          }
        ],
        "paginationV2": {
          "maxPage": 4
        },
        "aggregatedCount": 166
      }
    },
    "status": "success"
  }
}

About the Walmart API

Search and Browse

The search_products endpoint accepts a required query string and several optional filters: min_price, max_price, cat_id, facet, and sort (accepting best_match, price_low, or price_high). Results are paginated via a page parameter. The response wraps results inside a searchResult object containing aggregatedCount, itemStacks (groups of product listings), paginationV2 for navigating pages, and categoryNavigation for drill-down filtering.

Product Details

get_product_details takes a single product_id (e.g. 00750105590414) and returns a structured object with fields including name, brand, shortDescription, availabilityStatus (such as IN_STOCK), priceInfo (with currentPrice, wasPrice, and savings details), imageInfo (with allImages and thumbnailUrl), category (including categoryPathId and a path array for breadcrumbs), and fulfillmentSummary with estimated delivery dates.

Categories and Similar Products

list_categories requires no inputs and returns an array of top-level department objects, each carrying a name object (title and URL slug), an image, and a subcategories array — useful for building navigation trees or scoping searches by department. get_similar_products accepts a product_id and returns a carousels array of related and recommended products, which can feed recommendation features or cross-sell analysis.

Coverage Notes

All endpoints reflect the walmart.com.mx catalog, which carries pricing in Mexican pesos and covers the product assortment available in Mexico. Product IDs are Mexico-specific and differ from Walmart US identifiers. Pagination in search uses integer page numbers; there is no cursor-based pagination.

Reliability & maintenance

The Walmart API is a managed, monitored endpoint for walmart.com.mx — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when walmart.com.mx changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official walmart.com.mx API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Track price changes on specific products using priceInfo.wasPrice and priceInfo.currentPrice fields over time
  • Build a product comparison tool using get_product_details across multiple product IDs
  • Index the full department tree from list_categories to map Walmart Mexico's category structure
  • Filter search results by price range using min_price and max_price to analyze product distribution within a budget segment
  • Power a recommendation widget using the carousels array from get_similar_products
  • Audit stock availability across SKUs by checking availabilityStatus from get_product_details
  • Aggregate brand presence in a category by combining cat_id filtering in search_products with the brand field from product details
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Walmart Mexico have an official developer API?+
Walmart Mexico does not offer a public developer API for external access to its product catalog. Walmart's official developer program (developer.walmart.com) covers the US marketplace only and is restricted to approved marketplace sellers.
What does the `fulfillmentSummary` field in `get_product_details` actually contain?+
fulfillmentSummary is an array of fulfillment option objects, each including available delivery methods and estimated delivery dates for the product. It reflects the options shown on the product page, which can vary by item and region within Mexico.
Does the search endpoint return customer reviews or review counts?+
The search_products response includes ratings data within the itemStacks items, but the get_product_details endpoint does not return a dedicated reviews array or individual review text. The API currently covers product metadata, pricing, and fulfillment. You can fork it on Parse and revise to add a review-fetching endpoint if that data is accessible on the product page.
Is there a way to retrieve all products within a category without a search query?+
Currently, product listing requires a query string in search_products; there is no browse-by-category-only endpoint that returns all items in a department without a keyword. The cat_id parameter narrows search results to a department but still requires a query. You can fork the API on Parse and revise it to add a category-browse endpoint that accepts only a cat_id.
Are product IDs from Walmart US interchangeable with Walmart Mexico product IDs?+
No. Walmart Mexico product IDs (used in get_product_details and get_similar_products) are specific to the walmart.com.mx catalog and do not correspond to Walmart US item IDs or UPCs, even for identical products. Always source IDs from search_products results for use with the other endpoints.
Page content last updated . Spec covers 4 endpoints from walmart.com.mx.
Related APIs in EcommerceSee all →
walmart.com API
Retrieve product data from Walmart.com including pricing, descriptions, availability, reviews, and category listings. Access real-time product information to search by keyword, look up items by ID or URL, and browse department categories.
mercadolibre.com.mx API
Search for products on Mercado Libre Mexico, view detailed product information with pricing and offers, browse categories, and research seller details all in one place. Access live marketplace data including product listings, category hierarchies, and current offers to help you find and compare items across Mexico's largest e-commerce platform.
walmart.ca API
Search Walmart Canada products and retrieve detailed information like prices, availability, and specifications. Find nearby Walmart pharmacy locations to check services and hours.
amazon.com.mx API
Search and discover products on Amazon Mexico with real-time pricing, detailed product information, offers, and bestseller lists. Compare prices instantly, get search suggestions, and find current deals to help you make informed shopping decisions.
coppel.com API
Search and browse Coppel's product catalog by keyword to find items with prices, images, and detailed product information, with flexible sorting and pagination options. Get real-time access to Mexico's largest department store inventory to compare products and prices effortlessly.
chedraui.com.mx API
Search and browse products from Chedraui Mexico's online store, view detailed product information and categories, and discover trending searches to find exactly what you're looking for. Access comprehensive product catalogs organized by category and see what other shoppers are searching for most.
la comer.com.mx API
Search and browse La Comer Mexico's product catalog across different stores and departments, then retrieve detailed product information including pricing and availability. Access the complete product hierarchy by category to discover items and compare offerings across multiple locations.
soriana.com API
Search and browse Soriana's product catalog to find items, compare prices, explore departments, and discover available coupons. Get detailed product information and calculate your basket totals to plan your shopping efficiently.
Walmart Mexico API – Products, Search & Categories · Parse