Skip to content
GET /v1/distance

Distance

Try it live

10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.

Custom headers (optional)
api.oanor.com/angularsize-api

It works. Grab an API key and use it in your project.

Get an API key

Code snippets

curl "https://api.oanor.com/angularsize-api/v1/distance" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/angularsize-api/v1/distance", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/angularsize-api/v1/distance");
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/angularsize-api/v1/distance",
    headers={"x-oanor-key": "oanor_test_..."}
)

Example response

A real response from this endpoint, captured by the latest health check.

{
    "data": {
        "note": "Distance D = d / (2·tan(δ/2)). Knowing an object's true size and how big it looks gives its distance — the basis of the 'standard ruler' method.",
        "inputs": {
            "size": 3474,
            "angular_size_radians": 0.009037896643
        },
        "distance": 384378.85380881
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:24.426Z",
        "request_id": "72ab91a6-5061-407f-991b-21a645d00097"
    },
    "status": "ok",
    "message": "Distance",
    "success": true
}