Skip to main content

Unofficial Lidl Plus API client

Project description

iLidl

Unofficial Python client and CLI for the Lidl Plus API. Fetch receipts, parse item details, and manage coupons.

Installation

pip install ilidl

# Or with uv
uv add ilidl

# With auth support (requires Playwright for login)
pip install "ilidl[auth]"
playwright install chromium

Authentication

ilidl login

Opens 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.

CLI Usage

# 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 coupon

All commands support --json for machine-readable output.

Library Usage

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})")

Configuration

Stored at ~/.config/ilidl/config.toml:

[auth]
refresh_token = "..."

[account]
language = "en"
country = "GB"

Notes

  • UK receipts are returned as HTML by the API and parsed into structured items using data-* attributes.
  • The App-Version header must be a realistic value (currently 16.45.5). The API rejects fake versions.
  • API v2 is used for receipt lists, v3 for receipt detail.
  • This project replaces the upstream lidl-plus library which is broken on modern Python.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ilidl-0.2.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ilidl-0.2.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file ilidl-0.2.0.tar.gz.

File metadata

  • Download URL: ilidl-0.2.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ilidl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c5c4aae86758047e9cd86f9d46e68cfa79dbd294ff2c7667d7335b18ec9f4c6a
MD5 c84ad12108b181214b365fb1e0828071
BLAKE2b-256 d4b91ee5583a233d4c95b2ccd6b701008072f34073948699ebdcb2425bb4f50d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ilidl-0.2.0.tar.gz:

Publisher: publish.yml on RoryDotGG/iLidl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ilidl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ilidl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ilidl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c853871b3fd780b92bc1ff6c1c759c47c469d1187fe7dbc5d8047dba201be9ef
MD5 65dd62a710b2e578929495c324080538
BLAKE2b-256 a687bdd815df045d0291cceac8aefa50b7c2d3e41ef84bd1d387c7ff0aec45b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ilidl-0.2.0-py3-none-any.whl:

Publisher: publish.yml on RoryDotGG/iLidl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page