/v1/eclipses
API-Key noetig Berechnung Sonnen- und Mondfinsternisse im Window, optional mit Beobachter-Standort.
Beschreibung
Liefert alle Sonnen- und Mondfinsternisse zwischen "start" und "end". Globaler Modus (default): jede Sonnenfinsternis kommt mit Bodenpunkt der groessten Bedeckung (greatest_eclipse_geo) und Magnitude; jede Mondfinsternis mit Umbral- und Penumbral-Magnitude (global gueltig) sowie 6 Kontaktzeiten. Lokaler Modus (location gesetzt): pro Event Sichtbarkeit, lokale Kontaktzeiten und Sonnen-/Mondhoehe. Klassifikation: solar_total, solar_annular, solar_hybrid, solar_partial bzw. lunar_total, lunar_partial, lunar_penumbral. Maximales Fenster: 3650 Tage (10 Jahre).
Parameter
| Name | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
start |
body | string | ja | ISO 8601 UTC, Beginn des Suchfensters. |
end |
body | string | ja | ISO 8601 UTC, Ende. Maximal 3650 Tage nach "start". |
types |
body | array | nein | Welche Eclipse-Typen. Default ["solar","lunar"]. Erlaubt: solar | lunar. |
location.latitude |
body | number | nein | Beobachter-Breite in °, +N. Range -90..90. Wenn gesetzt, lokaler Modus. |
location.longitude |
body | number | nein | Beobachter-Laenge in °, +E. Range -180..180. |
location.altitude |
body | number | nein | Hoehe ueber NN in Metern. Default 0. |
Beispiel-Aufruf
curl -sS \
-H "X-API-Key: ak_test_<DEIN_KEY>" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"start": "2026-01-01T00:00:00Z",
"end": "2026-12-31T23:59:59Z"
}' \
"https://astroapi.services/v1/eclipses"
<?php
$ch = curl_init("https://astroapi.services/v1/eclipses");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: ak_test_<DEIN_KEY>", "Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"start":"2026-01-01T00:00:00Z","end":"2026-12-31T23:59:59Z"}');
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
<?php
require 'astroapi-client.php';
$api = new AstroApiClient('ak_test_<DEIN_KEY>');
$response = $api->eclipses([
'start' => '2026-01-01T00:00:00Z',
'end' => '2026-12-31T23:59:59Z',
]);
print_r($response);
const response = await fetch('https://astroapi.services/v1/eclipses', {
method: 'POST',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
"start": "2026-01-01T00:00:00Z",
"end": "2026-12-31T23:59:59Z"
}),
});
const data = await response.json();
console.log(data);
import { AstroApiClient } from './astroapi-client.js';
const api = new AstroApiClient('ak_test_<DEIN_KEY>');
const response = await api.eclipses({
"start": "2026-01-01T00:00:00Z",
"end": "2026-12-31T23:59:59Z"
});
console.log(response);
import requests
url = 'https://astroapi.services/v1/eclipses'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
payload = {
"start": "2026-01-01T00:00:00Z",
"end": "2026-12-31T23:59:59Z"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.eclipses({
'start': '2026-01-01T00:00:00Z',
'end': '2026-12-31T23:59:59Z',
})
print(response)