/v1/mole-fraction
Mole & mass fractions
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}