/v1/position
Solar position
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/solarposition-api/v1/position" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/solarposition-api/v1/position", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/solarposition-api/v1/position");
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/solarposition-api/v1/position",
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": "Elevation is the sun's angle above the horizon (negative = below); azimuth is measured clockwise from true north (90°=E, 180°=S, 270°=W). Timezone is the local UTC offset in hours.",
"inputs": {
"date": "2024-06-20",
"time": "12:00:00",
"latitude": 40,
"timezone": 0,
"longitude": 0
},
"zenith_deg": 16.565771,
"azimuth_deg": 178.626274,
"above_horizon": true,
"elevation_deg": 73.434229,
"hour_angle_deg": -0.426857,
"declination_deg": 23.438149,
"equation_of_time_min": -1.707428
},
"meta": {
"timestamp": "2026-06-05T11:30:36.943Z",
"request_id": "2f28c2f2-72f7-4fc7-8e76-91ad032580d1"
},
"status": "ok",
"message": "Solar position",
"success": true
}