Agent skill · Databases

pubchem-compound-search

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.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill pubchem-compound-search --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 27 KB
Bundled scripts: none
Path: skills/sciagent/pubchem-compound-search/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Queries PubChem (110M+ compounds) directly via the PUG-REST JSON API using plain requests. It supports searching by name, CID, SMILES, InChIKey, or formula, retrieving properties (MW, XLogP, TPSA, HBond counts, etc.), performing similarity and substructure searches with an async ListKey polling mechanism, fetching synonyms and descriptions, retrieving assay summaries, and downloading SDF or PNG structure representations. It notes usage in local cheminformatics with rdkit and bioactivity workflows with chembl-database-bioactivity.

How it works

  • Uses the PubChem REST URL pattern: https://pubchem.ncbi.nlm.nih.gov/rest/pug/<input>/<operation>/<output> where inputs include compound/{name,cid,smiles,inchikey,formula} and operations include cids, property/<list>, synonyms, description, assaysummary, JSON, SDF, PNG.
  • For long-running operations (similarity, substructure, formula) the API returns HTTP 202 with a Waiting ListKey; the skill then polls compound/listkey/{key}/cids/JSON until IdentifierList appears. It provides a helper to poll and extract CID lists.
  • Module 1 resolves identifiers to CIDs; Module 2 retrieves properties in a single batched /property/<csv>/JSON call; Module 3 fetches synonyms/description; Module 4 handles asynchronous similarity/substructure searches; Module 5 fetches assay summaries; Module 6 downloads SDF/PNG structures.
  • Property names include MolecularWeight, MolecularFormula, SMILES, IUPACName, InChI(InChIKey), XLogP, TPSA, HBondDonorCount, HBondAcceptorCount, RotatableBondCount, HeavyAtomCount, Charge; CSV can join multiple properties.

When to use it

  • To look up a compound by name, SMILES, InChIKey, or formula to obtain a PubChem CID
  • To retrieve molecular properties for one or more CIDs in batch
  • To find structurally similar compounds via Tanimoto similarity (async polling)
  • To search for substructures or pharmacophore motifs within PubChem
  • To fetch synonyms or descriptions for a CID
  • To pull assay summaries related to a CID
  • To download 2D SDF or PNG structure representations
  • To prepare data for RDKit-based workflows or to explore bioactivity data via ChemBL integration

What it can touch

  • Primitives: uses requests (Python package) and standard URL-based PubChem API endpoints listed in the examples
  • No external SDKs required; direct HTTP calls are used
  • Supports downloading SDF and PNG via /SDF and /PNG endpoints

Caveats

  • Rate limits are noted: up to 5 requests/second and 400 requests/minute per IP; throttle with time.sleep(0.25) in loops, and handle HTTP 503 as a throttle signal
  • The license is CC-BY-4.0; usage should comply with attribution requirements
  • The description specifies optional tools for local cheminformatics (rdkit) and bioactivity workflows (chembl-database-bioactivity); no direct guarantees beyond API behavior
From the SKILL.md

# 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`). The URL pattern is fixed and predictable: ``` https://pubchem.ncbi.nlm.nih.gov/rest/pug/<input>/<operation>/<output> ``` - `<input>` = `compound/{name,cid,smiles,inchikey,formula}/<value>` - `<operation>` = `cids`, `property/<list>`, `synonyms`, `description`, `assaysummary`, `JSON` (full record), `SDF`, `PNG` - `<output>` = `JSON`, `CSV`, `TXT`, `SDF`, `PNG` 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, InCh

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Prerequisites
  4. Quick Start
  5. Core API
  6. Module 1: Identifier lookup
  7. Module 2: Property retrieval
  8. Module 3: Synonyms and description
  9. Module 4: Similarity & substructure search (async ListKey pattern)
  10. Module 5: Assay summary (bioactivity data)
  11. Module 6: Structure file download (SDF / PNG)
  12. Key Concepts
  13. Async ListKey pattern
  14. Property name reference
Commands it runs
pip install requests pandas
More from awesome-bio-agent-skills
All skills →
About this skill
What does the pubchem-compound-search skill do?

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.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill pubchem-compound-search --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going