API & MCP

Everything a person can do on Bulk Buy Brain, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Bulk Buy Brain

Compare a small pack with a bulk pack using how fast you actually use the product, its shelf life, storage cost and the interest your money could earn. The tool computes the effective cost per unit you actually use, your saving or loss, and the largest bulk size worth buying.

Inputs of Bulk Buy Brain
FieldTypeDefaultDescription
currencytext"EUR"Currency. Shown in results only; no conversion is performed.
unitLabeltext"units"Unit
smallPrice (required)number3Small pack price
smallQuantity (required)number1Small pack quantity
bulkPrice (required)number20Bulk pack price
bulkQuantity (required)number10Bulk pack quantity
consumptionPerWeek (required)number1You use per week
shelfLifeWeeksnumber—Shelf life once bought. Leave empty for non-perishables.
storageCostPerWeeknumber0Storage cost of the bulk pack. Optional: freezer energy, rented space…
interestRatePercentnumber3Interest your cash could earn

Example request

Toilet paper: 8 rolls vs 48 rolls

curl -X POST https://bulkbuybrain.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","unitLabel":"rolls","smallPrice":3.49,"smallQuantity":8,"bulkPrice":17.99,"bulkQuantity":48,"consumptionPerWeek":3,"storageCostPerWeek":0,"interestRatePercent":3}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "bulk-buy-brain": { "type": "http", "url": "https://bulkbuybrain.usefulweb.site/mcp" }
  }
}