Aller au contenu
GET /v1/distance

Distance from parallax

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/parallax-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/parallax-api/v1/distance" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/parallax-api/v1/distance", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/parallax-api/v1/distance");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/parallax-api/v1/distance",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "d(pc) = 1/p(arcsec). A parallax of 1 arcsec is 1 parsec ≈ 3.2616 light-years. Proxima Centauri's 0.7687 arcsec gives ≈1.30 pc (4.24 ly).",
        "inputs": {
            "parallax_arcsec": 0.7687
        },
        "distance_au": 268329.3951,
        "distance_parsec": 1.30089762,
        "distance_light_years": 4.24296055
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:26.354Z",
        "request_id": "3455a0aa-1050-4e49-af56-1271597308e8"
    },
    "status": "ok",
    "message": "Distance from parallax",
    "success": true
}