Catalog/chem-moles-grams

Chemistry

Moles to grams converter API

Converts between grams and moles using a formula (molar mass auto-derived) or explicit molar mass, and returns the particle count via Avogadro's number. Answers 'How many moles are in 36 g of water?', 'How many grams is 2 mol of NaCl?'.

Price$0.02per request
MethodPOST
Route/v1/chemistry/moles-grams
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
chemistrymolesgramsavogadroconversionamount-of-substancestoichiometrymolar-mass
API URLhttps://x402.hexl.dev/v1/chemistry/moles-grams
Integration docs
Example request
{
  "formula": "H2O",
  "grams": 36.03
}
Example response
{
  "molarMass": 18.015,
  "units": "g/mol",
  "grams": 36.03,
  "moles": 2,
  "particles": 1.204428152e+24,
  "formula": "moles = grams / molarMass"
}
Input schema
{
  "type": "object",
  "properties": {
    "formula": {
      "type": "string",
      "examples": [
        "H2O",
        "NaCl"
      ]
    },
    "molarMass": {
      "type": "number"
    },
    "grams": {
      "type": "number"
    },
    "moles": {
      "type": "number"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}