Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Chemical identifiers, properties, and bioassay links for building compound lookup and structure-reference tools.
From source to product signal
PubChem PUG REST returns compound records by name or CID. Start with one chemical name. Properties can come from predicted or deposited sources, name resolution can hit multiple CIDs, and this is not a regulatory label.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/aspirin/property/MolecularFormula,MolecularWeight,IUPACName/JSON",
timeout=30,
)
response.raise_for_status()
compounds = pd.DataFrame(response.json()["PropertyTable"]["Properties"])
compounds["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(compounds)Test a useful signal
Test whether PUG REST can power a bounded compound-reference card.
National Center for Biotechnology Information is a government source. Last verified 2026-08-18. Temporal coverage: continuously updated compound records.