API & MCP

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

HTTP API

Sizewise Rate Counter

Converts a rate between seconds, minutes, hours, days, weeks, months and years, projects it over time, finds when it reaches a target and writes a small self-contained HTML counter (“since you opened this page …”) for your own site.

Inputs of Sizewise Rate Counter
FieldTypeDefaultDescription
labeltext"Light travels"What is counted
amountnumber299792.458Amount
perselect (second, minute, hour, day, week, month, year)"second"Per
unittext"km"Unit of the amount
elapsedSecondsnumber60Elapsed time
targetnumber0Target (optional)
decimalsinteger0Decimals in the counter

Example request

Light to the Moon

curl -X POST https://sizewiseratecounter.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"label":"Light travels","amount":299792.458,"per":"second","unit":"km","elapsedSeconds":60,"target":384400}'

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-rate-counter": { "type": "http", "url": "https://sizewiseratecounter.usefulweb.app/mcp" }
  }
}