Zum Inhalt springen
GET /v1/force

Newton's law of gravitation

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/gravitation-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/gravitation-api/v1/force" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gravitation-api/v1/force", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gravitation-api/v1/force");
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/force",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "formula": "F = G·m1·m2/r²; G = 6.6743×10⁻¹¹ N·m²/kg².",
        "mass1_kg": 5.972e+24,
        "mass2_kg": 7.348e+22,
        "distance_m": 384400000,
        "gravitational_force_n": 1.982110729079252e+20,
        "gravitational_constant": 6.6743e-11
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:41.217Z",
        "request_id": "3680871f-7f33-4ec1-9a79-7d9a428c1345"
    },
    "status": "ok",
    "message": "Gravitational force",
    "success": true
}