TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jbms/finance-dl/llms.txt
Use this file to discover all available pages before exploring further.
finance_dl.amazon scraper downloads order invoices from your Amazon account using selenium and chromedriver. Both regular and digital order invoices are saved as individual HTML files, making them easy to archive, search, and import into accounting workflows. You can target specific order groups — such as a particular year or the past three months — to keep incremental runs fast.
Configuration Parameters
A dictionary containing your Amazon account login credentials.
Path on the local filesystem where invoice HTML files will be written. The directory is created automatically if it does not already exist.
Path to a persistent Chrome browser profile directory used exclusively for this scraper. Do not point this at your regular browser profile. When omitted, a fresh temporary profile is used on every run.
When
True, invoice files are placed inside a per-year subdirectory of output_directory (e.g., output_directory/2023/). Useful for filesystems that slow down with very large flat directories.The Amazon domain from which to download orders. Must be one of
'.com', '.co.uk', or '.de'. Defaults to '.com'.On non-
.com domains, digital orders do not have a separate order menu and are downloaded together with regular orders when regular is True.When
True, downloads regular (physical) order invoices. On domains other than .com, setting this to True also downloads digital orders since Amazon does not separate them there.When
True, downloads digital order invoices. This parameter is only effective when amazon_domain is '.com'; on other domains, digital orders are handled by the regular flag. Set to False or None to skip digital orders on .com.A list of Amazon order page “order groups” to scan. Order groups correspond to the filter options on Amazon’s Orders page, such as years (e.g.,
'2020', '2021') or rolling windows ('last 30 days', 'past 3 months'). When omitted, all available order groups are scanned.When
True, invoices for preorders that have not yet been charged are downloaded. These invoices incorrectly claim that a card has been charged before it actually has, and they are later replaced by correct invoices once the order ships. Leaving this unset (or setting it to False) is recommended for accounting purposes.Preorder invoices are misleading for bookkeeping: they assert a charge was made when it has not been yet. They are replaced by accurate invoices when the order fulfils.
Output Format
Each invoice is saved tooutput_directory (or a per-year subdirectory when dir_per_year is True) as a single HTML file. The filename is derived from the Amazon order ID:
| Order type | Example filename |
|---|---|
| Regular order | 166-7926740-5141621.html |
| Digital order | D56-5204779-4181560.html |