Distance Convert

The Distance Conversion endpoint allows the conversion of a distance value from one unit to another, such as kilometers, meters, and more. It supports a wide range of measurement units for accurate and flexible conversions.

Endpoint

URL: https://api.erensko.xyz/v1/distance-convert

Method: GET

URL Parameters

Key
Value

value

The distance value (number) to be converted.

unit

The unit of the value can be one of the following: km, m, cm, mm, mile, yard, foot, inch, nauticalmile.

target

The unit to convert the value to, can be one of the following: km, m, cm, mm, mile, yard, foot, inch, nauticalmile.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here. This is required.

Request Example

GET https://api.erensko.xyz/v1/distance-convert?value=10&unit=km&target=m

Response Example

{
    "original": {
        "value": 10,
        "unit": "km"
    },
    "converted": {
        "value": 10000,
        "unit": "m"
    }
}

Last updated