Metric-imperial conversion API: miles↔km, lb↔kg, °F↔°C, gallons↔liters and 100+ more units
Metric-imperial conversion API: miles↔km, lb↔kg, °F↔°C, gallons↔liters and 100+ more units, one call, exact factors. Deterministic and auditable — cheaper than burning reasoning tokens, zero arithmetic-hallucination risk, and the result can be cited.
1000 (raw units)
price
1
calls / 30d
1
unique payers
2026-09-17
updated
Provider
x402.forgemesh.io · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x850363a27F0aC6fEb9C7a3eC4C1d295262dF9432",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"from": "mi",
"to": "km",
"value": "26.2"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"result": 42.164811,
"unit_name": "Kilometers"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"from": {
"description": "source unit e.g. mi",
"type": "string"
},
"to": {
"description": "target unit e.g. km",
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"value",
"from",
"to"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"info": {
"required": false
},
"offer-receipt": {
"info": {
"offers": [
{
"acceptIndex": 0,
"format": "eip712",
"payload": {
"amount": "1000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "eip155:8453",
"payTo": "0x850363a27F0aC6fEb9C7a3eC4C1d295262dF9432",
"resourceUrl": "https://x402.forgemesh.io/metric-imperial-convert",
"scheme": "exact",
"validUntil": 1789618423,
"version": 1
},
"signature": "0x3d04dfef3dd3a7d9de9fe01c711eb7834f6184c61fd63f98cae8f91184bd5ba657475199accad00ac24bed63a14ce69bf06fce7bb78eb56a46b2fe18af76b2ed1b"
}
]
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"offers": {
"items": {
"properties": {
"acceptIndex": {
"type": "integer"
},
"format": {
"type": "string"
},
"payload": {
"properties": {
"amount": {
"type": "string"
},
"asset": {
"type": "string"
},
"network": {
"type": "string"
},
"payTo": {
"type": "string"
},
"resourceUrl": {
"type": "string"
},
"scheme": {
"type": "string"
},
"validUntil": {
"type": "integer"
},
"version": {
"type": "integer"
}
},
"required": [
"version",
"resourceUrl",
"scheme",
"network",
"asset",
"payTo",
"amount"
],
"type": "object"
},
"signature": {
"type": "string"
}
},
"required": [
"format",
"signature"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"offers"
],
"type": "object"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}Use it
curl
curl "https://x402.forgemesh.io/metric-imperial-convert" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://x402.forgemesh.io/metric-imperial-convert");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://x402.forgemesh.io/metric-imperial-convert")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/14231.json, and this resource appears in /discovery/resources and /discovery/search.