Chemistry
Molar mass from formula API
Parses a chemical formula (nested parentheses, brackets, hydrate dots) and returns molar mass with a per-element mass breakdown and percent composition, using an audited inline atomic-weight table. Answers 'What is the molar mass of C6H12O6?', 'What percent of glucose is carbon?'.
Price$0.04per request
MethodPOST
Route/v1/chemistry/molar-mass
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chemistrymolar-massmolecular-weightformulastoichiometrypercent-compositionatomic-masschemical
API URL
Integration docshttps://x402.hexl.dev/v1/chemistry/molar-massExample request
{
"formula": "C6H12O6"
}Example response
{
"formula": "C6H12O6",
"molarMass": 180.156,
"units": "g/mol",
"atomCount": 24,
"composition": {
"C": 6,
"H": 12,
"O": 6
},
"breakdown": [
{
"element": "C",
"atomicMass": 12.011,
"count": 6,
"mass": 72.066,
"massPercent": 40.002
},
{
"element": "H",
"atomicMass": 1.008,
"count": 12,
"mass": 12.096,
"massPercent": 6.7142
},
{
"element": "O",
"atomicMass": 15.999,
"count": 6,
"mass": 95.994,
"massPercent": 53.2838
}
]
}Input schema
{
"type": "object",
"required": [
"formula"
],
"properties": {
"formula": {
"type": "string",
"description": "Chemical formula, e.g. C6H12O6, Fe2(SO4)3, CuSO4·5H2O",
"examples": [
"C6H12O6",
"Fe2(SO4)3",
"CuSO4·5H2O"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}