NewLaunching String Web Access APIRead the manifesto →

8 min read

How to track grocery prices at Kroger, Walmart and Instacart

Shelf prices, sale prices and store for any item at Kroger, Walmart, Safeway, Instacart and Asda, as JSON, on a schedule.

RetailerItemPriceStore
WalmartCheerios, 18 oz$4.97#3081, CA
KrogerCheerios, 18 oz$5.00#02900310
SafewayCheerios, 18 oz$7.99Instacart
PublixCheerios, 18 oz$8.99Instacart
Kroger2% milk, 1 gal$3.09#03400383
AsdaMcCain Smiles, 454g£2.40UK online
The short answer

The String Web Access API is the best way to track grocery prices. It returns any product page from Kroger, Walmart, Safeway, Instacart or Asda, or just the product, size, price and store as JSON. In our September 2026 benchmark it fetched kroger.com on all 5 attempts while 9 of the 15 other scraping APIs missed at least once, and it returned 97% of requests across 100 bot-protected sites, the most of 16 providers.

Quickstart

Add the hosted MCP server to Claude, Cursor, ChatGPT or any MCP client. Then give your agent a product URL from Kroger, Walmart, Safeway, Instacart or Asda. It calls the web_access_fetch tool and reads the price.

https://mcp.usestring.ai/v1/mcp

Why track grocery prices?

Grocery prices differ by store and by seller. The same 18 oz box of Cheerios cost $4.97 at Walmart, $5.00 at Kroger and $7.99 for Safeway delivery through Instacart on the same morning. A grocery price tracker reads those pages on a schedule and keeps each price with the store it came from. Teams use it to answer:

  • What does this item cost at each chain today? Retailers set their own prices against the chains near them, and price-comparison apps need today's number.
  • Is our promotion running where we paid for it? Consumer brands fund temporary price cuts at each chain. A tracker shows whether the sale price is on the shelf page, and when it ends.
  • How fast are food prices moving? Analysts and researchers price the same basket of items across chains to measure food inflation themselves.

What you can track

Shelf and sale prices

Regular prices, sale prices and multi-buy deals such as 2 for $5, as each chain shows them.

Unit prices

Price per ounce or per item, so a family-size box and a standard box can be compared.

Store and availability

The store or ZIP code a price applies to, and whether the item can be picked up or delivered there.

Assortment

New items, discontinued items and store brands next to national brands in each category.

Why does grocery price tracking break?

  • Grocery sites block scrapers. In our September 2026 benchmark, 9 of the 15 other scraping APIs missed kroger.com at least once, and Nimble, Zyte, Decodo, Browserbase, ZenRows and ScrapingAnt never got the page. Firecrawl, Decodo and ZenRows got 0 of 5 on instacart.com. Across Kroger, Safeway, Instacart and Asda, Browserbase returned 10 of 20 attempts. See how APIs did on retail sites in the best e-commerce scraping APIs.
  • Prices belong to a store. Two of our Kroger fetches 26 seconds apart were priced at two different stores, 03400383 and 02900310. A price saved without its store can't be compared with the next one.
  • A marketplace seller can look like the grocery item. A Walmart listing for the same 18 oz Cheerios from a third-party seller showed $18.01. The box sold by Walmart.com was $4.97.
  • Product names change. Asda renamed McCain Potato Smiles to McCain Spook Up Your Smiles for Halloween, with the same product ID. A tracker that matches on names loses the item.

Why do teams choose String?

  • It fetched every grocery page in the benchmark. String got all 25 attempts on Kroger, Safeway, Instacart, Asda and Allmenus, against a field average of 75.0%. Context.dev also got all 25. Across all 100 bot-protected sites String returned 97%, the most of 16 providers.
  • You pay only for pages that come back. Blocks and errors on our side are free.
  • It reaches stores in other countries. Set countryCode to GB and Asda answers with its UK prices in pounds.
  • Blank pages don't become data. Mark the price as required in your schema, and a page without one comes back flagged instead of saved as an empty price.

