bankstatementconverter
v1.0.0
Published
Convert PDF bank statements to CSV or JSON from the command line, using the Bank Statement Converter API
Maintainers
Readme
bankstatementconverter
Convert PDF bank statements to CSV or JSON from the command line, using the Bank Statement Converter API.
Requires Node.js 20 or later and a Bank Statement Converter API key, which you can find at https://bankstatementconverter.com/settings.
Install
npm install -g bankstatementconverterThis installs the bsc command (also available as bankstatementconverter). To run it without
installing, use npx bankstatementconverter <command>.
Quick start
bsc set-api-key # asks for your API key and saves it
bsc convert statement.pdf # writes ./statement.csvconvert uploads the PDF, asks for the password if the PDF is protected, waits while scanned
PDFs are processed, then writes the result to the current directory.
bsc convert a.pdf b.pdf # writes both statements to ./statements.csv
bsc convert a.pdf b.pdf --split # writes ./a.csv and ./b.csv
bsc convert statement.pdf -f JSON # writes ./statement.json
bsc convert statement.pdf -o - # prints to stdout
bsc credits # shows your remaining creditsExisting files are never overwritten: if statement.csv already exists, the result is written to
statement (1).csv, then statement (2).csv, and so on. Passing -o <file> writes to exactly
that file.
Commands
| Command | Description |
|---|---|
| set-api-key [key] | Save your API key (asks for it if not given) |
| convert <pdf...> | Upload, unlock, wait for and convert PDF statements |
| convert <uuid...> | Convert statements that were already uploaded |
| upload <pdf...> | Upload PDF statements and print their status |
| status <uuid...> | Print the status of uploaded statements |
| set-password <uuid> <password>... | Provide passwords for protected PDFs |
| credits | Show your account and remaining credits |
Options
| Option | Description |
|---|---|
| -k, --api-key <key> | API key. Defaults to $BSC_API_KEY, then the key saved by set-api-key |
| -f, --format <format> | CSV (default) or JSON |
| --raw | Return all columns instead of normalised records |
| -o, --output <file> | File to write to, or - for stdout |
| --split | Write each statement to its own file instead of combining them |
| -p, --password <pw> | Password to try for protected PDFs. Without it you are asked per file |
| --base-url <url> | API base URL. Defaults to $BSC_API_URL or the production API |
| -h, --help | Show help |
The API key is saved to ~/.config/bsc/config.json (or $XDG_CONFIG_HOME/bsc/config.json),
readable only by you.
