Make your Amazon data export readable.
Amazon lets you download your own data ("Request my data"), but what arrives is a ZIP full of cryptically named CSV files that almost nobody can actually read. OrderLens takes that export — or the simpler "Order reports" CSV from your account — and turns it into clean exports and meaningful statistics about your own buying behaviour: what you spent, when, on what, and how much came back as refunds.
Everything runs offline and locally. No login, no scraping, no cloud. Your purchase history never leaves your machine — which is rather the point when the data is a list of everything you've ever bought.
OrderLens can render a single, self-contained HTML report with interactive
charts (spending over time, by category, biggest orders) plus tables of your top
items and merchants. A generated example lives at
examples/sample-report.html — download it and
open it in any browser; it works with no internet connection.
- ✅ Clean exports as CSV, Excel (XLSX) and JSON
- ✅ Spending stats: per year, per month, per category, top merchants, top items
- ✅ Returns/refunds detected and netted against spending
- ✅ A self-contained HTML report with charts
- ✅ Reads both the GDPR export ZIP and the order-report CSV (auto-detected)
- ✅ A small, well-documented CLI — no config, no database, no server
You have two options; OrderLens accepts either.
Option A — Order reports (quick):
- Go to Amazon → Account → "Download order reports" (amazon.de: Mein Konto → Bestellberichte herunterladen).
- Pick a date range and request an "Items" report.
- Download the CSV when it's ready.
Option B — Full GDPR export (everything):
- Go to Amazon → Account → Privacy → "Request my data" (amazon.de: Meine Daten anfordern) — or visit https://www.amazon.de/gp/privacycentral/dsar/preview.html.
- Choose "Your Orders" (or "Request all your data").
- Amazon emails you a download link, usually within a day or two. Save the ZIP.
A detailed, screenshot-friendly walk-through is in
docs/getting-your-amazon-data.md.
pip install .Or, to keep it isolated:
pipx install .This installs the orderlens command. Python 3.10+ is required.
# Print a summary table to the terminal
orderlens stats my-orders.csv
# Export to CSV / JSON / Excel — the format is taken from the output extension
orderlens export my-orders.csv -o orders.csv
orderlens export my-orders.csv -o orders.json
orderlens export my-orders.csv -o orders.xlsx
# Render a self-contained HTML report
orderlens report amazon_gdpr_export.zip -o report.html
# Smaller report that loads plotly.js from a CDN instead of inlining it
orderlens report my-orders.csv -o report.html --onlineThe input can be the GDPR export ZIP or an order-report CSV — OrderLens detects which one it's looking at by content, not by file name.
OrderLens summary
=================
Orders : 5
Items : 9
Returns : 1
Gross spending: EUR 187.32
Refunds : EUR 24.90
Net spending : EUR 162.42
By year
2023: EUR 73.37
2024: EUR 113.95
Top categories
Electronics EUR 101.97
Home EUR 34.95
Grocery EUR 25.50
OrderLens never makes a network request. It reads the file you point it at,
writes the output you ask for, and that's it. Nothing is uploaded, logged or
phoned home. The HTML report inlines its own JavaScript so even the report opens
without a connection (use --online if you'd rather keep the file small).
The amounts look wrong / are 0. Your export probably uses column names OrderLens doesn't recognise yet. The normaliser handles German and English headers for both export types — please open an issue with your (anonymised) header row and it can be added.
My refunds aren't subtracted. Refunds are detected from negative amounts or "return/refund/Erstattung/Retoure" wording. If yours look different, open an issue.
The HTML report is several MB. That's plotly.js inlined so the file works
offline. Pass --online to load it from a CDN and shrink the file to a few KB.
Does this work without internet? Yes — that's the whole idea.
Bug reports and pull requests are welcome — see CONTRIBUTING.md.
MIT — see LICENSE.