Skip to content

About

Walmart scraper API: Walmart Product Details, Walmart Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Walmart Scraper API

Scrape Walmart with a JSON API. This repo has working Python examples for DataGuru's Walmart scraper APIs: Walmart Product Details and Walmart Search.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0018 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

Walmart APIs

API What it returns Price Page
Walmart Product Details Scrape Walmart product details, pricing, stock, local store pickup, aisle location, and seller info. $0.0018 https://dataguru.cc/apis/walmart-products-details/
Walmart Search Search Walmart by keyword or search URL and get matching products, seller details, ratings and reviews. $0.0018 https://dataguru.cc/apis/walmart-search/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/walmart-scraper-api.git
cd walmart-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py walmart-products-details

Examples

Every example covers all 2 Walmart APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O walmart.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

Walmart Product Details

Scrape Walmart product details, pricing, stock, local store pickup, aisle location, and seller info.

Parameter Type Required Description
location string no Two-letter country code to localise results (e.g. US). Default: US.
product_url string yes Provide the full Walmart Product URL to scrape.
zip_code string no US ZIP code to check local pickup availability and aisle location (e.g. 75001).

Response fields: search_information, product_results, reviews_results, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/walmart/products/details" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url": "https://www.walmart.com/ip/New-Gourmia-1700W-6-Slice-Digital-Toaster-Oven-Air-Fryer-With-19-One-Touch-Presets-Stainless-Steel/1438286796?classType=VARIANT&athbdg=L1102"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "search_information": {
    "location": {
      "postal_code": "string",
      "province_code": "string",
      "city": "string"
    }
  },
  "product_results": {
    "us_item_id": "1234567890",
    "product_id": "1234567890",
    "variants": [
      "string"
    ],
    "upc": "string",
    "title": "string",
    "short_description": "string",
    "description": "string",
    "seller_id": "1234567890",
    "seller_name": "string",
    "has_seller_badge": false,
    "brand": "string",
    "standard_delivery_date": "2026-01-01T12:00:00Z",
    "fulfillment_type": "string",
    "in_stock": false,
    "out_of_stock": false,
    "price": 0.0,
    "currency": "USD",
    "was_price": 0.0,
    "fulfillment_badge": "string",
    "fulfillment_title": "string",
    "images": [
      "https://example.com/..."
    ],
    "specifications": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "variant_categories": [
      "string"
    ],
    "selections": [
      "string"
    ]
  },
  "reviews_results": {
    "ratings": [
      {
        "stars": 0,
        "count": 0,
        "percentage": 0.0
      }
    ],
    "reviews": {
      "rating": 0.0,
      "count": 0,
      "recommended_percentage": 0,
      "top_positive": {},
      "top_negative": {},
      "top_mentions": [
        "string"
      ],
      "customer_reviews": [
        "string"
      ]
    }
  },
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "Walmart Product Details",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

Walmart Search

Search Walmart by keyword or search URL and get matching products, seller details, ratings and reviews.

Parameter Type Required Description
location string no Two-letter country code to localise results (e.g. US). Default: US.
page integer no Page number of search results. Default: 1.
query string yes Search keyword or full Walmart search URL (e.g. "air fryer" or "https://www.walmart.com/search?q=air+fryer").

Response fields: title, description, totalItemCount, item, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/walmart/search" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "https://www.walmart.com/search?q=air+fryer"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "search_results": [
    {
      "title": "string",
      "description": "string",
      "totalItemCount": 0,
      "item": [
        {
          "title": "string",
          "id": "1234567890",
          "usItemId": "1234567890",
          "type": "string",
          "thumbnail": "https://example.com/...",
          "brand": "string",
          "canonicalUrl": "https://example.com/...",
          "returnPolicy": {},
          "rating": {
            "averageRating": 0.0,
            "numberOfReviews": 0
          },
          "fulfillment": {
            "isEligibleForPickup": false,
            "isEligibleForDelivery": false
          },
          "priceInfo": {
            "linePrice": "string",
            "itemPrice": "string",
            "unitPrice": "string"
          },
          "orderLimit": 0,
          "isSponsoredFlag": false,
          "shippingOption": "string"
        }
      ]
    }
  ],
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "Walmart Search",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

Walmart scraper API: Walmart Product Details, Walmart Search as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors