Global Unit Converter API

API ID 13008

Convert between 138 units across 19 categories with auto-detection, compound measurement parsing, batch conversion, locale formatting, and ingredient cooking conversions. Fast, stateless, and fully documented.

112 ms avg response

API Documentation

Endpoints

Request

Converts a single value from one unit to another, automatically detecting the category from the unit name. Returns the raw result at full precision and a human-readable formatted string.

Endpoint ID: 26090
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26090/convert+a+value
INPUT PARAMETERS

Convert a Value — Endpoint Features

Object Description
value Required The numeric value to convert.
from Required Source unit symbol or alias (e.g. km).
to Required Target unit symbol or alias (e.g. mi).
category Optional Override to resolve an ambiguous unit name.
precision Optional Decimal places for the formatted string (0-15, default 4).
locale Optional BCP-47 locale for the formatted string (default en-US).

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

value
from
to
category
precision
locale
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"value":100,"from":"km","to":"mi","category":"length","result":62.13711922373339,"formatted":"62.1371 mi"},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Convert a Value — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26090/convert+a+value?value=100&from=km&to=mi&category=length&precision=4&locale=en-US' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Converts a value into every other unit in its category in a single call, with the source unit excluded. Ideal for building converter interfaces without one request per unit.

Endpoint ID: 26091
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26091/convert+to+all+units
INPUT PARAMETERS

Convert to All Units — Endpoint Features

Object Description
value Required The numeric value to convert.
from Required Source unit symbol or alias.
category Optional Category override.
precision Optional Decimal places (0-15).
locale Optional BCP-47 locale.

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

value
from
category
precision
locale
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"value":1,"from":"m","category":"length","conversions":[{"to":"mm","result":1000,"formatted":"1,000.0000 mm"},{"to":"cm","result":100,"formatted":"100.0000 cm"},{"to":"km","result":0.001,"formatted":"0.0010 km"},{"to":"in","result":39.37007874015748,"formatted":"39.3701 in"},{"to":"ft","result":3.280839895013123,"formatted":"3.2808 ft"},{"to":"yd","result":1.0936132983377078,"formatted":"1.0936 yd"},{"to":"mi","result":0.0006213711922373339,"formatted":"0.0006 mi"},{"to":"nmi","result":0.0005399568034557236,"formatted":"0.0005 nmi"}]},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Convert to All Units — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26091/convert+to+all+units?value=1&from=m&category=length&precision=2&locale=de-DE' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Parses a human-typed compound measurement and converts the total to a target unit. Handles formats like 5ft 11in, 3lb 4oz, 2h 30min, and feet and inches shorthand.

Endpoint ID: 26092
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26092/parse+and+convert
INPUT PARAMETERS

Parse and Convert — Endpoint Features

Object Description
input Required The compound measurement string to parse.
to Required Target unit symbol or alias.
category Optional Category override.
precision Optional Decimal places (0-15).
locale Optional BCP-47 locale.

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

input
to
category
precision
locale
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"input":"5ft 11in","parsed":[{"value":5,"unit":"ft"},{"value":11,"unit":"in"}],"category":"length","to":"cm","result":180.33999999999997,"formatted":"180.3400 cm"},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Parse and Convert — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26092/parse+and+convert?input=5ft 11in&to=cm' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Converts up to 50 unit pairs in a single request. Each item is processed independently, so a failing item is flagged inline and does not abort the batch. The response includes a summary block.

Endpoint ID: 26093
POST https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26093/batch+convert
INPUT PARAMETERS

Batch Convert — Endpoint Features

Object Description
Request Body Required Json

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"results":[{"error":false,"value":100,"from":"km","to":"mi","category":"length","result":62.13711922373339,"formatted":"62.14 mi"},{"error":false,"value":0,"from":"C","to":"F","category":"temperature","result":32,"formatted":"32.00 F"},{"error":false,"value":1,"from":"GB","to":"MB","category":"data_storage","result":1000,"formatted":"1,000.00 MB"}],"summary":{"total":3,"successful":3,"failed":0}},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Batch Convert — CODE SNIPPETS

curl --location --request POST 'https://zylalabs.com/api/13008/global+unit+converter+api/26093/batch+convert' --header 'Authorization: Bearer YOUR_API_KEY' 

--data-raw '{
  "conversions": [
    { "value": 100, "from": "km", "to": "mi" },
    { "value": 0, "from": "C", "to": "F" },
    { "value": 1, "from": "GB", "to": "MB" }
  ],
  "precision": 2
}'

    
Request

Expresses a value in the most readable unit of its category, so 0.005 m becomes 5 mm and 90 min becomes 1.5 h. Temperature and fuel-efficiency units pass through unchanged.

