Naar de inhoud
GET /v1/percent

Percent composition

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/molarmass-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

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_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}