Unit Converter API
Convert length, mass, temperature, volume, area, speed, data, time, pressure, and energy.
Coming soon on RapidAPI ↗Unit Converter handles conversions across ten categories — length, mass, temperature, volume, area, speed, data size, time, pressure, and energy — through one simple GET endpoint. Pass a value, a from unit, and a to unit (short codes like km, mi, kg, lb, c, f); the category is inferred automatically, or you can set it explicitly.
It also lists every category and the units within it, so you can build dropdowns and validation dynamically. Pure math, stateless, and instant — no data is stored. Great for calculators, e-commerce, fitness and recipe apps, engineering tools, and dashboards.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /convert | convert a value between units |
| GET | /categories | list categories |
| GET | /units | units in a category |
Quick start
curl --request curl \
--url 'https://unit-converter26.p.rapidapi.com/-G "https://unit-converter26.p.rapidapi.com/convert" -d "value=100" -d "from=km" -d "to=mi" -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: unit-converter26.p.rapidapi.com"' \
--header 'X-RapidAPI-Key: YOUR_KEY' \
--header 'X-RapidAPI-Host: unit-converter26.p.rapidapi.com' \
--header 'content-type: application/json' \
--data '{}'const res = await fetch('https://unit-converter26.p.rapidapi.com/-G "https://unit-converter26.p.rapidapi.com/convert" -d "value=100" -d "from=km" -d "to=mi" -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: unit-converter26.p.rapidapi.com"', {
method: 'curl',
headers: {
'X-RapidAPI-Key': 'YOUR_KEY',
'X-RapidAPI-Host': 'unit-converter26.p.rapidapi.com',
'content-type': 'application/json'
},
body: JSON.stringify({})
});
const data = await res.json();{
"value": 100,
"from": "km",
"to": "mi",
"category": "length",
"result": 62.1371
}Pricing
Subscribe on RapidAPI. Start free; upgrade as you scale.
Frequently asked questions
Are conversion rates updated?
Rates are based on standard definitions and rarely change.
Can I convert multiple values at once?
Each request handles a single conversion; batch requests are not supported.
Is there a limit on request size?
Parameters are small; no size limit beyond typical URL length.
Ready to build with Unit Converter?
Grab your key on RapidAPI and start on the free tier.
Coming soon on RapidAPI ↗