Get Compound Details
pubchem_get_compound_detailsFetch detailed PubChem compound data by CID: physicochemical properties, synonyms, pharmacology, drug-likeness, and classification. Handles up to 100 CIDs per call and pages remaining results.
Instructions
Get detailed compound information by CID. Returns physicochemical properties (molecular weight, SMILES, InChIKey, XLogP, TPSA, etc.), optionally with a textual description (pharmacology, mechanism, therapeutic use), known synonyms, drug-likeness assessment (Lipinski/Veber rules), and/or pharmacological classification (FDA classes, MeSH classes, ATC codes). Fetches up to 100 CIDs per call; CIDs past that are returned in unprocessed for a follow-up call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cids | Yes | PubChem Compound IDs to fetch. The per-call cap is 100: the first 100 are fetched, and any past that (up to 1000 in all) are returned in unprocessed, in input order, and reported in cappedInputs. Resolve from names/SMILES with pubchem_search_compounds. | |
| properties | No | Properties to retrieve. Defaults to a core set: MolecularFormula, MolecularWeight, IUPACName, CanonicalSMILES, IsomericSMILES, InChIKey, XLogP, TPSA, HBondDonorCount, HBondAcceptorCount, RotatableBondCount, HeavyAtomCount, Charge, Complexity. | |
| maxSynonyms | No | Max synonyms returned per compound per page. The per-call cap is 100: a larger value (up to 1000) returns 100 per compound and is reported in cappedInputs. PubChem lists hundreds for common drugs; use synonymOffset to reach the ones past this page. Default: 20. | |
| synonymOffset | No | Zero-based index of the first synonym to return within each compound's synonym list. The same offset is applied to every compound in the batch. Pass the nextSynonymOffset from a previous call to read the following page. Default: 0. | |
| includeSynonyms | No | Fetch known names and synonyms (trade names, systematic names, registry numbers), paged via synonymOffset/maxSynonyms. Fetched for every found CID in the batch. Slower for large CID lists. | |
| maxDescriptions | No | Max number of distinct description entries per compound per page. The per-call cap is 20: a larger value (up to 1000) returns 20 per compound and is reported in cappedInputs. PubChem returns near-duplicate summaries from many depositors; duplicates are collapsed before this cap applies. Default: 3. | |
| descriptionOffset | No | Zero-based index of the first description to return within each compound's description list. The same offset is applied to every compound in the batch. Pass the nextDescriptionOffset from a previous call to read the following page. Default: 0. | |
| includeDescription | No | Include textual descriptions (pharmacology, mechanism, therapeutic use) attributed by source. Well-studied compounds have many overlapping summaries — paged via descriptionOffset/maxDescriptions. Fetched only for the first 10 CIDs in the batch; remaining CIDs return without descriptions and are listed in the response's skippedCids. | |
| includeDrugLikeness | No | Compute drug-likeness assessment: Lipinski Rule of Five (MW, XLogP, HBD, HBA) and Veber rules (TPSA, rotatable bonds). Computed from the returned properties, so it adds no latency. | |
| includeClassification | No | Include pharmacological classification: FDA Established Pharmacologic Classes, mechanisms of action, MeSH classes, and ATC codes. Fetched only for the first 10 CIDs in the batch; remaining CIDs return without classification and are listed in the response's skippedCids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Recovery guidance covering the skipped CIDs, an offset that runs past every compound, and pages that remain. Absent when nothing was skipped or truncated. | |
| compounds | No | Compound detail records, one per CID fetched, in input order. CIDs past the per-call cap are in unprocessed instead. | |
| truncated | No | True when this response is not the whole picture: a compound has further synonyms or descriptions past this page, CIDs were skipped by the per-call fan-out limit, or CIDs past the per-call cap were left unfetched. Per-compound totals are in compounds[].synonymsTotal / compounds[].descriptionsTotal; the skipped CIDs are in skippedCids, the unfetched ones in unprocessed. | |
| skippedCids | No | CIDs found in PubChem whose descriptions and classification were NOT fetched because the batch exceeded the per-call fan-out limit. Their absence from a record means "not requested", not "PubChem has none" — re-request these CIDs in a follow-up call. Present only when CIDs were skipped. | |
| unprocessed | No | CIDs past the per-call cap of 100, in input order, not fetched. Pass them in a follow-up call. Omitted when every CID was fetched. | |
| cappedInputs | No | Inputs that asked for more than their per-call cap, with the value requested and the value served. An ID batch lists the IDs past the cap in unprocessed. Omitted when every input was within its cap. | |
| enrichedCids | No | CIDs whose descriptions and classification were fetched. Present only when the batch exceeded the per-call fan-out limit and other CIDs were skipped. | |
| synonymOffset | No | Zero-based index of the first synonym returned within each compound's list. Present when includeSynonyms is true. | |
| descriptionOffset | No | Zero-based index of the first description returned within each compound's list. Present when includeDescription is true. | |
| nextSynonymOffset | No | synonymOffset to pass on the next call to continue past this page. Omitted when no compound in the batch has further synonyms. | |
| nextDescriptionOffset | No | descriptionOffset to pass on the next call to continue past this page. Omitted when no compound in the batch has further descriptions. |