Endpoint ID: 26094
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26094/humanize+a+value
INPUT PARAMETERS

Humanize a Value — Endpoint Features

Object Description
value Required The numeric value to humanize.
unit Required The unit the value is currently in.
category Optional Category override.
precision Optional Decimal places (0-15).
locale Optional BCP-47 locale.

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

value
unit
category
precision
locale
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"value":0.005,"unit":"m","category":"length","humanized_unit":"mm","result":5,"formatted":"5.0000 mm","humanized":true},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Humanize a Value — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26094/humanize+a+value?value=0.005&unit=m' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Converts between a volume unit and a mass unit for a specific ingredient using its average density. Works in both directions, and every result is flagged as approximate.

Endpoint ID: 26095
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26095/cooking+volume+to+mass
INPUT PARAMETERS

Cooking Volume to Mass — Endpoint Features

Object Description
from Required A volume unit or a mass unit.
to Required The opposite dimension from the 'from' unit.
ingredient Required Ingredient name or alias (e.g. flour)
precision Optional Decimal places (0-15).
locale Optional BCP-47 locale.
value Required The numeric value to convert.

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

from
to
ingredient
precision
locale
value
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"value":1,"from":"cup","to":"g","ingredient":"flour","density_g_per_ml":0.53,"result":125.39164,"formatted":"125.3916 g","approximate":true,"note":"Densities are averages and vary by ingredient, brand, and packing."},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Cooking Volume to Mass — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26095/cooking+volume+to+mass?from=cup&to=g&ingredient=flour&value=1' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Returns every supported cooking ingredient with its average density in grams per millilitre and a category label. Useful for populating ingredient pickers in a user interface.

Endpoint ID: 26096
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26096/list+ingredients
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

This endpoint does not require any input parameters.

API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"ingredients":[{"name":"All-Purpose Flour","aliases":["flour","ap flour","plain flour"],"density_g_per_ml":0.53,"category":"flour"},{"name":"Bread Flour","aliases":["bread flour","strong flour"],"density_g_per_ml":0.54,"category":"flour"},{"name":"Whole Wheat Flour","aliases":["whole wheat flour","wholemeal flour"],"density_g_per_ml":0.6,"category":"flour"},{"name":"Cake Flour","aliases":["cake flour","soft flour"],"density_g_per_ml":0.48,"category":"flour"},{"name":"Granulated Sugar","aliases":["sugar","white sugar"],"density_g_per_ml":0.85,"category":"sugar"},{"name":"Brown Sugar","aliases":["brown sugar","packed brown sugar"],"density_g_per_ml":0.93,"category":"sugar"},{"name":"Powdered Sugar","aliases":["powdered sugar","icing sugar","confectioners sugar"],"density_g_per_ml":0.56,"category":"sugar"},{"name":"Butter","aliases":["butter","unsalted butter"],"density_g_per_ml":0.959,"category":"fat"},{"name":"Water","aliases":["water","tap water"],"density_g_per_ml":1,"category":"liquid"},{"name":"Milk","aliases":["milk","whole milk"],"density_g_per_ml":1.03,"category":"dairy"},{"name":"Heavy Cream","aliases":["heavy cream","whipping cream"],"density_g_per_ml":1.01,"category":"dairy"},{"name":"Honey","aliases":["honey","raw honey"],"density_g_per_ml":1.42,"category":"sweetener"},{"name":"Vegetable Oil","aliases":["vegetable oil","cooking oil"],"density_g_per_ml":0.92,"category":"fat"},{"name":"Olive Oil","aliases":["olive oil","extra virgin olive oil"],"density_g_per_ml":0.91,"category":"fat"},{"name":"Rice","aliases":["rice","white rice","uncooked rice"],"density_g_per_ml":0.78,"category":"grain"},{"name":"Salt","aliases":["salt","table salt","fine salt"],"density_g_per_ml":1.2,"category":"seasoning"},{"name":"Cocoa Powder","aliases":["cocoa powder","cocoa","unsweetened cocoa"],"density_g_per_ml":0.51,"category":"baking"},{"name":"Baking Soda","aliases":["baking soda","bicarbonate of soda"],"density_g_per_ml":0.93,"category":"leavening"},{"name":"Baking Powder","aliases":["baking powder","double-acting baking powder"],"density_g_per_ml":0.81,"category":"leavening"},{"name":"Cornstarch","aliases":["cornstarch","corn starch","cornflour"],"density_g_per_ml":0.51,"category":"starch"},{"name":"Rolled Oats","aliases":["oats","rolled oats","old fashioned oats"],"density_g_per_ml":0.38,"category":"grain"},{"name":"Peanut Butter","aliases":["peanut butter","creamy peanut butter"],"density_g_per_ml":1.09,"category":"spread"},{"name":"Maple Syrup","aliases":["maple syrup","pure maple syrup"],"density_g_per_ml":1.32,"category":"sweetener"},{"name":"Yogurt","aliases":["yogurt","yoghurt","plain yogurt"],"density_g_per_ml":1.03,"category":"dairy"},{"name":"Sour Cream","aliases":["sour cream","soured cream"],"density_g_per_ml":0.96,"category":"dairy"},{"name":"Breadcrumbs","aliases":["breadcrumbs","bread crumbs","dried breadcrumbs"],"density_g_per_ml":0.46,"category":"baking"},{"name":"Parmesan Cheese","aliases":["parmesan","parmesan cheese","grated parmesan"],"density_g_per_ml":0.42,"category":"dairy"},{"name":"Chocolate Chips","aliases":["chocolate chips","choc chips"],"density_g_per_ml":0.72,"category":"baking"}]},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
List Ingredients — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26096/list+ingredients' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Returns every supported unit grouped by category, each with its symbol, display name, accepted aliases, and category slug. Build dynamic unit pickers from this without hardcoding values.

