/v1/times
Sun times for one date
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/sunrise-api/v1/times" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sunrise-api/v1/times", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sunrise-api/v1/times");
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/sunrise-api/v1/times",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"lat": 52.52,
"lng": 13.405,
"date": "today",
"sunset": "2026-05-30T19:18:58+00:00",
"sunrise": "2026-05-30T02:48:54+00:00",
"times_in": "UTC",
"day_length": {
"hours": 16.5,
"seconds": 59404,
"formatted": "16h 30m"
},
"solar_noon": "2026-05-30T11:03:56+00:00",
"civil_twilight": {
"end": "2026-05-30T20:03:51+00:00",
"begin": "2026-05-30T02:04:01+00:00"
},
"nautical_twilight": {
"end": "2026-05-30T21:15:21+00:00",
"begin": "2026-05-30T00:52:31+00:00"
},
"astronomical_twilight": {
"end": "1970-01-01T00:00:01+00:00",
"begin": "1970-01-01T00:00:01+00:00"
}
},
"meta": {
"timestamp": "2026-05-30T03:39:21.837Z",
"request_id": "099adf8b-aa43-49bf-bac0-616c80f102cd"
},
"status": "ok",
"message": "Sun times retrieved successfully",
"success": true
}