Spending

Get Spending By Period

GET
/v1/households/{household_id}/analytics/spending-by-period

Groups income and expenses into daily, monthly, quarterly, or yearly periods over an inclusive date range, in the household's reporting currency. Empty periods are included with zero totals.

Each category is placed on the income or expense side by its net sign; uncategorized credits and debits stay on their own sides rather than netting. Excludes transfer categories, hidden or deleted transactions, deleted accounts, and split parents (their children count instead). Pending transactions are included. Only transactions inside the requested dates count, even for partial calendar periods.

Authorization

PersonalApiToken
AuthorizationBearer <token>

Personal API token (penny_pat_…). Paste only the token; the Bearer prefix is added automatically. Read-only tokens only allow read requests, and read/write tokens follow your current household membership and role. See https://penny.finance/docs/api#authentication.

In: header

Path Parameters

household_id*string

ID of the household that owns the resource. GET /v1/households lists the households you can access.

Query Parameters

start_date*string

First day of the range, inclusive, as YYYY-MM-DD. Transactions are selected by their date.

Formatdate
end_date*string

Last day of the range, inclusive, as YYYY-MM-DD. If it is earlier than start_date, no transactions match; this is not an error.

Formatdate
merchant_ids?array<string>

Comma-separated merchant IDs, such as Mr9dL3xT6bQa,Mr4hT7wK2cNe; repeating the parameter for each ID also works. Limits the results to transactions at one of these merchants.

tag_ids?array<string>

Comma-separated tag IDs, such as Tg8qN1cK5rWd,Tg2bX6mJ9pHs; repeating the parameter for each ID also works. Limits the results to transactions that have at least one of these tags.

category_ids?array<string>

Comma-separated category IDs, such as Ct5nR8wY1jFu,Ct3dM7qA9sXe; repeating the parameter for each ID also works. Limits the results to transactions assigned to one of these categories.

category_group_ids?array<string>

Comma-separated category group IDs, such as Cg2mV7pL4zXe,Cg6tJ1nR8dKa; repeating the parameter for each ID also works. Limits the results to transactions whose category is in one of these category groups.

account_ids?array<string>

Comma-separated account IDs, such as Ac7kP2mN9qRs,Ac4tW8bL1xDv; repeating the parameter for each ID also works. Limits the results to transactions in these accounts.

uncategorized?boolean

Whether to limit the results to transactions that have no category (true) or to those that have one (false). When true, category_ids is ignored. Omit it to include both.

unknown_merchant?boolean

Whether to limit the results to transactions that have no merchant (true) or to those that have one (false). When true, merchant_ids is ignored. Omit it to include both.

needs_review?boolean

Whether to limit the results to transactions flagged for review (true) or to those not flagged (false). Omit it to include both.

min_amount?string

Interpreted in the household's currency. Transaction amounts in other currencies are converted before the filter is applied. Amounts and thresholds are rounded to the currency minor unit using half-even rounding for comparison.

Match(?:^[+-]?(?:(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?)$)$
max_amount?string

Interpreted in the household's currency. Transaction amounts in other currencies are converted before the filter is applied. Amounts and thresholds are rounded to the currency minor unit using half-even rounding for comparison.

Match(?:^[+-]?(?:(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?)$)$
time_segment*TimeSegment

Size of the calendar periods the range is divided into. The response has one entry in periods for every period that overlaps the range.

Value in

  • "daily"
  • "monthly"
  • "quarterly"
  • "yearly"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.penny.finance/v1/households/Hh4vK8pQ2sLm/analytics/spending-by-period?start_date=2026-08-01&end_date=2026-08-31&time_segment=monthly" \  -H "Authorization: Bearer $PENNY_API_TOKEN"
{  "periods": [    {      "period": "2026-08",      "income": {        "total": {          "amount": "5200.00",          "currency": "USD"        },        "transaction_count": 2,        "category_breakdown": [          {            "category_id": "Ct9bH2kM4wPz",            "category_name": "Salary",            "total": {              "amount": "5200.00",              "currency": "USD"            },            "transaction_count": 2,            "emoji": "💼"          }        ]      },      "expenses": {        "total": {          "amount": "-450.92",          "currency": "USD"        },        "transaction_count": 12,        "category_breakdown": [          {            "category_id": "Ct5nR8wY1jFu",            "category_name": "Groceries",            "total": {              "amount": "-312.75",              "currency": "USD"            },            "transaction_count": 5,            "emoji": "🥬"          },          {            "category_id": "Ct3xD6gQ8mVs",            "category_name": "Dining Out",            "total": {              "amount": "-78.00",              "currency": "USD"            },            "transaction_count": 4,            "emoji": "🍣"          },          {            "category_id": "Ct8fK2rB6yNd",            "category_name": "Subscriptions",            "total": {              "amount": "-17.99",              "currency": "USD"            },            "transaction_count": 1,            "emoji": "📺"          },          {            "category_id": null,            "category_name": null,            "total": {              "amount": "-42.18",              "currency": "USD"            },            "transaction_count": 2,            "emoji": null          }        ]      },      "net": {        "amount": "4749.08",        "currency": "USD"      }    }  ]}