Query PubChem (110M+ compounds) directly via the PUG-REST/JSON API with plain `requests` — no SDK install required. Search by name/CID/SMILES/InChIKey/formula, retrieve properties (MW, XLogP, TPSA, H-bond counts), do similarity/substructure searches with async ListKey polling, fetch synonyms, descriptions, assay summaries, and download SDF/PNG. For local cheminformatics use rdkit; for bioactivity-centric workflows use chembl-database-bioactivity.
SkillScore95Maintained
Automatic
◆Research pack
Last verified 8/24/2026
What it changes
Passed 20 of 21 test cases with the skill, and 17 of 21 without it.
Without skill82%
With skill95%
Checks it passed that the model alone missed
The structure image endpoint includes image_size=large
The API request targets the compound/cid/2244/assaysummary/JSON endpoint
Properties for all CIDs are retrieved in a single batched CID property query URL
and 2 more in the full report
3 fixed18 passed either way1 still failing0 broke
Pass-rate lift
+14 pp
Tokens
+333%
Agent turns
0%
Response time
-22%
Model gemini-3.6-flashMeasured 8/24/2026v121 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 3
Prompt
I want to check the bioassay screening summary table for compound CID 2244 using PUG-REST. What endpoint should be requested and how is the returned tabular data converted into a pandas DataFrame?
What was checked, without and with the skill
Checked
Without skill
With skill
The API request targets the compound/cid/2244/assaysummary/JSON endpoint
Missed
Passed
The DataFrame is constructed from the Cell arrays in the response Table Row list
Missed
Passed
case-11 · gemini-3.6-flash · 8/24/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md529 linessingle file
PubChem Compound Search
Overview
PubChem (NCBI) is the largest freely available chemical database — 110M+ compounds, 280M+ substances, and millions of bioassay records. Its PUG-REST JSON API is the canonical programmatic surface, and every example here uses it directly via plain requests. The Python pubchempy wrapper is not required; the PUG-REST URL grammar is small enough that direct calls are more transparent, easier to retry/cache, and avoid sandbox dependency issues (the library is not in TOOL_STATUS.md).
For long-running operations (similarity, substructure, formula) the API returns HTTP 202 + {"Waiting": {"ListKey": "..."}}; poll compound/listkey/{key}/cids/JSON until it returns IdentifierList. The skill handles this pattern in Module 4.
When to Use
Looking up a compound by name, SMILES, InChIKey, or formula to get its PubChem CID
Retrieving molecular properties (molecular weight, XLogP, TPSA, H-bond donor/acceptor counts, rotatable bonds, formula, IUPAC name) for one or many CIDs in a single request
Finding structurally similar compounds via Tanimoto similarity (async ListKey poll)
Searching for compounds containing a substructure / pharmacophore motif
Fetching every synonym / trade name / CAS number for a CID
Pulling assay summary tables (active/inactive screening results) for a compound
Converting between identifier formats (name ↔ CID ↔ SMILES ↔ InChI ↔ InChIKey) in one API call
Downloading 2D SDF or PNG structures for figures or downstream RDKit work
For local cheminformatics (fingerprints, descriptors, 3D conformers, scaffold extraction) use rdkit
For deeper bioactivity / target-binding data (IC50, Ki against specific targets) use chembl-database-bioactivity
Prerequisites
Python packages: requests, pandas — both already in standard environments
No API key required — PubChem is fully public
Rate limits: max 5 requests/second and 400 requests/minute per IP. Throttle with time.sleep(0.25) in loops; return code 503 means you tripped the limit.
If you are inside a pixi/conda environment that already provides requests and pandas, skip the install and invoke scripts with pixi run python ....