Endpoint ID: 26097
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26097/list+all+units
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

This endpoint does not require any input parameters.

API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"categories":[{"category":"length","units":[{"symbol":"mm","name":"Millimeter","aliases":["millimeter","millimetre","millimeters","millimetres"]},{"symbol":"cm","name":"Centimeter","aliases":["centimeter","centimetre","centimeters","centimetres"]},{"symbol":"m","name":"Meter","aliases":["meter","metre","meters","metres"]},{"symbol":"km","name":"Kilometer","aliases":["kilometer","kilometre","kilometers","kilometres"]},{"symbol":"in","name":"Inch","aliases":["inch","inches","\""]},{"symbol":"ft","name":"Foot","aliases":["foot","feet","'"]},{"symbol":"yd","name":"Yard","aliases":["yard","yards"]},{"symbol":"mi","name":"Mile","aliases":["mile","miles"]},{"symbol":"nmi","name":"Nautical Mile","aliases":["nautical mile","nautical miles"]}]},{"category":"mass","units":[{"symbol":"mg","name":"Milligram","aliases":["milligram","milligrams"]},{"symbol":"g","name":"Gram","aliases":["gram","grams","gramme","grammes"]},{"symbol":"kg","name":"Kilogram","aliases":["kilogram","kilograms","kilo","kilos"]},{"symbol":"t","name":"Tonne","aliases":["tonne","tonnes","metric ton","metric tons"]},{"symbol":"oz","name":"Ounce","aliases":["ounce","ounces"]},{"symbol":"lb","name":"Pound","aliases":["pound","pounds","lbs"]},{"symbol":"st","name":"Stone","aliases":["stone","stones"]},{"symbol":"ton","name":"US Ton","aliases":["us ton","us tons","short ton","short tons"]}]},{"category":"temperature","units":[{"symbol":"C","name":"Celsius","aliases":["celsius","degc","°c"]},{"symbol":"F","name":"Fahrenheit","aliases":["fahrenheit","degf","°f"]},{"symbol":"K","name":"Kelvin","aliases":["kelvin","degk","°k"]},{"symbol":"R","name":"Rankine","aliases":["rankine","degr","°r"]}]},{"category":"volume","units":[{"symbol":"ml","name":"Milliliter","aliases":["milliliter","millilitre","milliliters","millilitres"]},{"symbol":"l","name":"Liter","aliases":["liter","litre","liters","litres"]},{"symbol":"m3","name":"Cubic Meter","aliases":["cubic meter","cubic metre","cubic meters","m^3"]},{"symbol":"tsp","name":"Teaspoon","aliases":["teaspoon","teaspoons"]},{"symbol":"tbsp","name":"Tablespoon","aliases":["tablespoon","tablespoons"]},{"symbol":"fl_oz_us","name":"US Fluid Ounce","aliases":["fl_oz","fl oz","floz","fluid ounce","us fluid ounce"]},{"symbol":"fl_oz_uk","name":"UK Fluid Ounce","aliases":["imperial fluid ounce","uk fluid ounce","imperial fl oz"]},{"symbol":"cup_us","name":"US Cup","aliases":["cup","cups","us cup"]},{"symbol":"cup_metric","name":"Metric Cup","aliases":["metric cup","metric cups"]},{"symbol":"pt_us","name":"US Pint","aliases":["pt","pint","pints","us pint"]},{"symbol":"pt_uk","name":"UK Pint","aliases":["imperial pint","uk pint"]},{"symbol":"qt_us","name":"US Quart","aliases":["qt","quart","quarts","us quart"]},{"symbol":"qt_uk","name":"UK Quart","aliases":["imperial quart","uk quart"]},{"symbol":"gal_us","name":"US Gallon","aliases":["gal","gallon","gallons","us gallon"]},{"symbol":"gal_uk","name":"UK Gallon","aliases":["imperial gallon","uk gallon"]}]},{"category":"speed","units":[{"symbol":"m/s","name":"Meters per Second","aliases":["meters per second","metres per second","mps"]},{"symbol":"km/h","name":"Kilometers per Hour","aliases":["kilometers per hour","kmh","kph"]},{"symbol":"mph","name":"Miles per Hour","aliases":["miles per hour","mi/h"]},{"symbol":"knot","name":"Knot","aliases":["knots","nautical mph"]},{"symbol":"ft/s","name":"Feet per Second","aliases":["feet per second","fps"]}]},{"category":"area","units":[{"symbol":"mm2","name":"Square Millimeter","aliases":["square millimeter","square millimetre","mm^2"]},{"symbol":"cm2","name":"Square Centimeter","aliases":["square centimeter","square centimetre","cm^2"]},{"symbol":"m2","name":"Square Meter","aliases":["square meter","square metre","m^2"]},{"symbol":"km2","name":"Square Kilometer","aliases":["square kilometer","square kilometre","km^2"]},{"symbol":"in2","name":"Square Inch","aliases":["square inch","square inches","in^2"]},{"symbol":"ft2","name":"Square Foot","aliases":["square foot","square feet","ft^2"]},{"symbol":"yd2","name":"Square Yard","aliases":["square yard","square yards","yd^2"]},{"symbol":"ac","name":"Acre","aliases":["acre","acres"]},{"symbol":"ha","name":"Hectare","aliases":["hectare","hectares"]}]},{"category":"energy","units":[{"symbol":"J","name":"Joule","aliases":["joule","joules"]},{"symbol":"kJ","name":"Kilojoule","aliases":["kilojoule","kilojoules"]},{"symbol":"cal","name":"Calorie","aliases":["calorie","calories","small calorie"]},{"symbol":"kcal","name":"Kilocalorie","aliases":["kilocalorie","kilocalories","food calorie"]},{"symbol":"Wh","name":"Watt Hour","aliases":["watt hour","watt-hour","watthour"]},{"symbol":"kWh","name":"Kilowatt Hour","aliases":["kilowatt hour","kilowatt-hour","kwh"]},{"symbol":"BTU","name":"British Thermal Unit","aliases":["btu","british thermal unit","british thermal units"]},{"symbol":"eV","name":"Electronvolt","aliases":["electronvolt","electron volt","ev"]}]},{"category":"pressure","units":[{"symbol":"Pa","name":"Pascal","aliases":["pascal","pascals"]},{"symbol":"kPa","name":"Kilopascal","aliases":["kilopascal","kilopascals"]},{"symbol":"MPa","name":"Megapascal","aliases":["megapascal","megapascals"]},{"symbol":"bar","name":"Bar","aliases":["bars","metric bar"]},{"symbol":"psi","name":"Pounds per Square Inch","aliases":["pound per square inch","pounds per square inch","lbf/in2"]},{"symbol":"atm","name":"Atmosphere","aliases":["atmosphere","atmospheres","standard atmosphere"]},{"symbol":"mmHg","name":"Millimeters of Mercury","aliases":["millimeters of mercury","millimetres of mercury","torr"]},{"symbol":"inHg","name":"Inches of Mercury","aliases":["inches of mercury","in hg"]}]},{"category":"data_storage","units":[{"symbol":"bit","name":"Bit","aliases":["bits","binary digit"]},{"symbol":"B","name":"Byte","aliases":["byte","bytes"]},{"symbol":"KB","name":"Kilobyte","aliases":["kilobyte","kilobytes"]},{"symbol":"MB","name":"Megabyte","aliases":["megabyte","megabytes"]},{"symbol":"GB","name":"Gigabyte","aliases":["gigabyte","gigabytes"]},{"symbol":"TB","name":"Terabyte","aliases":["terabyte","terabytes"]},{"symbol":"PB","name":"Petabyte","aliases":["petabyte","petabytes"]},{"symbol":"KiB","name":"Kibibyte","aliases":["kibibyte","kibibytes"]},{"symbol":"MiB","name":"Mebibyte","aliases":["mebibyte","mebibytes"]},{"symbol":"GiB","name":"Gibibyte","aliases":["gibibyte","gibibytes"]},{"symbol":"TiB","name":"Tebibyte","aliases":["tebibyte","tebibytes"]}]},{"category":"fuel_efficiency","units":[{"symbol":"mpg_us","name":"US Miles per Gallon","aliases":["mpg","us mpg","miles per gallon"]},{"symbol":"mpg_uk","name":"UK Miles per Gallon","aliases":["uk mpg","imperial mpg"]},{"symbol":"L/100km","name":"Liters per 100 Kilometers","aliases":["l/100km","liters per 100km","litres per 100km"]},{"symbol":"km/L","name":"Kilometers per Liter","aliases":["km/l","kilometers per liter","kilometres per litre"]}]},{"category":"time","units":[{"symbol":"ns","name":"Nanosecond","aliases":["nanosecond","nanoseconds"]},{"symbol":"us","name":"Microsecond","aliases":["microsecond","microseconds"]},{"symbol":"ms","name":"Millisecond","aliases":["millisecond","milliseconds"]},{"symbol":"s","name":"Second","aliases":["second","seconds","sec"]},{"symbol":"min","name":"Minute","aliases":["minute","minutes"]},{"symbol":"h","name":"Hour","aliases":["hour","hours","hr"]},{"symbol":"day","name":"Day","aliases":["days","d"]},{"symbol":"week","name":"Week","aliases":["weeks","wk"]},{"symbol":"month","name":"Month","aliases":["months","mo"]},{"symbol":"year","name":"Year","aliases":["years","yr"]}]},{"category":"angle","units":[{"symbol":"deg","name":"Degree","aliases":["degree","degrees","°"]},{"symbol":"rad","name":"Radian","aliases":["radian","radians"]},{"symbol":"grad","name":"Gradian","aliases":["gradian","gradians","gon"]},{"symbol":"arcmin","name":"Arcminute","aliases":["arcminute","arcminutes","minute of arc"]},{"symbol":"arcsec","name":"Arcsecond","aliases":["arcsecond","arcseconds","second of arc"]},{"symbol":"turn","name":"Turn","aliases":["turns","revolution","revolutions"]}]},{"category":"frequency","units":[{"symbol":"Hz","name":"Hertz","aliases":["hertz","hz"]},{"symbol":"kHz","name":"Kilohertz","aliases":["kilohertz","khz"]},{"symbol":"MHz","name":"Megahertz","aliases":["megahertz","mhz"]},{"symbol":"GHz","name":"Gigahertz","aliases":["gigahertz","ghz"]},{"symbol":"THz","name":"Terahertz","aliases":["terahertz","thz"]},{"symbol":"rpm","name":"Revolutions per Minute","aliases":["revolutions per minute","rev/min"]}]},{"category":"power","units":[{"symbol":"W","name":"Watt","aliases":["watt","watts"]},{"symbol":"kW","name":"Kilowatt","aliases":["kilowatt","kilowatts"]},{"symbol":"MW","name":"Megawatt","aliases":["megawatt","megawatts"]},{"symbol":"hp","name":"Horsepower","aliases":["horsepower","mechanical horsepower"]},{"symbol":"PS","name":"Metric Horsepower","aliases":["metric horsepower","ps","pferdestarke"]},{"symbol":"BTU/h","name":"BTU per Hour","aliases":["btu/h","btu per hour","british thermal units per hour"]}]},{"category":"force","units":[{"symbol":"N","name":"Newton","aliases":["newton","newtons"]},{"symbol":"kN","name":"Kilonewton","aliases":["kilonewton","kilonewtons"]},{"symbol":"lbf","name":"Pound-Force","aliases":["pound-force","pound force","poundforce"]},{"symbol":"kgf","name":"Kilogram-Force","aliases":["kilogram-force","kilogram force"]},{"symbol":"dyn","name":"Dyne","aliases":["dyne","dynes"]}]},{"category":"data_rate","units":[{"symbol":"bps","name":"Bits per Second","aliases":["bit/s","bits per second"]},{"symbol":"Kbps","name":"Kilobits per Second","aliases":["kbps","kilobits per second"]},{"symbol":"Mbps","name":"Megabits per Second","aliases":["mbps","megabits per second"]},{"symbol":"Gbps","name":"Gigabits per Second","aliases":["gbps","gigabits per second"]},{"symbol":"Tbps","name":"Terabits per Second","aliases":["tbps","terabits per second"]},{"symbol":"KB/s"}]}]},"_note":"Response truncated for documentation purposes"}
List All Units — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26097/list+all+units' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Returns all units for a single category, such as length or temperature. An unknown category slug returns a 404 error with the standard error shape.

