Walmart API guide

How to check Walmart prices by ZIP code and verify the store

The same Walmart item ID can resolve to different stores. Two Indiana ZIPs show which fields to keep before comparing a price or calling an item out of stock.

Two ZIPs, one item and two confirmed stores

Morton iodized salt, 26 oz, was $1.92 at Walmart store 1142 in Scottsburg and $1.92 at store 1033 in Seymour. Both pages returned UPC 024600010030. Here is what came back on December 5, 2026.

Requested ZIPStore that priced the itemUSDObserved (UTC)
47170Scottsburg Supercenter (1142)$1.9220:45:09
47274Seymour Supercenter (1033)$1.9220:51:00

Store 1142 was 0.2 miles from the center of ZIP 47170. Store 1033 was 1.0 mile from the center of ZIP 47274. Each distance used the store coordinates. Eggs showed why the store ID matters. A 10 mile search from Seymour and a 25 mile search from Scottsburg both returned store 1033 in Seymour. Counting the requested ZIPs would turn one egg price into two supposed store prices.

Run the lookup in Python

With Python, the requests package and your Logimu key in the LOGIMU_API_KEY environment variable, run these two requests. The product endpoint uses asin as the parameter name for the numeric Walmart item ID. Use country=walmart, mode=live, a US ZIP and a radius in miles. The example uses 10 miles. A store match with a complete price costs two credits per request.

import os

import requests

for zipcode in ("47170", "47274"):
    response = requests.get(
        "https://api.logimu.com/v1/product",
        headers={"X-API-KEY": os.environ["LOGIMU_API_KEY"]},
        params={"country": "walmart", "mode": "live", "asin": "10448936",
                "zip": zipcode, "radius_miles": 10},
        timeout=155,
    )
    if response.status_code == 503:
        payload = response.json()
        detail = payload.get("detail", payload)
        if isinstance(detail, dict) and detail.get("reason") == "zip_not_reached":
            print(zipcode, "No store matched this radius")
            continue
    response.raise_for_status()
    product = response.json()
    store = product["zip_match"]
    if (store.get("distance_basis") != "store" or not store.get("store_id")
            or product.get("snapshot_status") != "full" or not isinstance(product.get("price"), (int, float))):
        print(zipcode, "No complete price with a confirmed store location")
        continue
    print(zipcode, store["store_id"], store["store_name"], store["distance_basis"],
          product["upc"], product.get("price"), product.get("currency"),
          product.get("stock_state"), product.get("price_observed_at"))

Decide which prices belong in the comparison

Save the requested ZIP and radius alongside the returned zip_match.store_id, store name, price, currency and price_observed_at. Keep the item ID, UPC, pack size and buybox_seller so a seller change or a different package cannot masquerade as a local price change.

Read distance_basis as well. The value store uses the physical store coordinates. store_postal_code uses the store ZIP center, and assigned_location uses the location Walmart assigned. For this comparison we accepted only named stores with their own coordinates. To study changes over time, take new observations for the same store IDs.

What a missing store match tells you

One request for item 10448936 near ZIP 47274 returned HTTP 503 and zip_not_reached. The service could not verify the item at a store inside that radius and charged zero credits for that request. Keep a blank price and an unknown stock value. Retrying later is reasonable. Widening the radius changes the question and can lead to a different store.

A successful page can show stock_state and in_stock. These describe what the product page displayed. They do not give shelf quantity or guarantee a pickup order. A missing price in a partial response also stays blank.

Use the observations

Download the December 5 store observations (CSV). There is one row per request, including the misses. Use the item and store columns to reproduce the comparisons. The timestamp on a successful row is when the price was observed.

The Walmart product endpoint reference lists the location fields, radius limits and billing. A single request returns one observed store in range.

Frequently asked questions

Can I request a particular Walmart store number?

You can request a US ZIP and a radius of 5 to 100 miles. The response identifies the store that supplied the price. Check its store ID if your analysis needs a particular branch.

Can I use a stored product price for a local comparison?

Use a live request with a ZIP for each observation. A stored product price alone does not establish which store supplied a local price.

Does the Walmart API show how many items are on the shelf?

The response includes the stock signal shown on the product page. It does not give a verified shelf count or a pickup reservation.