Unit Converter API logo
ToolsMAINTAINED1 token / call

Unit Converter API

Convert length, mass, volume, temperature, speed, energy, pressure and more between units in one call

Convert between units of length, mass, volume, temperature, area, speed, energy, pressure, time and data in one call, with the list of supported units per category. Exact conversion factors, pure computation, no external service.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response.json
{
  "from": "Square kilometer",
  "to": "Square mile",
  "input": 1,
  "result": 0.386102
}

Also available on

Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for Unit Converter API

  • Show measurements in the user's preferred units on product pages and dashboards.

  • Normalise imported data that mixes metric and imperial units.

  • Power a converter widget without maintaining conversion tables.

  • Convert recipe, fitness or engineering values on the fly.

Unit Converter API endpoints

Every endpoint with its parameters and a real example response.

GETGet Unit Info

https://unit-converter.dataandapis.com/v1/info

This endpoint takes no parameters.

Example request

curl "https://unit-converter.dataandapis.com/v1/info" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "area": [
    "square kilometer"
  ],
  "data-transfer-rate": [
    "Bit per second"
  ],
  "digital-storage": [
    "Bit"
  ],
  "energy": [
    "Joule"
  ],
  "frequency": [
    "Hertz"
  ],
  "fuel-economics": [
    "Miles per gallon"
  ],
  "length": [
    "kilometer"
  ],
  "mass": [
    "Tonne"
  ],
  "plane-angle": [
    "Arcsecond"
  ],
…
Show full response
{
  "area": [
    "square kilometer"
  ],
  "data-transfer-rate": [
    "Bit per second"
  ],
  "digital-storage": [
    "Bit"
  ],
  "energy": [
    "Joule"
  ],
  "frequency": [
    "Hertz"
  ],
  "fuel-economics": [
    "Miles per gallon"
  ],
  "length": [
    "kilometer"
  ],
  "mass": [
    "Tonne"
  ],
  "plane-angle": [
    "Arcsecond"
  ],
  "pressure": [
    "Bar"
  ],
  "speed": [
    "Mile per hour"
  ],
  "temperature": [
    "Degree Celsius"
  ],
  "time": [
    "Nanosecond"
  ],
  "volume": [
    "us liquid gallon"
  ]
}

GETTransform Units

https://unit-converter.dataandapis.com/v1/converter

Query parameters

ParameterExample
fromSquare kilometerOptional
toSquare mileOptional
typeareaOptional
value1Optional

Example request

curl "https://unit-converter.dataandapis.com/v1/converter?from=Square%20kilometer&to=Square%20mile&type=area&value=1" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "from": "Square kilometer",
  "to": "Square mile",
  "input": 1,
  "result": 0.386102
}

Where the data comes from

Source
Defined conversion factors and formulas. Pure computation.
Freshness
Computed on every call.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://unit-converter.dataandapis.com/v1/info',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

Unit Converter API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key
import axios from 'axios';

const url = 'https://unit-converter.dataandapis.com/v1/info';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about Unit Converter API

Ship Unit Converter API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.