{
  "openapi": "3.0.1",
  "info": {
    "title": "Bank Statement Converter: PDF to CSV, Excel, QuickBooks & Xero",
    "description": "Convert bank and credit card statement PDFs and bank CSV exports into transactions: date, description, amount, running balance and currency. Every statement gets a balance check (opening + transactions = closing). Download CSV, Excel or JSON, plus QuickBooks, Xero and OFX files.",
    "version": "0.1",
    "x-build-id": "YbIMAoCiTkMgejQif"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/humble-echidna~bank-statement-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-humble-echidna-bank-statement-converter",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/humble-echidna~bank-statement-converter/runs": {
      "post": {
        "operationId": "runs-sync-humble-echidna-bank-statement-converter",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/humble-echidna~bank-statement-converter/run-sync": {
      "post": {
        "operationId": "run-sync-humble-echidna-bank-statement-converter",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "urls": {
            "title": "Statement URLs",
            "type": "array",
            "description": "Direct links to your statements, one per line: bank or credit card statement PDFs (with a text layer, as banks send them; scans aren't read) or CSV exports from your bank. Public web addresses only (http/https, ports 80 and 443), at most 1,000 per run. The file type is read from the file itself. The default is one synthetic sample statement (invented bank and account).",
            "default": [
              "https://whitehatharbor.com/statements/sample-statement.pdf"
            ],
            "items": {
              "type": "string"
            }
          },
          "exportFormats": {
            "title": "Also write accounting files",
            "type": "array",
            "description": "Optional files written per statement to the run's key-value store, ready to import: `quickbooks` (QuickBooks Online bank CSV: Date, Description, Amount), `xero` (Xero bank statement CSV) and `ofx` (OFX 2.2). Each statement's summary row links its files. Default none: the results table already downloads as CSV, Excel or JSON. Free.",
            "items": {
              "type": "string",
              "enum": [
                "quickbooks",
                "xero",
                "ofx"
              ],
              "enumTitles": [
                "QuickBooks Online CSV",
                "Xero CSV",
                "OFX (Quicken, QuickBooks Desktop, most finance apps)"
              ]
            },
            "default": []
          },
          "dateOrder": {
            "title": "Date order",
            "enum": [
              "auto",
              "MDY",
              "DMY"
            ],
            "type": "string",
            "description": "How numeric dates like 03/04/2026 are read: `auto` (default) works it out from the dates and the statement period; `MDY` is month first (US), `DMY` day first (UK, Europe, Australia). Set it when a CSV export's dates all fit both orders: those files are refused, not guessed.",
            "default": "auto"
          },
          "statementType": {
            "title": "Statement type",
            "enum": [
              "auto",
              "bank",
              "card"
            ],
            "type": "string",
            "description": "`auto` (default) detects bank account or credit card statements from the PDF. Set `bank` or `card` to skip detection; it decides signs on PDFs (card statements print charges as positive) and whether OFX files are bank or card files. CSV exports are marked `unknown` unless set.",
            "default": "auto"
          },
          "currency": {
            "title": "Currency",
            "pattern": "^([A-Za-z]{3})?$",
            "type": "string",
            "description": "Optional 3-letter ISO code, e.g. `GBP` or `EUR`, used instead of the one read from the statement. Set it for CSV exports that show no currency symbol or code: those are read as `USD`. Leave empty (the default) to use what the statement shows."
          },
          "invertCsvSigns": {
            "title": "Flip CSV signs",
            "type": "boolean",
            "description": "CSV exports only: flip every amount's sign, for exports that show money out as positive numbers (common for credit cards). Default false. In the output, money out is always negative. PDFs are never flipped.",
            "default": false
          },
          "maxPagesPerStatement": {
            "title": "Max pages per statement",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Refuse PDFs with more pages than this, before reading them: 1 to 200, default 100. A refused file is reported and not charged. Raise it for long business statements; split longer files.",
            "default": 100
          },
          "maxStatements": {
            "title": "Max statements per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many statements in total, e.g. 20 (a PDF holding several accounts counts each account). Minimum 1; leave empty (the default) for no limit. The run also stops cleanly at the maximum cost per run you set in the run options, whichever comes first."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}