Ir al contenido
GET /v1/travel-time

Light travel time

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/lighttime-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

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_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "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
}