E-commerce and prices

How to use a Walmart product search API with an AI agent

Updated · 1ToolRing team

A Walmart product search API returns the products Walmart lists for a query, with item ID, price, rating and seller, as JSON. With 1ToolRing your agent searches with serpapi/walmart/search or anyapi/walmart.search, then reads specs, offers and reviews for the few items you shortlist. You pay per call from one prepaid balance.

Resellers checking a category and shops comparing their prices with Walmart usually start from the Walmart search page. Copying product cards by hand gets you titles and prices and loses the item ID, which you need for every later lookup.

Two things trip people up. A search returns near matches as well as the product, and Walmart prices and stock can depend on the store a request resolves to. So search one page and keep the IDs together with the store context of each request. Detail calls come later, and only for the items that survive a first review.

Paste this into your agent

Works in Claude, ChatGPT, Cursor, Codex, n8n and any MCP client. Change the placeholders, keep the row cap.

Set up 1ToolRing from 1toolring.com/install, then search Walmart for "building blocks set 500 pieces" with serpapi/walmart/search, first page only. Inspect the price first and stop after 4 calls in total. Return a table with item ID, title, price, rating, review count and seller, then fetch details for the 2 best matches with serpapi/walmart/product and add stock and the main specs.

First time? Set up takes one command or one connector URL:

set up 1ToolRing - https://1toolring.com/llms.txt

Paste this into your agent's chat (Claude Code, Codex, Cursor, ChatGPT, claude.ai). Your agent sets up 1ToolRing and you sign in.

Tools this workflow uses

Your agent finds these with discover_tools and reads each input schema and price with inspect_tool. Both are free. Only a successful run is charged.

ToolWhat it does herePrice
serpapi/walmart/searchReturns Walmart product listings with prices and ratings, the starting point when you do not know the item ID yet.$0.020 / callRp353 / call
anyapi/walmart.searchSearches by keyword with sort, price range, facet and page filters, and adds seller and availability for each product.$0.0012 / unitRp22 / unit
serpapi/walmart/productReads one product page with offers, specs and ratings once you have the ID.$0.020 / callRp353 / call
serpapi/walmart/product-reviewsPulls customer reviews for one product when the rating alone does not settle the choice.$0.020 / callRp353 / call

Step by step

  1. Write a narrow query. Include brand, product and size or model. A query that matches how the product is named on the shelf returns fewer near matches. Decide whether results should follow one store location, and keep that setting for the whole run.
  2. Inspect and search one page. Have the agent run inspect_tool on the search tool to read its inputs, filters and price. Run the first page only and look at the columns before paging further.
  3. Keep the IDs and the context. Save the item ID, title, price, rating, review count and seller for every row, plus the query, the date and any store or location the response reports. The ID is what joins this search to later lookups and price checks.
  4. Shortlist by title, then by numbers. Remove rows that are a different product, size or pack. Then read rating and review count as separate columns, because two items with the same rating can rest on very different numbers of reviews.
  5. Fetch details for the shortlist. Send only the shortlisted IDs to serpapi/walmart/product for stock, offers and specs. Add serpapi/walmart/product-reviews for an item where you need to know why buyers rated it the way they did.
  6. Export two tables. Keep one table with a row per search result and a second with a row per detailed lookup, joined by item ID. Missing values stay blank, so a row that never got a detail call is not filled with guesses.

What does a Walmart product search API return?

Each row is a product listing with its item ID, title, price, rating, review count and usually the seller. Depending on the tool you also get availability, a thumbnail and the product page link. The response can also report a total result count for the query. That number describes the whole search, and the rows you downloaded are one page of it.

Which Walmart tool should I use for each job?

Search first when you do not know the item ID, and read the product page only for the items whose details change your decision.

JobToolWhat you get
Find candidates for a queryserpapi/walmart/searchListings with prices and ratings
Search with sort, price range or facet filtersanyapi/walmart.searchTitle, price, rating, seller and availability per product
Read one product in detailserpapi/walmart/productOffers, specs and ratings for a known item
Read what buyers saidserpapi/walmart/product-reviewsCustomer reviews for one product

Why do Walmart results change with location?

Walmart shows prices and stock for a store or delivery area, and a request that sets no location may resolve to a default store. Two calls in the same run can come back with different store context. Record the location each response reports, and if your question is about one area, set the location the same way on every call. The input schema lists the location options.

How do I stop the agent from fetching details for every result?

Give it two budgets: a page budget for search and a detail budget for product lookups. Deduplicate by item ID, remove mismatches, and fetch details only for the items still in the running. Ask the agent to report how many calls each step used.

When should I use something else?

For one product you are about to buy, the Walmart site is quicker. For seller account work such as listings, orders or inventory, you need Walmart's own seller tools, because these tools read public product information. To follow prices over weeks, Walmart price tracker adds dated storage and comparison.

What does it cost?

One query: two pages of search, details for 3 shortlisted items and reviews for 1 of them.

CallToolCountUSDIDR
Search, 2 pagesserpapi/walmart/search2$0.039Rp706
Product details, 3 itemsserpapi/walmart/product3$0.059Rp1.059
Reviews, 1 itemserpapi/walmart/product-reviews1$0.020Rp353
Total$0.117Rp2.118

Computed from list prices as of 2026-11-10. A run is held at its maximum and settled to the real cost, and a failed call is not charged. See how pricing works.

Questions

Can my agent search Walmart without a Walmart developer account?
Yes. The agent calls the Walmart tools with your 1ToolRing key and prepaid balance, so there is no separate Walmart account or vendor plan to set up. Discovery and inspection are free, and only a run is charged.
Is an empty Walmart search free?
It depends on the tool. A search that completes with zero results can still count as a run, while a provider error is not charged. Test one query from your list before the loop: zero results often mean the wording is too narrow, and fixing it early saves calls.
Can I sort or filter Walmart results by price?
Yes. anyapi/walmart.search takes optional sort, price range, facet and page filters. The agent reads the exact filter names with inspect_tool before the run.
Can I get Walmart product reviews?
Yes. serpapi/walmart/product-reviews returns customer reviews for one product. Pull them for shortlisted items only, and say how many reviews a summary is based on.
How do I get the Walmart item ID for a product?
Search by name with serpapi/walmart/search and take the ID from the row whose brand, size and model match. Save it as text with the query and date, so later detail calls and price checks use the same item.