Endpoint ID: 26098
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26098/list+units+by+category
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"category":"temperature","units":[{"symbol":"C","name":"Celsius","aliases":["celsius","degc","°c"]},{"symbol":"F","name":"Fahrenheit","aliases":["fahrenheit","degf","°f"]},{"symbol":"K","name":"Kelvin","aliases":["kelvin","degk","°k"]},{"symbol":"R","name":"Rankine","aliases":["rankine","degr","°r"]}]},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
List Units by Category — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26098/list+units+by+category&category=Required' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Fuzzy search across unit symbols, names, and aliases, ranked by exact match, then prefix, then substring. Returns up to 20 matches, which is ideal for autocomplete fields.

Endpoint ID: 26099
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26099/search+units
INPUT PARAMETERS

Search Units — Endpoint Features

Object Description
q Required The search term (symbol, name, or alias fragment).

Free test requests remaining: 3 of 3.


INPUT PARAMETERS

q
API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"query":"meter","results":[{"symbol":"mm","name":"Millimeter","category":"length"},{"symbol":"cm","name":"Centimeter","category":"length"},{"symbol":"m","name":"Meter","category":"length"},{"symbol":"km","name":"Kilometer","category":"length"},{"symbol":"m3","name":"Cubic Meter","category":"volume"},{"symbol":"m/s","name":"Meters per Second","category":"speed"},{"symbol":"km/h","name":"Kilometers per Hour","category":"speed"},{"symbol":"mm2","name":"Square Millimeter","category":"area"},{"symbol":"cm2","name":"Square Centimeter","category":"area"},{"symbol":"m2","name":"Square Meter","category":"area"},{"symbol":"km2","name":"Square Kilometer","category":"area"},{"symbol":"mmHg","name":"Millimeters of Mercury","category":"pressure"},{"symbol":"L/100km","name":"Liters per 100 Kilometers","category":"fuel_efficiency"},{"symbol":"km/L","name":"Kilometers per Liter","category":"fuel_efficiency"},{"symbol":"kg/m3","name":"Kilograms per Cubic Meter","category":"density"},{"symbol":"g/cm3","name":"Grams per Cubic Centimeter","category":"density"},{"symbol":"N·m","name":"Newton Meter","category":"torque"},{"symbol":"kN·m","name":"Kilonewton Meter","category":"torque"},{"symbol":"kgf·m","name":"Kilogram-Force Meter","category":"torque"},{"symbol":"m3/s","name":"Cubic Meters per Second","category":"flow_rate"}]},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
Search Units — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26099/search+units?q=meter' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Returns all 19 supported categories, each with a display name and the number of units it contains. Use this to render category pickers without hardcoding the list.

