Zum Inhalt springen
GET /v1/density

Ideal-gas density

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

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

{
    "data": {
        "note": "Ideal-gas density ρ = P·M / (R·T). Molar mass defaults to g/mol (air ≈ 28.96).",
        "input": {
            "pressure_pa": 101325,
            "temperature_k": 288,
            "molar_mass_kg_per_mol": 0.02896
        },
        "density_g_per_l": 1.22543,
        "density_kg_per_m3": 1.22543
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:13.253Z",
        "request_id": "ee3fbf52-6bdd-43c1-976e-4e62078085f2"
    },
    "status": "ok",
    "message": "Gas density",
    "success": true
}