ConstThe compound's CID
The ranked synonym list, or undefined if the CID is unknown
await getSynonymsByCid(180);
// Returns: ["acetone", "propan-2-one", "67-64-1", "2-propanone", ...]
export const getSynonymsByCid: (cid: PubChemCID) => Promise<string[] | undefined> = withTtlCache(
getSynonymsByCidUncached,
{ namespace: 'synonymsByCid' },
);
Fetches PubChem's popularity-ranked synonyms for a compound by CID via PUG-REST. Prefer this over getRankedNamesByName when the CID is already known, as it avoids an ambiguous name lookup. Cached for three days.