Amazon Orders
/install amazon-orders
amazon-orders Skill
Interact with your Amazon.com order history using the unofficial amazon-orders Python package and CLI.
Note:
amazon-ordersworks by scraping/parsing Amazon's consumer website, so it can break if Amazon changes their pages. Only the English Amazon .com site is officially supported.
Setup
Install / upgrade
python3 -m pip install --upgrade amazon-orders
(Install details and version pinning guidance are in the project README.)
Authentication options
amazon-orders can get credentials from (highest precedence first): environment variables, parameters passed to AmazonSession, or a local config.
Environment variables:
export AMAZON_USERNAME="[email protected]"
export AMAZON_PASSWORD="your-password"
# Optional: for accounts with OTP/TOTP enabled
export AMAZON_OTP_SECRET_KEY="BASE32_TOTP_SECRET"
(OTP secret key usage is documented by the project.)
Usage
You can use amazon-orders either as a Python library or from the command line.
Python: basic usage
from amazonorders.session import AmazonSession
from amazonorders.orders import AmazonOrders
amazon_session = AmazonSession("\x3CAMAZON_EMAIL>", "\x3CAMAZON_PASSWORD>")
amazon_session.login()
amazon_orders = AmazonOrders(amazon_session)
# Orders from a specific year
orders = amazon_orders.get_order_history(year=2023)
# Or use a time filter for recent orders
orders = amazon_orders.get_order_history(time_filter="last30") # Last 30 days
orders = amazon_orders.get_order_history(time_filter="months-3") # Past 3 months
for order in orders:
print(f"{order.order_number} - {order.grand_total}")
Full details (slower, more fields)
Some order fields only populate when you request full details; enable it when you need richer order data:
- Python:
full_details=True - CLI:
--full-detailsonhistory
CLI: common commands
# Authenticate (interactive / uses env vars if set)
amazon-orders login
# Order history
amazon-orders history --year 2023
amazon-orders history --last-30-days
amazon-orders history --last-3-months
Tips
- If your account has MFA enabled, prefer setting
AMAZON_OTP_SECRET_KEYfor automated runs. - When automating, keep credentials out of shell history: use environment variables and a secret manager (1Password, Vault, GitHub Actions secrets, etc.).
Examples
Export yearly history to JSON
amazon-orders history --year 2023 --full-details > orders_2023.json
Quick totals check (requires jq)
amazon-orders history --last-30-days --full-details | jq -r '.[] | [.order_number, .grand_total] | @tsv'
Notes
- This is an unofficial scraper-based tool (no official Amazon API).
- Official docs are hosted on Read the Docs for advanced usage and APIs (Orders, Transactions, etc.).
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install amazon-orders - 安装完成后,直接呼叫该 Skill 的名称或使用
/amazon-orders触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Amazon Orders 是什么?
Download and query your Amazon order history via an unofficial Python API and CLI. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1238 次。
如何安装 Amazon Orders?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install amazon-orders」即可一键安装,无需额外配置。
Amazon Orders 是免费的吗?
是的,Amazon Orders 完全免费(开源免费),可自由下载、安装和使用。
Amazon Orders 支持哪些平台?
Amazon Orders 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Amazon Orders?
由 pfernandez98(@pfernandez98)开发并维护,当前版本 v1.0.0。