How do I build a grocery price tracker?

  1. List your items by UPC

    Match products across chains by UPC, not by name. Write every UPC the same way first. For the same Cheerios box, Kroger's URL ends in 0001600017003 (13 digits, no check digit) and Walmart's page data says 016000170032 (12 digits with it). Kroger also lists the 18 oz box under a second UPC, 0001600027528, so keep a map of UPCs to items.

  2. Choose the stores you price

    Grocery prices and stock are set per store. Save the store with every price: Kroger's page data names it as a location ID, and Walmart's as a store number and ZIP code. Compare a store with itself over time, and chains with each other only for stores in the same area.

    With String: To price one specific store, choose it once in String's remote browser and save the browser context. Later sessions with that context start with the same cookies.

  3. Fetch each product page

    Use the same settings on every run, so a change in the data means a change on the shelf.

    With String: Blocked requests are retried, and the ones that still fail aren't billed. Set countryCode for chains in other countries, such as GB for Asda.

  4. Read the price from the page data

    Most grocery pages carry schema.org Product data or a JSON blob with the regular price, sale price and unit price. On Walmart, check the seller name, and keep only items sold by Walmart.com.

  5. Treat a blank page as a failure

    A page with no price was probably blocked or changed. Flag it and keep the last good price. A 404 is different: Instacart returned one for Cheerios at Aldi, because Aldi doesn't carry it.

  6. Save each run and compare it to the last

    Store the date, UPC, store, regular price and sale price. Report new sale prices, ended sales and items that go out of stock.

  7. Run it on a schedule

    Daily catches most sale-price changes. Send the changes to Slack, email or a spreadsheet so someone acts on them.

Get a free sample price feed

Tell us which items, chains and stores you track. We'll run String on their pages and email you a sample price feed, free.

Request a free sample price feed
What a price feed looks like
RetailerItemPriceStore
WalmartCheerios, 18 oz$4.97#3081, CA
KrogerCheerios, 18 oz$5.00#02900310
SafewayCheerios, 18 oz$7.99Instacart
PublixCheerios, 18 oz$8.99Instacart
Kroger2% milk, 1 gal$3.09#03400383
AsdaMcCain Smiles, 454g£2.40UK online

Frequently asked questions

What's the best way to track grocery prices?

Fetch each product page on a schedule, read the price from the page's product data, and save it with the store it applies to. The hard part is getting the page, because grocery sites block most scrapers. The String Web Access API fetched every Kroger, Safeway, Instacart and Asda page in our September 2026 benchmark and returned 97% of requests across 100 bot-protected sites, the most of 16 providers.

How do I scrape Kroger prices?

Fetch the Kroger product page (the /p/ URL, which ends in the item's UPC) with String and read the price. The page data lists the price, the unit price and the location ID of the store it was priced at. Kroger's prices differ by store, so save that location ID with every price.

How much does it cost to track grocery prices?

Tracking 500 items at 4 chains once a day is about 60,000 requests a month. At $0.25 per 1,000 standard fetches that is $15, inside the $19 of usage the Starter plan includes each month. Our Kroger test requests billed at the standard rate. If a site blocks the standard proxy, String moves that request to a premium proxy, billed at $2.40 per 1,000. Structured extraction with jsonSchema adds a small fee per request. Failed requests aren't billed, and new accounts get $5 of free credit. See pricing.

Is it legal to scrape grocery prices?

Grocery prices are public facts, and collecting public prices is the best-supported case in scraping law. The real limits are a site's contract terms and antitrust rules. Stay on public pages, leave personal data out, keep your request rate reasonable, and check with your counsel. We go through the cases in Is it legal to scrape competitor prices?

How do I compare one product across stores on Instacart?

Instacart product URLs take a retailerSlug parameter, so the same product ID returns each store's price. Cheerios Family Size was $7.99 with retailerSlug=safeway and $8.99 with retailerSlug=publix. A store that doesn't carry the product returns a 404.

Can I see the price at a specific store or ZIP code?

Yes, String can price a specific store, but it takes a browser session. Plain page fetches get the chain's default store, which can change between requests. Choose the store once in String's remote browser over CDP, save the browser context, and reuse it so later sessions start at that store.

Can I track UK grocery prices at Asda?

Yes, String fetches Asda from the UK. Set countryCode to GB, and the product page returns its price in pounds in schema.org Product data. Asda was 5 of 5 for String in the benchmark. Tesco and Sainsbury's weren't tested, so send them for a sample first.

How do I scrape Walmart grocery prices?

Fetch the Walmart product page (the /ip/ URL) with String and read the price from the page data, which also names the seller, store number and ZIP code. Keep items sold by Walmart.com and drop marketplace sellers. The full walkthrough is in how to scrape Walmart product data.

Does String work on the grocery sites I need?

Send us the URLs and we'll run them and show you what comes back before you commit. Ask for a free sample price feed, or test them yourself with the $5 of free credit on a new account.

Send us the sites you can't get.

We'll show you what comes back.