Unit Price API
Unit-price and best-value maths as an API — the supermarket "which is cheaper" calculation, computed locally and deterministically and entirely currency-agnostic. The unit endpoint normalises a pack price to a price per standard unit: from a price, a pack size and its unit (and an optional multipack count) it returns the price per kilogram, per 100 g and per pound for weight; per litre, per 100 ml and per fluid ounce for volume; or per item for counted goods — plus the price per pack item for multipacks. The compare endpoint takes several pack options as a simple list (such as "3@500g,5@1kg,4.5@750g"), ranks them cheapest-per-unit first, names the best value and reports the percentage saving versus the most expensive. The convert endpoint turns a unit price given in one basis (for example per pound) into the other bases for its measure. Everything is computed locally and deterministically, so it is instant and private. Options being compared must share a measure (all weight, all volume or all count). Ideal for shopping and grocery apps, price-comparison and deal sites, budgeting tools, and retail and procurement software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is unit-price comparison; for profit margin and markup use a margin API.
api.oanor.com/unitprice-api