Zum Inhalt springen
GET /v1/travel-time

Light travel time

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/lighttime-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "note": "Light travel time t = d/c (c = 299,792,458 m/s). Light from the Sun reaches Earth in about 8.3 minutes; the nearest star is ~4.2 light-years away.",
        "inputs": {
            "unit": "au",
            "distance": 1
        },
        "distance_m": 149597870700,
        "travel_time": {
            "days": 0.0057755183,
            "hours": 0.13861244,
            "years": 1.5812507e-5,
            "minutes": 8.3167464,
            "seconds": 499.004784
        }
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:33.316Z",
        "request_id": "9a63faa3-e7c6-466c-8c01-3363af508750"
    },
    "status": "ok",
    "message": "Light travel time",
    "success": true
}