API & MCP

Everything a person can do on Sizewise How Many Fit, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Sizewise How Many Fit

Counts how many of one thing fit in another by length, by area, by volume (with the packing fractions of real spheres) or as whole boxes stacked in layers, using Wikidata sizes or your own dimensions.

Inputs of Sizewise How Many Fit
FieldTypeDefaultDescription
itemtext"Earth"What to fit. An object from the list, or your own: “Box = 40 × 30 × 20 cm”, “Ball = ⌀ 22 cm” or “Rope = 12 m”.
containertext"Sun"Where to fit it. Same choices as above, for example “Room = 5 × 4 × 2.5 m”.
modeselect (volume, area, length, boxes)"volume"Count by
packingselect (none, random, densest)"none"Gaps between round things
keepUprightbooleanfalseKeep boxes upright. Whole boxes only: the third dimension stays vertical (pallets, fridges).

Example request

Earths in the Sun

curl -X POST https://sizewisefitcount.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"item":"Earth","container":"Sun","mode":"volume","packing":"none"}'

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": {
    "sizewise-fit-count": { "type": "http", "url": "https://sizewisefitcount.usefulweb.app/mcp" }
  }
}