SerpBase
Back to Blog

Walmart Search API: Keyword Results as JSON

Get Walmart.com search results for a keyword as JSON: titles, links, item IDs, ratings, stock, sellers and sponsored flags. Tested on two queries, with pitfalls.

November 26, 2026
By SerpBase Team2 min read

Short answer: one POST to /walmart/search returns the Walmart.com results for a keyword as JSON — product title, link, Walmart item ID, rating, review count, stock status, seller and whether the placement is sponsored.

Walmart's own APIs are for sellers and affiliates and need an approved account. If you only need to know what a shopper sees for a keyword, and in what order, reading the search page is the direct route.

The request

curl -X POST 'https://api.serpbase.dev/walmart/search' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -d '{"query":"coffee maker"}'

What comes back

We ran this on 26 November 2026. It returned 71 products in about 11 seconds, 21 of them marked sponsored, and pagination.total_results of 11407. A second test, {"query":"air fryer","page":2}, returned 50 products in about 6 seconds, 10 of them sponsored.

Each item in products has:

FieldWhat it holds
positionOrder on the page, starting at 1
titleProduct name
urlProduct page on walmart.com
us_item_idWalmart's item number, the one in the product URL
rating, reviews_countStar rating and number of reviews
availabilityFor example In stock
seller.nameWalmart.com or the marketplace seller
sponsoredtrue on paid placements, absent otherwise
mediaProduct image

The page is also returned grouped the way Walmart lays it out, in sections. For "coffee maker" there were four: two blocks of results for the query (15 and 37 products), "4 stars and above" (9) and "Top deals" (10). products is the same items as one flat list.

Python: who ranks for a keyword

import requests

r = requests.post(
    "https://api.serpbase.dev/walmart/search",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"query": "coffee maker"},
    timeout=60,
).json()

if r["status"] != 0:
    raise SystemExit(r.get("error"))

for p in r["products"]:
    if p.get("sponsored"):
        continue                      # organic placements only
    print(p["position"], p["us_item_id"], p["seller"]["name"], p["title"][:60])

Things that trip people up

  • Search results carry no price. In both tests the items had rating, stock and seller but no price field. Take the us_item_id and call the Walmart product endpoint for the price.
  • Sponsored items are mixed in. 21 of 71 on page 1 were ads. Filter on sponsored before you compute a rank.
  • position counts every card on the page, including the "Top deals" and "4 stars and above" blocks. For a clean organic rank, read the query sections in sections or renumber after filtering.
  • Counts are strings. reviews_count and total_results come back as "5119" and "11407"; convert before sorting.
  • Use page for more. Page 2 had a single section of 50 products.

Related endpoints

Walmart autocomplete returns the suggestions from the search box. For the same job on Amazon see Amazon search.

Cost and limits

Each request costs 2 credits; failed requests are not charged. The response is always HTTP 200 with a status field: 0 means success, anything else comes with an error string. Credits cost $0.25–$0.50 per 1,000 depending on the plan, and new accounts get 500 free credits without a card.