/v1/code
Unit by UN/ECE common code
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/unitcodes-api/v1/code" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/unitcodes-api/v1/code", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/unitcodes-api/v1/code");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/unitcodes-api/v1/code",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"unit": {
"code": "KGM",
"name": "kilogram",
"active": true,
"status": "active",
"symbol": "kg",
"description": "A unit of mass equal to one thousand grams."
}
},
"meta": {
"timestamp": "2026-06-08T18:25:03.411Z",
"request_id": "aa150d53-cc2b-4219-a5f0-83cda7eba7c9"
},
"status": "ok",
"message": "Unit code retrieved successfully",
"success": true
}