Endpoint ID: 26100
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26100/list+categories
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

This endpoint does not require any input parameters.

API EXAMPLE RESPONSE
JSON
{"success":true,"data":{"categories":[{"category":"length","display_name":"Length","unit_count":9},{"category":"mass","display_name":"Mass","unit_count":8},{"category":"temperature","display_name":"Temperature","unit_count":4},{"category":"volume","display_name":"Volume","unit_count":15},{"category":"speed","display_name":"Speed","unit_count":5},{"category":"area","display_name":"Area","unit_count":9},{"category":"energy","display_name":"Energy","unit_count":8},{"category":"pressure","display_name":"Pressure","unit_count":8},{"category":"data_storage","display_name":"Data Storage","unit_count":11},{"category":"fuel_efficiency","display_name":"Fuel Efficiency","unit_count":4},{"category":"time","display_name":"Time","unit_count":10},{"category":"angle","display_name":"Angle","unit_count":6},{"category":"frequency","display_name":"Frequency","unit_count":6},{"category":"power","display_name":"Power","unit_count":6},{"category":"force","display_name":"Force","unit_count":5},{"category":"data_rate","display_name":"Data Rate","unit_count":8},{"category":"density","display_name":"Density","unit_count":5},{"category":"torque","display_name":"Torque","unit_count":5},{"category":"flow_rate","display_name":"Flow Rate","unit_count":6}]},"meta":{"disclaimer":"Conversion results are calculated from standard mathematical constants. Always verify safety-critical conversions independently.","cached":false}}
List Categories — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26100/list+categories' --header 'Authorization: Bearer YOUR_API_KEY' 


    
Request

