/v1/mole-fraction
Mole & mass fractions
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/gasmixture-api/v1/mole-fraction" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/gasmixture-api/v1/mole-fraction", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/gasmixture-api/v1/mole-fraction");
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/gasmixture-api/v1/mole-fraction",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"note": "Mole fraction = nᵢ / Σn. With molar masses, mass fractions and the average molar mass are also returned.",
"inputs": {
"components": 2,
"total_moles": 4
},
"mass_fractions": [
0.157895,
0.842105
],
"mole_fractions": [
0.75,
0.25
],
"partial_pressures": [
3,
1
],
"average_molar_mass": 9.5
},
"meta": {
"timestamp": "2026-06-04T18:38:01.617Z",
"request_id": "8c18559f-2c45-41fb-8978-1959e2bd6ad3"
},
"status": "ok",
"message": "Mole fraction",
"success": true
}