Walmart Grocery Scraper API
Our Walmart grocery scraper takes any grocery query and returns the product grid as JSON: title, price, the price-per-unit line, rating, seller, and stock status, so you can track grocery and household items without scraping the page yourself.
Why Walmart Grocery data is locked behind a block
Walmart's grocery aisle is a client-rendered search grid behind a residential-only wall, so a datacenter fetch returns a robot check instead of items. Prices, unit prices, and stock live in a shifting __NEXT_DATA__ blob, so a hand-built grocery parser breaks within weeks.
Fire off the Walmart Grocery Scraper API
curl "https://api.walmartscraperapi.com/api/v1/walmart/search?query=great+value+milk&api_key=$API_KEY" import requests
BASE = "https://api.walmartscraperapi.com"
API_KEY = "YOUR_API_KEY"
# Grocery items come back from the search endpoint. Pass a grocery query.
data = requests.get(
f"{BASE}/api/v1/walmart/search",
params={
"query": "great value milk",
"api_key": API_KEY,
},
timeout=30,
).json()
for r in data["results"]:
unit = r["price_per_unit"].get("amount", r["price_per_unit"]["unit"])
stock = "out of stock" if r["out_of_stock"] else "in stock"
print(r["price"], "(", unit, ")", stock, r["title"]) Parameters
| Parameter | Required | Default | Notes |
|---|---|---|---|
query | required | - | The grocery search term, e.g. great value milk. This is the required input; we build the Walmart search URL from it. |
page | optional | 1 | Results page number, 1 to 100. Defaults to 1. |
country | optional | - | Optional two-letter country code to fetch results as seen from that region. |
api_key | required | - | Your API key, passed as a query parameter. Get one free at signup. |
The JSON the Walmart Grocery Scraper API hands back
{
"query": "coffee maker",
"page": 1,
"total_results": 60,
"results": [
{
"position": 1,
"id": "808715278",
"title": "Cuisinart Stainless Steel 12-Cup Coffee Maker, Black",
"url": "https://www.walmart.com/ip/Cuisinart-12-Cup-Coffeemaker-Stainless-Steel-Black/808715278?classType=REGULAR",
"price": 69.95,
"currency": "USD",
"rating": 4.5,
"reviews_count": 4721,
"seller": "Walmart.com",
"out_of_stock": false,
"sponsored": true,
"free_shipping": true,
"free_shipping_with_walmart_plus": true,
"two_day_shipping": false,
"multiple_options_available": false,
"shipping_price": null,
"price_per_unit": { "unit": "each" },
"primary_offer": { "offer_price": 69.95, "was_price": null, "min_price": 0 }
}
]
} | Field | Type | Description |
|---|---|---|
query | string | The grocery search term echoed back for this response. |
total_results | integer | Number of items returned on this page. |
results | array | The ranked grocery grid, each item an object with the fields below. |
results[].id | string | The stable Walmart us_item_id for the grocery listing. |
results[].title | string | The item title, e.g. the brand, size, and pack count. |
results[].price | number | Current price parsed from the listing. |
results[].price_per_unit | object | The unit the price is quoted per (e.g. each), with the unit-price amount string when Walmart shows one (e.g. per oz or per 100 ct). |
results[].rating | number | Average star rating, when the item has reviews. |
results[].reviews_count | integer | Number of reviews on the item. |
results[].seller | string | Seller name, e.g. Walmart.com or a marketplace seller. |
results[].out_of_stock | boolean | True when the grocery item is out of stock. |
results[].url | string | The canonical product page URL for the item. |
results[].primary_offer | object | Offer detail: offer_price, was_price (strike price), and min_price. |
Ways teams put Walmart data to work
Grocery price tracking
Unit-price comparison
Inflation and basket indexes
Assortment monitoring
Stock and availability
Private-label research
What powers our Walmart Grocery Scraper API
Grocery items come back from the same search endpoint: pass a grocery query and we return the ranked grid with price, price-per-unit, rating, seller, and stock, no residential proxy pool or __NEXT_DATA__ parser to run yourself. Every request routes through residential IPs with anti-bot handling and retries, returning validated JSON in about 2.6 seconds. The response shown above uses one live search to illustrate the exact fields; the shape is identical for any grocery query.
Grocery query in, grid out
Price and price-per-unit
Stock flags per item
Residential egress and retries
Simple pagination
Validated JSON schema
The Walmart Grocery Scraper API against every other route
| Our API | DIY (requests / headless) | Walmart.io affiliate API | |
|---|---|---|---|
| Grocery grid | Yes, ranked with prices | Parse the grid blob yourself | Search endpoint, approval required |
| Price per unit | Returned when shown | Parse the unit line manually | Feed dependent |
| Reaches the page | Residential egress built in | Datacenter IPs get blocked | Not applicable, affiliate feed |
| Stock flag | Per item boolean | Detect availability manually | Feed dependent |
| Setup | API key only | Proxies, headless browser, parsers | Impact Radius approval and keys |
| Access | Open signup, free tier | You build and maintain it | Affiliate program gated |
Pay for the requests that land
| Plan | Price | Best for |
|---|---|---|
| Free | 1,000 requests | Testing and small jobs |
| Pro | $0.60 / 1k | Production workloads |
| Pay-as-you-go | $0.90 / 1k | Spiky or one-off volume |
Median response 2.6s. You only pay for successful requests.
FAQ
A Walmart grocery scraper is a tool that reads Walmart's public grocery listings and returns them in a structured format. Our Walmart grocery scraper API uses the search endpoint: pass a grocery query and it returns each item's title, price, price-per-unit line, rating, review count, seller, and stock status as JSON.
Send a GET request to our walmart/search endpoint with a grocery query (for example great value milk) plus your API key. The response is a ranked grid of items with price and price_per_unit for each, so you read the prices directly and, to track them over time, store each reading with a timestamp on your side.
Yes, when Walmart displays it. Each result includes a price_per_unit object with the unit the price is quoted per, such as each, plus the unit-price amount string (for example per ounce or per 100 count) when the listing shows one. That lets you compare cost across different pack sizes and brands without doing the math yourself.
No. Grocery and household items are returned by the same walmart/search endpoint, because on Walmart they are found through the same search grid. You pass a grocery query and get the standard result objects back. This page frames that endpoint for grocery use; the fields are identical to a general product search.
Walmart blocks datacenter IP ranges and renders the grocery grid client-side inside its __NEXT_DATA__ JSON, so a direct fetch from a cloud server usually returns a challenge screen rather than the items. Our API routes through residential IPs, handles the anti-bot layer, and parses that JSON, which is why it returns structured grocery data where a plain request does not.
Median end-to-end response is about 2.6 seconds, which includes residential proxy routing, anti-bot handling, retries, and parsing. One call returns a full page of grocery results, so you do not chain extra requests to assemble the grid.