Returns the API status including uptime, version, total unit and category counts, ingredient count, endpoint count, and a feature flag object indicating which capabilities are enabled.

Endpoint ID: 26101
GET https://api-sneakers-database.zylalabs.com/api/13008/global+unit+converter+api/26101/health+check
INPUT PARAMETERS

Free test requests remaining: 3 of 3.

This endpoint does not require any input parameters.

API EXAMPLE RESPONSE
JSON
{"uptime":431467.947423891,"version":"1.0.0","total_unit_count":138,"category_count":19,"ingredient_count":28,"endpoint_count":13,"features":{"convert":true,"convert_all":true,"convert_parse":true,"convert_batch":true,"humanize":true,"cooking":true,"unit_search":true,"openapi_spec":true,"cors":true}}
Health Check — CODE SNIPPETS

curl --location --request GET 'https://zylalabs.com/api/13008/global+unit+converter+api/26101/health+check' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API Access Key & Authentication

After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Global Unit Converter API simply include your bearer token in the Authorization header.

Headers
Header Description
Authorization Required Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.

No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.

(Save 2 months with annual billing 🎉)

🚀 Enterprise Plan

Starts at
$ 10,000/Year


  • Custom Volume
  • Custom Rate Limit
  • Specialized Customer Support
  • Real-Time API Monitoring
