Aller au contenu
GET /v1/weight

Weight on a body

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/gravitation-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/gravitation-api/v1/weight" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gravitation-api/v1/weight", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gravitation-api/v1/weight");
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/gravitation-api/v1/weight",
    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": {
        "body": "mars",
        "formula": "W = m·g_body; ratio = g_body/g_earth.",
        "mass_kg": 70,
        "weight_n": 259.7,
        "weight_kgf": 26.48203,
        "ratio_to_earth": 0.378315,
        "weight_on_earth_n": 686.4655,
        "surface_gravity_ms2": 3.71
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:41.308Z",
        "request_id": "99494b52-88de-4382-a812-40e4d66e4111"
    },
    "status": "ok",
    "message": "Weight on a body",
    "success": true
}