JSON API
Read-only JSON for the compounds, reactions and physical data behind the site. No key, no sign-up. Please keep it to a few requests per second.
/api/molecules/<cas>
One compound: names, formula, identifiers (SMILES, InChI, InChIKey), molar and exact mass, density, melting and boiling point, Antoine constants, azeotropes, reactions it takes part in, and a structure image URL.
curl -s https://chempirical.com/api/molecules/64-17-5 | jq '.name, .properties.molar_mass_g_per_mol, .physical.boilingPoint.text'
"Ethanol"
46.069
"78.5 °C"/api/molecules?q=
Search compounds by name, CAS number, formula or SMILES. Parameters: q, limit (at most 200), offset.
curl -s 'https://chempirical.com/api/molecules?q=caffeine&limit=2' | jq '.results[] | {cas, name, molarMass}'
{"cas": "58-08-2", "name": "Caffeine", "molarMass": 194.194}
{"cas": "5743-12-4", "name": "1H-Purine-2,6-dione, 3,7-dihydro-1,3,7-trimethyl-, hydrate (1:1)", "molarMass": 212.209}/api/molecules?substructure=
Every compound containing a fragment, given as SMILES or SMARTS, matched by structure over the whole catalogue. Parameters: substructure, limit (at most 200), offset. Results come in name order; capped says whether more exist.
curl -s 'https://chempirical.com/api/molecules?substructure=c1ccc2%5BnH%5Dccc2c1&limit=2' | jq '{total, capped, first: .results[0].name}'
{"total": 143, "capped": false, "first": "(-)-Mitragynine"}/api/molecules?similar=
Compounds most similar to a structure, given as SMILES: Tanimoto similarity of circular fingerprints, most similar first, each result carrying its similarity from 0 to 1. Parameters: similar, limit (at most 200), offset.
curl -s 'https://chempirical.com/api/molecules?similar=CC(%3DO)Oc1ccccc1C(%3DO)O&limit=3' | jq '.results[] | {name, similarity}'
{"name": "Aspirin", "similarity": 1}
{"name": "Acetylsalicylsalicylic acid", "similarity": 0.851}
{"name": "Carbasalate calcium", "similarity": 0.708}/api/molecules/identify?smiles=
One compound by its structure, given as SMILES, matched on the canonical structure so any spelling of the same molecule finds it. sameStereo says whether the match is the same stereoisomer or only the same constitution, and match is null when the catalogue has none. structureKey is the compound's identity from the structure alone: two spellings of one molecule share it, enantiomers and salts do not, and a structure the catalogue has never seen still gets one.
curl -s 'https://chempirical.com/api/molecules/identify?smiles=CCO' | jq '{name: .match.name, sameStereo, structureKey}'
{"name": "Ethanol", "sameStereo": true, "structureKey": "ab1de819…"}/api/molecules/resolve
POST a list of names, CAS numbers or SMILES (at most 200) as {"terms": [...]} and get each one matched to a catalogue compound with formula, molar mass, density, melting and boiling point, flash point, pKa and GHS hazards, or null when nothing matches. Same-origin only.
curl -s -X POST https://chempirical.com/api/molecules/resolve -H 'content-type: application/json' -H 'origin: https://chempirical.com' -d '{"terms": ["ethanol", "50-78-2"]}' | jq '.results[] | {term, name: .compound.name}'
{"term": "ethanol", "name": "Ethanol"}
{"term": "50-78-2", "name": "Aspirin"}/api/molecules/suggest?q=
Typeahead for compound pickers: the best eight matches with molar mass, density and boiling point.
curl -s 'https://chempirical.com/api/molecules/suggest?q=thf' | jq '.results[0] | {name, density, boilingPoint}'
{"name": "Tetrahydrofuran", "density": {"value": 0.89, ...}, "boilingPoint": {"value": 65, ...}}/api/molecule-svg/<cas>
The structure as SVG. Add ?theme=dark for light lines on a dark background.
curl -s https://chempirical.com/api/molecule-svg/50-78-2 > aspirin.svg/api/reactions
Reactions with filters: q (name and summary), reaction_type, source, calc_ready=1 for the ones with equivalents on file, limit, offset.
curl -s 'https://chempirical.com/api/reactions?calc_ready=1' | jq '.results[].slug'
"aldol-benzalacetone"
"cannizzaro-disproportionation"
.../api/reactions/<slug>
One reaction with its participants: role, equivalents, molar mass and density of each.
curl -s https://chempirical.com/api/reactions/henry-nitroaldol | jq '.participants[] | {name, role, equivalents}'/api/reactions/<slug>/scale
Scale a reaction from one reagent: anchor_cas, anchor_unit (g, mL, mmol or mol) and anchor_value.
curl -s 'https://chempirical.com/api/reactions/henry-nitroaldol/scale?anchor_cas=100-52-7&anchor_unit=g&anchor_value=10.6' | jq '.participants[] | {name, mass_g}'/api/antoine
Every set of Antoine constants in the database, log10(P/mmHg) = A − B/(C + T/°C), with its valid temperature range.
curl -s https://chempirical.com/api/antoine | jq '.results[0]'/api/azeotropes
Binary azeotropes with composition, boiling temperature and type.
curl -s https://chempirical.com/api/azeotropes | jq '.results[0]'Conventions
Responses are UTF-8 JSON with CORS open to every origin. Units are SI or the units chemists read: g/mol, g/mL, °C, mmHg. New fields may appear at any time, so ignore the ones you do not know. A missing compound or reaction answers 404 with an error message.