Naar de inhoud
GET /v1/magnitude

Distance modulus

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/starmagnitude-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "note": "Distance modulus: m − M = 5·log₁₀(d/pc) − 5. Absolute magnitude is the apparent magnitude at 10 pc.",
        "inputs": {
            "solved_for": "distance"
        },
        "distance_au": 20626480.6,
        "distance_ly": 326.15637769,
        "distance_pc": 100,
        "distance_modulus": 5,
        "absolute_magnitude": 5,
        "apparent_magnitude": 10
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:03.008Z",
        "request_id": "6f92dff5-775d-434a-93ee-d0e2dcd91ae0"
    },
    "status": "ok",
    "message": "Distance modulus",
    "success": true
}