✓ Verified 🌐 Web Scrapers ✓ Enhanced Data

Kroger

Search Kroger products and add items to a Kroger cart via the Kroger API.

Rating
4 (164 reviews)
Downloads
1,188 downloads
Version
1.0.0

Overview

Search Kroger products and add items to a Kroger cart via the Kroger API.

Complete Documentation

View Source →

Kroger

Search products, add to cart, and find store locations via the Kroger public API.

Prerequisites

  • Kroger developer account at https://developer.kroger.com
  • Registered application with Product and Cart API access
  • OAuth redirect URI configured in the Kroger app settings

Environment Variables

Set these before using:

bash
export KROGER_CLIENT_ID="your-client-id"
export KROGER_CLIENT_SECRET="your-client-secret"

Optional:

  • KROGER_TOKEN_FILE — token storage path (default: ~/.kroger-tokens.json)
  • KROGER_REDIRECT_URI — OAuth callback URL (default: http://localhost:8888/callback)
  • KROGER_LOCATION_ID — store ID for location-specific product availability

Setup (One-Time)

1. Register a Kroger Developer App

  • Go to https://developer.kroger.com
  • Create an application
  • Enable Product and Cart scopes
  • Set redirect URI to http://localhost:8888/callback
  • Note Client ID and Client Secret

2. Authenticate

Run the auth flow — opens a browser for Kroger login:

bash
scripts/kroger.sh auth

If the redirect URI isn't localhost (e.g., cloud-hosted), use the manual flow:

  • Open the AUTH_URL printed by scripts/kroger.sh auth
  • Log in at Kroger
  • Copy the redirected URL (even if the page errors)
  • Extract the code parameter and run:
bash
scripts/kroger.sh exchange <code>

Tokens auto-refresh. Re-auth only needed if refresh token expires.

Actions

Search products

bash
scripts/kroger.sh search "cannellini beans"

Returns up to 5 results with product IDs, descriptions, and brands.

Add to cart

bash
scripts/kroger.sh add <productId> [quantity]

Requires prior OAuth login. Quantity defaults to 1.

Find nearby stores

bash
scripts/kroger.sh locations <zipcode>

Returns up to 5 stores with location IDs. Set KROGER_LOCATION_ID to filter product search by store.

Check auth status

bash
scripts/kroger.sh token

Workflow: Grocery List → Cart

Typical flow for adding a grocery list to Kroger:

  • Search each item: scripts/kroger.sh search ""
  • Pick the best match from results
  • Add to cart: scripts/kroger.sh add
  • Repeat for all items
When adding many items, batch all searches first, then confirm selections with the user, then add all to cart.

Installation

Terminal bash

openclaw install kroger
    
Copied!

💻Code Examples

export KROGER_CLIENT_SECRET="your-client-secret"

export-krogerclientsecretyour-client-secret.txt
Optional:
- `KROGER_TOKEN_FILE` — token storage path (default: `~/.kroger-tokens.json`)
- `KROGER_REDIRECT_URI` — OAuth callback URL (default: `http://localhost:8888/callback`)
- `KROGER_LOCATION_ID` — store ID for location-specific product availability

## Setup (One-Time)

### 1. Register a Kroger Developer App

1. Go to https://developer.kroger.com
2. Create an application
3. Enable **Product** and **Cart** scopes
4. Set redirect URI to `http://localhost:8888/callback`
5. Note Client ID and Client Secret

### 2. Authenticate

Run the auth flow — opens a browser for Kroger login:

scripts/kroger.sh auth

scriptskrogersh-auth.txt
If the redirect URI isn't localhost (e.g., cloud-hosted), use the manual flow:
1. Open the `AUTH_URL` printed by `scripts/kroger.sh auth`
2. Log in at Kroger
3. Copy the redirected URL (even if the page errors)
4. Extract the `code` parameter and run:

scripts/kroger.sh exchange <code>

scriptskrogersh-exchange-code.txt
Tokens auto-refresh. Re-auth only needed if refresh token expires.

## Actions

### Search products

scripts/kroger.sh search "cannellini beans"

scriptskrogersh-search-cannellini-beans.txt
Returns up to 5 results with product IDs, descriptions, and brands.

### Add to cart

scripts/kroger.sh add <productId> [quantity]

scriptskrogersh-add-productid-quantity.txt
Requires prior OAuth login. Quantity defaults to 1.

### Find nearby stores

scripts/kroger.sh locations <zipcode>

scriptskrogersh-locations-zipcode.txt
Returns up to 5 stores with location IDs. Set `KROGER_LOCATION_ID` to filter product search by store.

### Check auth status

Tags

#search_and-research #api

Quick Info

Category Web Scrapers
Model Claude 3.5
Complexity One-Click
Author tongyanli-hash
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install kroger