~ / endpoints / Grocery API

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.

Get a free API keyBrowse the endpoints
1,000
free requests / mo
2.6s
median response
JSON
structured output
40+
results per page
why it blocks

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.

run a request

Fire off the Walmart Grocery Scraper API

cURL
curl "https://api.walmartscraperapi.com/api/v1/walmart/search?query=great+value+milk&api_key=$API_KEY"
Python
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"])
inputs

Parameters

ParameterRequiredDefaultNotes
queryrequired-The grocery search term, e.g. great value milk. This is the required input; we build the Walmart search URL from it.
pageoptional1Results page number, 1 to 100. Defaults to 1.
countryoptional-Optional two-letter country code to fetch results as seen from that region.
api_keyrequired-Your API key, passed as a query parameter. Get one free at signup.
the payload

The JSON the Walmart Grocery Scraper API hands back

200 OK
{
  "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 }
    }
  ]
}
FieldTypeDescription
querystringThe grocery search term echoed back for this response.
total_resultsintegerNumber of items returned on this page.
resultsarrayThe ranked grocery grid, each item an object with the fields below.
results[].idstringThe stable Walmart us_item_id for the grocery listing.
results[].titlestringThe item title, e.g. the brand, size, and pack count.
results[].pricenumberCurrent price parsed from the listing.
results[].price_per_unitobjectThe 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[].ratingnumberAverage star rating, when the item has reviews.
results[].reviews_countintegerNumber of reviews on the item.
results[].sellerstringSeller name, e.g. Walmart.com or a marketplace seller.
results[].out_of_stockbooleanTrue when the grocery item is out of stock.
results[].urlstringThe canonical product page URL for the item.
results[].primary_offerobjectOffer detail: offer_price, was_price (strike price), and min_price.
put it to work

Ways teams put Walmart data to work

>

Grocery price tracking

Run staple grocery queries on a schedule and store price and price_per_unit to watch how everyday item costs move over time.
>

Unit-price comparison

Read the price_per_unit line to compare cost per ounce or per count across pack sizes and brands for the same item.
>

Inflation and basket indexes

Track a fixed basket of grocery items to build your own cost-of-goods or inflation index from real Walmart prices.
>

Assortment monitoring

Pull a grocery category to see which brands and private-label items appear and where an assortment has gaps.
>

Stock and availability

Watch out_of_stock across grocery staples so supply gaps and restocks surface in your dashboard the same day.
>

Private-label research

Compare Great Value and other store-brand items against national brands on price and rating for category analysis.
under the hood

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

Pass a grocery term as query and we build the Walmart search URL and return the ranked grid of grocery and household items.
*

Price and price-per-unit

Each result carries the price plus the price_per_unit line, so cost-per-ounce and cost-per-count comparisons are one field away.
*

Stock flags per item

The out_of_stock flag on each result lets you separate available grocery items from listings you cannot actually buy.
*

Residential egress and retries

Walmart blocks datacenter traffic, so grocery requests route through residential IPs and retry on a challenge before returning.
*

Simple pagination

Increment the page parameter, from 1 up to 100, to walk deeper into a grocery category.
*

Validated JSON schema

Parity-checked, regression-tested fields return in the same shape on every call.
weigh the routes

The Walmart Grocery Scraper API against every other route

Our APIDIY (requests / headless)Walmart.io affiliate API
Grocery gridYes, ranked with pricesParse the grid blob yourselfSearch endpoint, approval required
Price per unitReturned when shownParse the unit line manuallyFeed dependent
Reaches the pageResidential egress built inDatacenter IPs get blockedNot applicable, affiliate feed
Stock flagPer item booleanDetect availability manuallyFeed dependent
SetupAPI key onlyProxies, headless browser, parsersImpact Radius approval and keys
AccessOpen signup, free tierYou build and maintain itAffiliate program gated
what it costs

Pay for the requests that land

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky or one-off volume

Median response 2.6s. You only pay for successful requests.

FAQ

What is a Walmart grocery scraper?

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.

How do I scrape Walmart grocery prices?

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.

Can I get the price per unit for grocery items?

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.

Does the grocery endpoint use a different API than search?

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.

Why does scraping Walmart grocery directly fail?

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.

How fast is the Walmart grocery scraper API?

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.

Pull grocery api as clean JSON
Start with 1,000 free requests. No card, no approval.
Get a free API key Browse the endpoints