Skip to main content
NIH chemical compound database providing detailed molecular data, properties, biological activities, and safety information for millions of substances. Best for chemistry research, drug interaction lookups, and identifying compound properties by name, formula, or structure. The authoritative source for chemical data — unlike general reference sources (Wikipedia), PubChem provides structured scientific data with safety and bioactivity annotations. 2 example endpoints available through Lava’s AI Gateway. See the PubChem API docs for full documentation.
This provider is managed — no additional setup required.
This is a catch-all provider — any valid URL under https://pubchem.ncbi.nlm.nih.gov/rest/pug is supported. Chemical compound database. Construct URL as https://pubchem.ncbi.nlm.nih.gov/rest/pug/{domain}/{identifier}/{operation}/{output}. Common: /compound/name//JSON, /compound/cid//property//JSON. The endpoints below are curated examples.

Endpoints

Look up compound by name

GET https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/aspirin/JSON — Free
const data = await lava.gateway('https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/aspirin/JSON', { method: 'GET' });

Batch look up compounds by name

POST https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/JSON — Free
const data = await lava.gateway('https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/JSON', { body: {"name":["aspirin","ibuprofen"]} });

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests