/v1/range
Sun times for a date range
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/range" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sunrise-api/v1/range", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sunrise-api/v1/range");
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/range",
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": {
"end": "2026-06-22",
"lat": 52.52,
"lng": 13.405,
"days": [
{
"date": "2026-06-20",
"sunset": "2026-06-20T19:35:19+00:00",
"sunrise": "2026-06-20T02:40:38+00:00",
"day_length": {
"hours": 16.91,
"seconds": 60881,
"formatted": "16h 54m"
},
"solar_noon": "2026-06-20T11:07:58+00:00"
},
{
"date": "2026-06-21",
"sunset": "2026-06-21T19:35:33+00:00",
"sunrise": "2026-06-21T02:40:50+00:00",
"day_length": {
"hours": 16.91,
"seconds": 60883,
"formatted": "16h 54m"
},
"solar_noon": "2026-06-21T11:08:12+00:00"
},
{
"date": "2026-06-22",
"sunset": "2026-06-22T19:35:44+00:00",
"sunrise": "2026-06-22T02:41:05+00:00",
"day_length": {
"hours": 16.91,
"seconds": 60879,
"formatted": "16h 54m"
},
"solar_noon": "2026-06-22T11:08:25+00:00"
}
],
"count": 3,
"start": "2026-06-20",
"times_in": "UTC"
},
"meta": {
"timestamp": "2026-05-30T03:39:09.965Z",
"request_id": "1a1ef3a5-dd7f-498b-92da-d35915566254"
},
"status": "ok",
"message": "Sun times range retrieved successfully",
"success": true
}