Unofficial Python client and CLI for the Lidl Plus API. Fetch receipts, parse item details, and manage coupons.
pip install ilidl
# Or with uv
uv add ilidl
# With auth support (requires Playwright for login)
pip install "ilidl[auth]"
playwright install chromiumilidl loginOpens a browser window to complete the Lidl Plus OAuth flow. You'll be prompted for your phone number and password, then a verification code. A refresh token is saved to ~/.config/ilidl/config.toml for future use.
A visible browser is required because Lidl's login uses reCAPTCHA Enterprise, which blocks headless browsers.
# Receipts
ilidl receipt latest # Most recent receipt
ilidl receipt latest --json # As JSON
ilidl receipt <id> # Specific receipt
ilidl receipts # List all receipts
ilidl receipts --from 2026-03-01 # Filter by date
ilidl receipts --to 2026-03-18
# Coupons
ilidl coupons list # List available coupons
ilidl coupons activate <id> # Activate a coupon
ilidl coupons activate --all # Activate all coupons
ilidl coupons deactivate <id> # Deactivate a couponAll commands support --json for machine-readable output.
from ilidl import LidlClient
client = LidlClient(refresh_token="...", country="GB", language="en")
# Get latest receipt with parsed items
receipt = client.latest_receipt()
for item in receipt.items:
print(f"{item.name}: {item.price}")
# List coupons
for coupon in client.coupons():
print(f"{coupon.title} (active: {coupon.is_activated})")Stored at ~/.config/ilidl/config.toml:
[auth]
refresh_token = "..."
[account]
language = "en"
country = "GB"- UK receipts are returned as HTML by the API and parsed into structured items using
data-*attributes. - The
App-Versionheader must be a realistic value (currently16.45.5). The API rejects fake versions. - API v2 is used for receipt lists, v3 for receipt detail.
- This project replaces the upstream
lidl-pluslibrary which is broken on modern Python.