chem

Look up a chemical compound by CID, common/IUPAC name...

Look up a chemical compound by CID, common/IUPAC name, SMILES, or InChIKey. Returns CID, preferred name, IUPAC name, molecular formula, molecular weight, exact mass, SMILES, connectivity SMILES, InChI, InChIKey, XLogP, formal charge, the 10 most-common synonyms, a PubChem permalink, and source attribution. Data is sourced from NIH PubChem (public domain). Provide exactly one of cid, name, smiles, or inchikey.

get/api/chem/compound

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/chem/compound
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

cidinteger

PubChem Compound ID (CID), e.g. 2244 for aspirin.

namestring

Common, trade, or IUPAC name, e.g. "aspirin" or "ibuprofen".

smilesstring

SMILES structural notation, e.g. "CC(=O)Oc1ccccc1C(=O)O".

inchikeystring

InChIKey (27-char hashed identifier), e.g. "BSYNRYMUTXBXSQ-UHFFFAOYSA-N".

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.