{"skill":{"slug":"amazon-orders","displayName":"Amazon Orders","summary":"Download and query your Amazon order history via an unofficial Python API and CLI.","description":"---\nname: amazon-orders\ndescription: Download and query your Amazon order history via an unofficial Python API and CLI.\nhomepage: https://github.com/alexdlaird/amazon-orders\nmetadata: {\"clawdbot\":{\"emoji\":\"📦\",\"requires\":{\"bins\":[\"python3\",\"pip3\"],\"env\":[\"AMAZON_USERNAME\", \"AMAZON_PASSWORD\", \"AMAZON_OTP_SECRET_KEY\"]}}}\n---\n\n# amazon-orders Skill\n\nInteract with your Amazon.com order history using the unofficial `amazon-orders` Python package and CLI.\n\n> Note: `amazon-orders` works 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. \n\n## Setup\n\n### Install / upgrade\n```bash\npython3 -m pip install --upgrade amazon-orders\n```\n(Install details and version pinning guidance are in the project README.) \n\n### Authentication options\n\n`amazon-orders` can get credentials from (highest precedence first): environment variables, parameters passed to `AmazonSession`, or a local config. \n\nEnvironment variables:\n```bash\nexport AMAZON_USERNAME=\"you@example.com\"\nexport AMAZON_PASSWORD=\"your-password\"\n# Optional: for accounts with OTP/TOTP enabled\nexport AMAZON_OTP_SECRET_KEY=\"BASE32_TOTP_SECRET\"\n```\n(OTP secret key usage is documented by the project.) \n\n## Usage\n\nYou can use `amazon-orders` either as a **Python library** or from the **command line**. \n\n### Python: basic usage\n\n```python\nfrom amazonorders.session import AmazonSession\nfrom amazonorders.orders import AmazonOrders\n\namazon_session = AmazonSession(\"<AMAZON_EMAIL>\", \"<AMAZON_PASSWORD>\")\namazon_session.login()\n\namazon_orders = AmazonOrders(amazon_session)\n\n# Orders from a specific year\norders = amazon_orders.get_order_history(year=2023)\n\n# Or use a time filter for recent orders\norders = amazon_orders.get_order_history(time_filter=\"last30\")     # Last 30 days\norders = amazon_orders.get_order_history(time_filter=\"months-3\")   # Past 3 months\n\nfor order in orders:\n    print(f\"{order.order_number} - {order.grand_total}\")\n```\n\n\n#### Full details (slower, more fields)\nSome order fields only populate when you request full details; enable it when you need richer order data:\n- Python: `full_details=True`\n- CLI: `--full-details` on `history` \n\n### CLI: common commands\n\n```bash\n# Authenticate (interactive / uses env vars if set)\namazon-orders login\n\n# Order history\namazon-orders history --year 2023\namazon-orders history --last-30-days\namazon-orders history --last-3-months\n```\n\n\n### Tips\n\n- If your account has MFA enabled, prefer setting `AMAZON_OTP_SECRET_KEY` for automated runs. \n- When automating, keep credentials out of shell history: use environment variables and a secret manager (1Password, Vault, GitHub Actions secrets, etc.).\n\n## Examples\n\n### Export yearly history to JSON\n```bash\namazon-orders history --year 2023 --full-details > orders_2023.json\n```\n\n### Quick totals check (requires jq)\n```bash\namazon-orders history --last-30-days --full-details   | jq -r '.[] | [.order_number, .grand_total] | @tsv'\n```\n\n## Notes\n\n- This is an unofficial scraper-based tool (no official Amazon API). \n- Official docs are hosted on Read the Docs for advanced usage and APIs (Orders, Transactions, etc.). \n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":1941,"installsAllTime":2,"installsCurrent":2,"stars":0,"versions":1},"createdAt":1770679863725,"updatedAt":1779076799822},"latestVersion":{"version":"1.0.0","createdAt":1770679863725,"changelog":"- Initial release of the amazon-orders skill.\n- Enables downloading and querying Amazon order history via an unofficial Python API and CLI.\n- Supports authentication using environment variables, interactive login, or config files.\n- Provides filtering for orders by year or time period (e.g., last 30 days, past 3 months).\n- Includes both Python library and CLI usage examples.\n- Adds guidance for handling MFA and exporting order data.","license":null},"metadata":{"setup":[{"key":"AMAZON_USERNAME","required":true},{"key":"AMAZON_PASSWORD","required":true},{"key":"AMAZON_OTP_SECRET_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"pfernandez98","userId":"s175jq9xfcfmvm4jeex2msetsd8851b9","displayName":"pfernandez98","image":"https://avatars.githubusercontent.com/u/54374282?v=4"},"moderation":null}