/v1/occultations
API-Key noetig Ereignisse Bedeckungen von Planeten und Fixsternen durch den Mond ("kleine Finsternisse").
Beschreibung
Findet alle Mond-Bedeckungen der Ziele im Zeitraum — global mit Typ (total/partial), Anfangs-/Endzeit und zentralem Erdort; mit "location" zusaetzlich lokale Sichtbarkeit und oertliche Kontaktzeiten (Immersion/Emersion). Ziele: Planeten (mercury..pluto, chiron, ceres, pallas, juno, vesta) oder beliebige Fixsterne per Name (sefstars-Katalog; Sterne weit ab der Ekliptik werden mit klarer Meldung abgelehnt — z. B. "occultation never occurs"). Beruehmte Referenzen: Mars 8.12.2022, Aldebaran-/Regulus-Serien.
Parameter
| Name | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
start |
body | string | ja | ISO 8601 UTC. |
end |
body | string | ja | ISO 8601 UTC, max. ~100 Jahre nach start. |
bodies |
body | array | nein | 1..12 Ziele: Planeten-Namen und/oder Fixstern-Namen. Default: mercury, venus, mars, jupiter, saturn. |
location |
body | object | nein | {latitude, longitude, altitude?} — liefert pro Ereignis zusaetzlich lokale Sichtbarkeit + Immersion/Emersion. |
Beispiel-Aufruf
curl -sS \
-H "X-API-Key: ak_test_<DEIN_KEY>" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"start": "2022-12-01T00:00:00Z",
"end": "2023-01-01T00:00:00Z",
"bodies": [
"mars"
],
"location": {
"latitude": 48.14,
"longitude": 11.58
}
}' \
"https://astroapi.services/v1/occultations"
<?php
$ch = curl_init("https://astroapi.services/v1/occultations");
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":"2022-12-01T00:00:00Z","end":"2023-01-01T00:00:00Z","bodies":["mars"],"location":{"latitude":48.14,"longitude":11.58}}');
$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->occultations([
'start' => '2022-12-01T00:00:00Z',
'end' => '2023-01-01T00:00:00Z',
'bodies' => [
'mars',
],
'location' => [
'latitude' => 48.14,
'longitude' => 11.58,
],
]);
print_r($response);
const response = await fetch('https://astroapi.services/v1/occultations', {
method: 'POST',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
"start": "2022-12-01T00:00:00Z",
"end": "2023-01-01T00:00:00Z",
"bodies": [
"mars"
],
"location": {
"latitude": 48.14,
"longitude": 11.58
}
}),
});
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.occultations({
"start": "2022-12-01T00:00:00Z",
"end": "2023-01-01T00:00:00Z",
"bodies": [
"mars"
],
"location": {
"latitude": 48.14,
"longitude": 11.58
}
});
console.log(response);
import requests
url = 'https://astroapi.services/v1/occultations'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
payload = {
"start": "2022-12-01T00:00:00Z",
"end": "2023-01-01T00:00:00Z",
"bodies": [
"mars"
],
"location": {
"latitude": 48.14,
"longitude": 11.58
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.occultations({
'start': '2022-12-01T00:00:00Z',
'end': '2023-01-01T00:00:00Z',
'bodies': [
'mars',
],
'location': {
'latitude': 48.14,
'longitude': 11.58,
},
})
print(response)