/v1/asteroids
API-Key noetig Berechnung Asteroiden-Positionen zu einem Zeitpunkt (Live-Berechnung).
Beschreibung
Berechnet ekliptikale Positionen einer Liste von Asteroiden zum angegebenen UTC-Zeitpunkt. Eingabe akzeptiert MPC-Nummern (z.B. 433 fuer Eros) oder Namen (z.B. "ceres", "lilith"). Aliase: "lilith" und "black_moon" werden auf Mean Apogee gemappt, "true_lilith" auf Osculating Apogee. Pro Request maximal 50 Asteroiden — Live-Berechnung ohne Cache.
Parameter
| Name | In | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
at |
body | string | ja | ISO 8601 UTC, z.B. "2026-04-20T12:00:00Z". |
asteroids |
body | array | ja | Liste aus Namen (string) und/oder MPC-Nummern (integer). Beispiel: ["ceres", 433, "lilith"]. |
key_by |
body | string | nein | Optional "mpc_number": positions wird ein Objekt mit MPC-Nummern als Keys statt eines Arrays. Default: numerischer Index. |
Beispiel-Aufruf
curl -sS \
-H "X-API-Key: ak_test_<DEIN_KEY>" \
-H "Content-Type: application/json" \
-X POST \
-d '{
"at": "2026-04-20T12:00:00Z",
"asteroids": [
"ceres",
433,
"lilith"
]
}' \
"https://astroapi.services/v1/asteroids"
<?php
$ch = curl_init("https://astroapi.services/v1/asteroids");
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, '{"at":"2026-04-20T12:00:00Z","asteroids":["ceres",433,"lilith"]}');
$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->asteroids([
'at' => '2026-04-20T12:00:00Z',
'asteroids' => [
'ceres',
433,
'lilith',
],
]);
print_r($response);
const response = await fetch('https://astroapi.services/v1/asteroids', {
method: 'POST',
headers: { 'X-API-Key': 'ak_test_<DEIN_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
"at": "2026-04-20T12:00:00Z",
"asteroids": [
"ceres",
433,
"lilith"
]
}),
});
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.asteroids({
"at": "2026-04-20T12:00:00Z",
"asteroids": [
"ceres",
433,
"lilith"
]
});
console.log(response);
import requests
url = 'https://astroapi.services/v1/asteroids'
headers = {'X-API-Key': 'ak_test_<DEIN_KEY>'}
payload = {
"at": "2026-04-20T12:00:00Z",
"asteroids": [
"ceres",
433,
"lilith"
]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
from astroapi_client import AstroApiClient
api = AstroApiClient('ak_test_<DEIN_KEY>')
response = api.asteroids({
'at': '2026-04-20T12:00:00Z',
'asteroids': [
'ceres',
433,
'lilith',
],
})
print(response)