Aller au contenu
GET /v1/meta

Spec

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/molarmass-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/molarmass-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/molarmass-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/molarmass-api/v1/meta");
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/meta",
    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": {
        "notes": "Formulas support parentheses, square brackets and hydrate dots (·, ., *), e.g. Ca(OH)2, [Fe(CN)6]3, CuSO4.5H2O. IUPAC conventional atomic weights; Nₐ = 6.02214076×10²³.",
        "service": "molarmass-api",
        "formulae": {
            "mole": "n = mass / M = molecules / Nₐ",
            "percent": "element mass / molar mass × 100",
            "molar_mass": "Σ(atomic weight × count)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/convert": "Convert between moles, mass (g) and molecules for a formula.",
            "GET /v1/percent": "Percent composition, and the mass of each element in a given sample mass.",
            "GET /v1/molarmass": "Molar mass, atom count and per-element percent composition of a formula."
        },
        "description": "Molar-mass and stoichiometry calculator: parse a chemical formula (parentheses, brackets, hydrates) for its molar mass and percent composition, and convert between moles, mass and molecules."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:05.142Z",
        "request_id": "b94d3843-0e6b-42b6-b52a-d77030111f09"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}