/v1/planetary-hours
API-Key noetig Berechnung Klassische Planetenstunden (chaldaeisch) fuer Tag+Nacht.
Beschreibung
Liefert die 24 Planetenstunden des "Plan-Tags", der den angegebenen Zeitpunkt enthaelt — von Sonnenaufgang bis Sonnenaufgang. 12 Tagesstunden zwischen Sunrise und Sunset, 12 Nachtstunden zwischen Sunset und naechstem Sunrise. Tagesherrscher = Wochentag-Planet (Sonntag=Sonne, Montag=Mond, Dienstag=Mars, Mittwoch=Merkur, Donnerstag=Jupiter, Freitag=Venus, Samstag=Saturn). Stunden 1-24 zyklen die chaldaeische Reihe Saturn-Jupiter-Mars-Sonne-Venus-Merkur-Mond ab Tagesherrscher. Wochentag wird ueber longitude-korrigierte mean local time bestimmt. Polartag/-nacht produziert 500 (kein Sonnenauf-/untergang in 26h-Lookback).
Parameter
| Name | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
datetime |
body | string | ja | ISO 8601 UTC. |
location.latitude |
body | number | ja | Geo-Breite in Dezimalgrad, +N. Range -90..90. |
location.longitude |
body | number | ja | Geo-Laenge in Dezimalgrad, +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 '{
"datetime": "2026-04-20T12:00:00Z",
"location": {
"latitude": 52.52,
"longitude": 13.405
}
}' \
"https://astroapi.services/v1/planetary-hours"
<?php
$ch = curl_init("https://astroapi.services/v1/planetary-hours");
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, '{"datetime":"2026-04-20T12:00:00Z","location":{"latitude":52.52,"longitude":13.405}}');
$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->planetaryHours([
'datetime' => '2026-04-20T12:00:00Z',
'location' => [
'latitude' => 52.52,
'longitude' => 13.405,
],
]);
print_r($response);
const response = await fetch('https://astroapi.services/v1/planetary-hours', {
method: 'POST',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
"datetime": "2026-04-20T12:00:00Z",
"location": {
"latitude": 52.52,
"longitude": 13.405
}
}),
});
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.planetaryHours({
"datetime": "2026-04-20T12:00:00Z",
"location": {
"latitude": 52.52,
"longitude": 13.405
}
});
console.log(response);
import requests
url = 'https://astroapi.services/v1/planetary-hours'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
payload = {
"datetime": "2026-04-20T12:00:00Z",
"location": {
"latitude": 52.52,
"longitude": 13.405
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.planetary_hours({
'datetime': '2026-04-20T12:00:00Z',
'location': {
'latitude': 52.52,
'longitude': 13.405,
},
})
print(response)