/v1/travel-time
Light travel time
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
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_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo 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
}