zeiss-logo amazon-logo zoom-logo decathlon-logo

Trusted by leading companies

Overview

The Global Unit Converter API converts values between units across 19 categories: length, mass, temperature, volume, speed, area, energy, pressure, data storage, fuel efficiency, time, angle, frequency, power, force, data rate, density, torque, and flow rate — 138 units in total.

It detects the category automatically from the unit you pass, so you never have to specify it. Every conversion returns both a raw result at full floating-point precision and a human-readable formatted string, with caller-controlled decimal precision and locale-aware number formatting (so the same value can render as 62.14 or 62,14 depending on the locale).

Beyond single conversions, the API does the things developers usually have to build by hand:

- Convert to all units: express a value in every other unit of its category in one call, ideal for building converter UIs without a request per unit.
- Compound measurement parsing: parse human-typed input like 5'11", 3 lb 4 oz, and 2h 30min, including feet and inches shorthand, and convert the total.
- Batch conversion: convert up to 50 unit pairs in a single request, with failed items flagged inline so one bad pair never aborts the batch.
- Readable-unit humanizer: express a value in the most readable unit of its category, so 0.005 m becomes 5 mm and 90 minutes becomes 1.5 hours.
- Cooking conversions: convert between volume and mass for common ingredients using average densities, so 1 cup of flour becomes about 125 grams.
- Unit discovery and fuzzy search: list every unit, category, and ingredient, and search units by symbol, name, or alias for autocomplete fields.

The API correctly distinguishes US and imperial units, providing both variants for gallon, quart, pint, and fluid ounce, so conversions are regionally accurate rather than silently wrong.

It is fully stateless — there is no database and no external data at runtime. Every conversion factor is a fixed mathematical constant, so responses are fast, deterministic, and never go out of date. The API is CORS-enabled for direct browser use and returns a consistent JSON envelope on every response, with clear, machine-readable error codes.

 

Global Unit Converter API FAQs

No. The category is detected automatically from the unit you pass, so a request like from=km&to=mi just works. You only need the optional category parameter in the rare case where a unit name could belong to more than one category, and even then the unit set is built to avoid those collisions, so in practice you'll almost never need it.

Result is the raw conversion at full floating-point precision — use it for your own calculations. formatted is a display-ready string rounded to the precision you request (default 4 decimals) and formatted for the locale you request (default en-US). Changing precision or locale only affects formatted; result always stays at full precision.

You can convert between any two units within the same category — kilometres to miles, Celsius to Fahrenheit, gigabytes to mebibytes. Conversions across different categories are not valid and return an error, since there is no meaningful conversion between, say, a distance and a weight. The cooking endpoint is the one deliberate exception, converting between volume and mass for specific ingredients using their density.

Gallons, quarts, pints, and fluid ounces differ between the US and imperial (UK) systems, so both are provided with explicit names like gal_us and gal_uk. If you pass a bare unit like gal, pt, or cup, it resolves to the US variant. To force imperial, use the explicit UK symbol.

Cooking conversions use average densities for each ingredient and are explicitly flagged as approximate in every response. Real densities vary by brand, sifting, and packing, so treat the result as a close estimate suitable for recipes rather than a precise measurement.

No. The API is fully stateless with no database. The values and units you submit are processed in memory to compute the response and are never stored. Every conversion factor is a fixed mathematical constant, so results are fast, deterministic, and never go out of date.

Yes. The units, categories, and ingredient-listing endpoints return the complete catalogue of everything the API supports, including symbols, names, and aliases. You can build dynamic unit and category pickers directly from these responses without hardcoding any values.

Each endpoint returns JSON data structured with a success flag, data object, and meta information. The data object varies by endpoint; for example, the "Convert a Value" endpoint returns the conversion result, while "List Units" provides unit details grouped by category.

