Zum Inhalt springen
GET /v1/percent

Percent composition

Live testen

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

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

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

API-Key holen

Code-Snippets

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

Beispiel-Response

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

{
    "data": {
        "note": "Mass percent = (element mass in one mole / molar mass) × 100. With a sample mass, the mass of each element is given too.",
        "inputs": {
            "formula": "C6H12O6",
            "sample_mass_g": 100,
            "molar_mass_g_mol": 180.156
        },
        "composition": [
            {
                "mass_g": 40.001998,
                "element": "C",
                "percent": 40.001998
            },
            {
                "mass_g": 6.714181,
                "element": "H",
                "percent": 6.714181
            },
            {
                "mass_g": 53.283821,
                "element": "O",
                "percent": 53.283821
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:05.015Z",
        "request_id": "e9bd47a0-c1af-4f3c-b8ff-e914e0374739"
    },
    "status": "ok",
    "message": "Percent comp",
    "success": true
}