Search PubChem for chemical compounds, properties, and identifiers
Query the PubChem database for chemical compounds, molecular properties, SMILES, InChI, and related data. PubChem is NCBI's open chemistry database.
python3 {baseDir}/scripts/pubchem_search.py --query "aspirin"
python3 {baseDir}/scripts/pubchem_search.py --cid 2244
python3 {baseDir}/scripts/pubchem_search.py --cid 2244 --format detailed
python3 {baseDir}/scripts/pubchem_search.py --query "caffeine" --max-results 5
| Parameter | Description | Default |
|---|---|---|
--query | Compound name or search term | - |
--cid | PubChem Compound ID | - |
--max-results | Max results for search | 10 |
--format | Output: summary, detailed, json | summary |