Convert a value between units of measure: mass (g, kg, mg...
Convert a value between units of measure: mass (g, kg, mg, lb, oz, t, st), length (m, km, cm, mm, in, ft, yd, mi), volume (l, ml, m3, gal, gal-imp, qt, pt, cup, floz, tbsp, tsp), area (m2, km2, ft2, acre, ha), and temperature (C, F, K). Units are matched case-insensitively with common aliases (kg/kilogram/kgs). Returns {value, from, to, dimension, result}. Exact factors — the ground-truth answer a CPG/ETL pipeline needs instead of an LLM approximating conversions. Cross-dimension conversions (kg→m) return 400.
Request
- Base URL: https://2s.io
- URL: https://2s.io/api/convert/unit
- Auth: API key in header PAYMENT-SIGNATURE
Query parameters
Value.
Start of the range.
End of the range.
Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.
Response
Changes
No recorded changes to this operation across all 1 revision of this API.