# Output formats

Select a format with `?format=` on the REST API or the `format` argument of the MCP tool. JSON is the default and the only format that carries `balance_check` and `warnings`. If you need those and a file, call once with `json` and build the file yourself, or call twice.

| Format | For | Content-Type |
| --- | --- | --- |
| `json` | Code and agents | `application/json` |
| `csv` | Spreadsheets, most accounting tools | `text/csv; charset=utf-8` |
| `xero` | Xero bank statement import | `text/csv; charset=utf-8` |
| `qbo` | QuickBooks (Web Connect) | `application/vnd.intu.qbo` |
| `ofx` | Generic OFX importers | `application/x-ofx` |
| `qfx` | Quicken | `application/vnd.intu.qfx` |
| `qif` | Older tools | `application/qif` |

Excel (`.xlsx`) is available in the web app only.

## csv

- UTF-8 with a byte order mark, CRLF line endings, comma separated.
- Columns: `Date`, `Description`, `Amount`, and `Balance` when the statement has one.
- Dates are ISO. Amounts use a dot as decimal separator, no thousands separators, two decimals.
- Descriptions that start with `=`, `+`, `-` or `@` are prefixed with an apostrophe so spreadsheets do not run them as formulas.

## xero

A CSV with the header `*Date,*Amount,Payee,Description,Reference`. `Payee` and `Reference` are empty; the statement text goes in `Description`.

## qbo, ofx, qfx

OFX 1.02 in SGML form. `qbo` and `qfx` are the same file with an `INTU.BID` element, which QuickBooks and Quicken require.

Fixed values to be aware of:

- `INTU.BID` is `3000`, a widely used generic bank id. QuickBooks may ask the user to pick the bank.
- `BANKID` is `000000000`, `ACCTID` is `0000` and `ACCTTYPE` is `CHECKING`. The statement's real account details are not read.
- `CURDEF` is the detected currency, or `USD` when none was detected.
- `FITID` is derived from the row's position, date, amount and description, so the same PDF always produces the same ids.
- `NAME` is the description cut to 32 characters; the full text is in `MEMO`.
- Characters outside ASCII are replaced, because the header declares US-ASCII.
- `LEDGERBAL` is the last printed balance, or `0.00` when the statement has none.

Check a file before importing it with the `validate_ofx` MCP tool or the validator at https://extractivio.com/tools/qbo-validator.

## qif

`!Type:Bank`, one record per transaction with `D` (date as `MM/DD/YYYY`), `T` (amount) and `P` (description).

## json

See [Response and data model](https://extractivio.com/docs/response.md).
