hesaplayıcı
Menu

Volume Converter: API and MCP

Volume Converter over REST and MCP: input fields, limits, outputs, one example request and its real answer. Free, no sign-up.

GET /api/v1/tools/units.volume/mcp/units

Id
units.volume
Version
1.0.0
Access
Free
Tool page
Volume Converter
Schema
GET /api/v1/tools/units.volume

Input

FieldTypeConstraintsDefaultDescription
value (required)number≥ 0, ≤ 1,000,000,000,000Volume
from (required)stringml | cm3 | l | m3 | in3 | ft3 | yd3 | usFlOz | usCup | usPt | usQt | usGal | bbl | ukFlOz | ukPt | ukGalFrom
to (required)stringml | cm3 | l | m3 | in3 | ft3 | yd3 | usFlOz | usCup | usPt | usQt | usGal | bbl | ukFlOz | ukPt | ukGalTo

Output

FieldTypeDescription
resultnumberResult
mlnumberMilliliter (mL)
cm3numberCubic centimeter (cm³)
lnumberLiter (L)
m3numberCubic meter (m³)
in3numberCubic inch (in³)
ft3numberCubic foot (ft³)
yd3numberCubic yard (yd³)
usFlOznumberUS fluid ounce (US fl oz)
usCupnumberUS cup (US cup)
usPtnumberUS pint (US pt)
usQtnumberUS quart (US qt)
usGalnumberUS gallon (US gal)
bblnumberOil barrel (bbl)
ukFlOznumberImperial fluid ounce (UK fl oz)
ukPtnumberImperial pint (UK pt)
ukGalnumberImperial gallon (UK gal)

Example request

curl -X POST https://hesaplayici.com/api/v1/tools/units.volume/execute \
  -H 'Content-Type: application/json' \
  -d '{"input":{"value":1,"from":"usGal","to":"l"},"locale":"en"}'
Example answer
{
  "output": {
    "result": 3.785411784,
    "ml": 3785.411784,
    "cm3": 3785.411784,
    "l": 3.785411784,
    "m3": 0.003785411784,
    "in3": 231,
    "ft3": 0.133680555556,
    "yd3": 0.00495113168724,
    "usFlOz": 128,
    "usCup": 16,
    "usPt": 8,
    "usQt": 4,
    "usGal": 1,
    "bbl": 0.0238095238095,
    "ukFlOz": 133.227869541,
    "ukPt": 6.66139347703,
    "ukGal": 0.832674184629
  },
  "steps": [
    {
      "id": "factor",
      "formula": "factor = from unit (L) / to unit (L)",
      "substitution": "factor = 3.785411784 / 1",
      "value": 3.785411784
    },
    {
      "id": "result",
      "formula": "result = value × factor",
      "substitution": "result = 1 × 3.785411784",
      "value": 3.785411784,
      "unit": "L"
    }
  ],
  "notes": [],
  "meta": {
    "toolVersion": "1.0.0",
    "locale": "en"
  },
  "citation": {
    "url": "https://hesaplayici.com/en/unit-converter/volume-conversion-calculator",
    "title": "Volume Converter"
  }
}