/v1/declinations
API-Key noetig Berechnung Deklinationen + Parallel/Contraparallel-Aspekte zu einem Zeitpunkt.
Beschreibung
Liefert aequatoriale Koordinaten (Rektaszension, Deklination + Speeds) der Standardplaneten zum angegebenen Zeitpunkt sowie optional Parallel- und Contraparallel-Aspekte zwischen ihnen. Parallel: gleiche Deklination mit gleichem Vorzeichen. Contraparallel: gleicher Betrag, entgegengesetztes Vorzeichen. Markiert Out-of-Bounds-Koerper (|Deklination| > 23.4366°). Default-Body-Set: Sonne, Mond, klassische 8 Planeten, Mondknoten (mean+true), Lilith (mean), Chiron — wer mehr will, gibt explizit "bodies" an.
Parameter
| Name | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
datetime |
body | string | ja | ISO 8601 UTC, z.B. "2026-04-20T12:00:00Z". |
bodies |
body | array | nein | Liste von Body-Namen aus dem libswe-Standardkatalog (z.B. ["sun","moon","mercury","venus","mars"]). Default: 14 Standardpunkte. Unbekannte Namen werden ignoriert. |
orb |
body | number | nein | Orbis fuer Parallels in Grad. Default 1.0, Maximum 3.0. |
include_parallels |
body | boolean | nein | Wenn false, werden nur Positionen ohne Paar-Aspekte zurueckgegeben. Default true. |
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",
"bodies": [
"sun",
"moon",
"mercury",
"venus",
"mars",
"jupiter",
"saturn"
],
"orb": 1
}' \
"https://astroapi.services/v1/declinations"
<?php
$ch = curl_init("https://astroapi.services/v1/declinations");
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","bodies":["sun","moon","mercury","venus","mars","jupiter","saturn"],"orb":1}');
$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->declinations([
'datetime' => '2026-04-20T12:00:00Z',
'bodies' => [
'sun',
'moon',
'mercury',
'venus',
'mars',
'jupiter',
'saturn',
],
'orb' => 1,
]);
print_r($response);
const response = await fetch('https://astroapi.services/v1/declinations', {
method: 'POST',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
"datetime": "2026-04-20T12:00:00Z",
"bodies": [
"sun",
"moon",
"mercury",
"venus",
"mars",
"jupiter",
"saturn"
],
"orb": 1
}),
});
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.declinations({
"datetime": "2026-04-20T12:00:00Z",
"bodies": [
"sun",
"moon",
"mercury",
"venus",
"mars",
"jupiter",
"saturn"
],
"orb": 1
});
console.log(response);
import requests
url = 'https://astroapi.services/v1/declinations'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
payload = {
"datetime": "2026-04-20T12:00:00Z",
"bodies": [
"sun",
"moon",
"mercury",
"venus",
"mars",
"jupiter",
"saturn"
],
"orb": 1
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.declinations({
'datetime': '2026-04-20T12:00:00Z',
'bodies': [
'sun',
'moon',
'mercury',
'venus',
'mars',
'jupiter',
'saturn',
],
'orb': 1,
})
print(response)