← clify home · catalogue

pubchem-ncbi API for agents (unofficial) — JSON over curl | clify

PubChem (NCBI) open chemistry database. This CLI searches compounds, genes, bioassays and literature, runs structure searches, fetches compound, gene, assay and element records, exports 2D/3D structures, and browses the periodic table, classification trees and data sources.

Host: pubchem.ncbi.nlm.nih.gov. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Example: curl 'https://clify-dev.netlify.app/sites.json'. Start with /search?q=weather, then call /abc/COMMAND. Responses are one JSON object. The hosted MCP and GitHub repo are also available.

Commands

search-compounds

Keyword search of PubChem compounds (name, synonym, formula, etc.) with sorting and paging Params: q*, sort, start, api_limit

curl 'https://clify-dev.netlify.app/pubchem-ncbi/search-compounds'

search-genes

Keyword search of PubChem gene targets Params: q*, sort, start, api_limit

curl 'https://clify-dev.netlify.app/pubchem-ncbi/search-genes'

search-bioassays

Keyword search of PubChem bioassays (AIDs) Params: q*, sort, start, api_limit

curl 'https://clify-dev.netlify.app/pubchem-ncbi/search-bioassays'

search-literature

Keyword search of literature (PubMed articles) linked to PubChem records Params: q*, sort, start, api_limit

curl 'https://clify-dev.netlify.app/pubchem-ncbi/search-literature'

count-search-hits

Count keyword hits in every PubChem collection (compound, substance, bioassay, gene, protein, taxonomy, pathway, cell, literature, patent) Params: q*

curl 'https://clify-dev.netlify.app/pubchem-ncbi/count-search-hits'

Run an identity, similarity, substructure, superstructure or 3D-similarity search seeded by a compound CID. Returns the hit count and a cache key. Params: cid*, type

curl 'https://clify-dev.netlify.app/pubchem-ncbi/structure-search'

resolve-name

Resolve a chemical name or identifier to PubChem records (preferred CID, RefChem); also reports whether the input is valid SMILES, SMARTS, InChI, etc. Params: name*

curl 'https://clify-dev.netlify.app/pubchem-ncbi/resolve-name?name=caffeine'

autocomplete

Autocomplete suggestions for compound, gene or taxonomy names from a prefix Params: q*, dictionary, api_limit

curl 'https://clify-dev.netlify.app/pubchem-ncbi/autocomplete'

get-compound

Full PubChem compound summary record (names, identifiers, properties, safety, pharmacology, etc.) by CID Params: cid*, heading

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-compound'

get-gene

PubChem gene target record by NCBI Gene ID Params: geneid*

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-gene'

get-bioassay

PubChem bioassay record (description, protocol, targets, results summary) by AID Params: aid*

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-bioassay'

get-element

PubChem element record (identifiers, properties, history, uses) by atomic number Params: atomic_number*

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-element'

get-compound-structure

Compound structure record as JSON (atoms, bonds, 2D or 3D coordinates, computed props) by CID Params: cid*, record_type

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-compound-structure?record_type=3d'

export-compound-sdf

Download a compound's 2D or 3D structure as SDF (MOL) text by CID Params: cid*, record_type

curl 'https://clify-dev.netlify.app/pubchem-ncbi/export-compound-sdf?record_type=3d'

list-elements

Periodic table: every element with symbol, mass, electron configuration, electronegativity, state, melting/boiling point, etc. Params: none

curl 'https://clify-dev.netlify.app/pubchem-ncbi/list-elements'

list-classifications

List the classification hierarchies in the PubChem Classification Browser (MeSH, ChEBI, ATC, Compound TOC, ...) with their HIDs Params: none

curl 'https://clify-dev.netlify.app/pubchem-ncbi/list-classifications'

get-classification-node

Expand a classification hierarchy node to show its children and record counts Params: hid*, start, depth

curl 'https://clify-dev.netlify.app/pubchem-ncbi/get-classification-node?hid=2&start=root'

list-sources

List all PubChem data sources (depositors) with substance/assay counts, category, organization, URL and license Params: none

curl 'https://clify-dev.netlify.app/pubchem-ncbi/list-sources'

list-news

Recent PubChem news and announcements Params: none

curl 'https://clify-dev.netlify.app/pubchem-ncbi/list-news'