Key fields include "success" (boolean), "data" (contains conversion results or lists), and "meta" (provides additional info like disclaimers). For conversion endpoints, "result" and "formatted" fields show the raw and human-readable outputs, respectively.

Parameters vary by endpoint. For "Convert a Value," you need "from" and "to" units. The "Batch Convert" endpoint accepts an array of unit pairs. Optional parameters include "precision" for decimal control and "locale" for formatting.

The response data is organized into three main sections: "success" indicates if the request was successful, "data" contains the relevant output (like conversion results or lists), and "meta" provides additional context, such as disclaimers or caching status.

Each endpoint provides specific information: "Convert a Value" gives conversion results, "List Units" details available units, "Parse and Convert" interprets compound measurements, and "Cooking Volume to Mass" offers ingredient-specific conversions.

Users can customize requests by specifying parameters like "from," "to," "precision," and "locale." For batch conversions, users can submit multiple unit pairs in a single request, allowing for efficient processing of conversions.

Typical use cases include building unit converter applications, integrating measurement conversions in e-commerce platforms, developing educational tools for teaching measurements, and creating recipe applications that require ingredient conversions.

Data accuracy is maintained through fixed mathematical constants for conversions, ensuring consistent results. The API is stateless, meaning it does not rely on external data sources, and every conversion is calculated independently, providing reliable outputs.

General FAQs

To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.

You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.

The free trial lasts for 7 days and allows you to make up to 50 API requests.

No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.

Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.

Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.

Prices are listed in USD (United States Dollar), EUR (Euro), CAD (Canadian Dollar), AUD (Australian Dollar), and GBP (British Pound). We accept all major debit and credit cards. Our payment system uses the latest security technology and is powered by Stripe, one of the world's most reliable payment companies. If you have any trouble paying by card, just contact us at [email protected]

Additionally, if you already have an active subscription in any of these currencies (USD, EUR, CAD, AUD, GBP), that currency will remain for subsequent subscriptions. You can change the currency at any time as long as you don't have any active subscriptions.
The local currency shown on the pricing page is based on the country of your IP address and is provided for reference only. The actual prices are in USD (United States Dollar). When you make a payment, the charge will appear on your card statement in USD, even if you see the equivalent amount in your local currency on our website. This means you cannot pay directly with your local currency.
Occasionally, a bank may decline the charge due to its fraud protection settings. We suggest reaching out to your bank initially to check if they are blocking our charges. Also, you can access the Billing Portal and change the card associated to make the payment. If these does not work and you need further assistance, please contact our team at [email protected]
Prices are determined by a recurring monthly or yearly subscription, depending on the chosen plan.
API calls are deducted from your plan based on successful requests. Each plan comes with a specific number of calls that you can make per month. Only successful calls, indicated by a Status 200 response, will be counted against your total. This ensures that failed or incomplete requests do not impact your monthly quota.
Zyla API Hub works on a recurring monthly subscription system. Your billing cycle will start the day you purchase one of the paid plans, and it will renew the same day of the next month. So be aware to cancel your subscription beforehand if you want to avoid future charges.
To upgrade your current subscription plan, simply go to the pricing page of the API and select the plan you want to upgrade to. The upgrade will be instant, allowing you to immediately enjoy the features of the new plan. Please note that any remaining calls from your previous plan will not be carried over to the new plan, so be aware of this when upgrading. You will be charged the full amount of the new plan.
To check how many API calls you have left for the current month, refer to the 'X-Zyla-API-Calls-Monthly-Remaining' field in the response header. For example, if your plan allows 1,000 requests per month and you've used 100, this field in the response header will indicate 900 remaining calls.

You can monitor your API usage through the response headers included with every request:

x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.

The 'X-Zyla-RateLimit-Reset' header shows the number of seconds until your rate limit resets. This tells you when your request count will start fresh. For example, if it displays 3,600, it means 3,600 seconds are left until the limit resets.

Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.

Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.

After 7 days, you will be charged the full amount for the plan you were subscribed to during the trial. Therefore, it's important to cancel before the trial period ends. Refund requests for forgetting to cancel on time are not accepted.
When you subscribe to an API free trial, you can make up to 50 API calls. If you wish to make additional API calls beyond this limit, the API will prompt you to perform an "Start Your Paid Plan." You can find the "Start Your Paid Plan" button in your profile under Subscription -> Choose the API you are subscribed to -> Pricing tab.
You can contact us through our chat channel to receive immediate assistance. We are always online from 8 am to 5 pm (EST). If you reach us after that time, we will get back to you as soon as possible. Additionally, you can contact us via email at [email protected]

Please have a look at our Refund Policy: https://zylalabs.com/terms#refund


Related APIs


You might also like