Skip to content
Agentmart
Submit a tool

pubchem-compound

Search and retrieve chemical compound data from PubChem's PUG REST API (110M+ compounds).

Skill by beita6969

IndexedMIT★ 1,019
Write a review

Chalk Labs

Need help deploying pubchem-compound?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/beita6969-pubchem-compound

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Search and retrieve chemical compound data from PubChem's PUG REST API (110M+ compounds). Use when the user needs compound properties, molecular structures, similarity searches, substructure searches, or bioactivity data. NOT for protein structures (use pdb-structure), NOT for drug-target interactions (use chembl-drug), NOT for gene-disease associations (use open-targets).

Use cases: backend, data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pubchem-compound

What's inside

Skill name
pubchem-compound
Description
Search and retrieve chemical compound data from PubChem's PUG REST API (110M+ compounds). Use when the user needs compound properties, molecular structures, similarity searches, substructure searches, or bioactivity data. NOT for protein structures (use pdb-structure), NOT for drug-target interactions (use chembl-drug), NOT for gene-disease associations (use open-targets).
License
MIT
Instructions
120 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# PubChem Compound Lookup

Query the PubChem PUG REST API to search over 110 million chemical compounds by name, CID, SMILES, InChI, or molecular formula. Retrieve molecular properties, 2D/3D structures, bioactivity data, and perform similarity or substructure searches.

## API Base URL

```
https://pubchem.ncbi.nlm.nih.gov/rest/pug
```

## API Endpoints

### Compound Lookup

Retrieve compound data by name, CID, or SMILES:

```bash
# By compound name
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/aspirin/JSON" | head -60

# By PubChem CID
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/JSON" | head -60

# By SMILES string
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/CC(=O)OC1=CC=CC=C1C(=O)O/JSON" | head -60

# By InChI key
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchikey/BSYNRYMUTXBXSQ-UHFFFAOYSA-N/JSON" | head -60
```

### Property Retrieval

Fetch specific molecular properties (comma-separated list):

```bash
# Common drug-likeness properties (Lipinski's Rule of Five)
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/ibuprofen/property/MolecularWeight,MolecularFormula,XLogP,HBondDonorCount,HBondAcceptorCount,TPSA/JSON"

# Multiple compounds by CID list
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244,3672,2519/property/MolecularWeight,XLogP,IUPACName/JSON"
```

Available properties: MolecularFormula, MolecularWeight, CanonicalSMILES, IsomericSMILES, InChI, InChIKey, IUPACName, XLogP, ExactMass, MonoisotopicMass, TPSA, Complexity, HBondDonorCount, HBondAcceptorCount, RotatableBondCount, HeavyAtomCount, AtomStereoCount, BondStereoCount, Volume3D.

### Similarity Search

Find structurally similar compounds using 2D fingerprint Tanimoto similarity:

```bash
# Find compounds with >=90% similarity to aspirin
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastsimilarity_2d/smiles/CC(=O)OC1=CC=CC=C1C(=O)O/cids/JSON?Threshold=90"

# Similarity search returning properties
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastsimilarity_2d/cid/2244/property/MolecularWeight,XLogP,CanonicalSMILES/JSON?Threshold=85&MaxRecords=10"
```

### Substructure Search

Find compounds containing a specific substructure:

```bash
# Find compounds containing a benzene ring with carboxylic acid
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastsubstructure/smiles/c1ccccc1C(=O)O/cids/JSON?MaxRecords=10"
```

### PUG-View (Detailed Annotations)

Retrieve detailed compound records including pharmacology, safety, and literature:

```bash
# Full PUG-View record
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound/2244/JSON" | head -100

# Specific section headings
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound/2244/JSON?heading=Pharmacology+and+Biochemistry" | head -80
```

### Bioactivity Data

Retrieve assay results and biological activity:

```bash
# Get bioassay summary for a compound
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/assaysummary/JSON" | head -80

# Get assay results with activity outcome
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/aids/JSON?aids_type=active"
```

## Common Queries

```bash
# Check if a compound exists and get its CID
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/metformin/cids/JSON"

# Get canonical SMILES for a compound
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/caffeine/property/CanonicalSMILES,IsomericSMILES/JSON"

# Get 2D structure image URL (PNG)
# https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/PNG

# Get SDF (structure-data file)
curl -s "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/aspirin/SDF"
```

## Best Practices

1. Rate limit requests to 5 per second maximum; PubChem may throttle or block excessive usage.
2. Use CID lookups when possible -- name lookups may return multiple matches.
3. For large result sets, use `MaxRecords` and pagination with `cids_type=standardized`.
4. URL-encode SMILES strings that contain special characters (e.g., `#`, `/`, `\`).
5. Prefer property endpoints over full JSON records to reduce response size.
6. Use PUG-View for curated annotations (pharmacology, safety, patents) rather than raw compound data.
7. For bulk operations (>100 compounds), use the PUG REST asynchronous listkey pattern.

## Data Integrity Rule

NEVER fabricate database results from training data. Every protein ID, gene name, compound property, pathway ID, structure detail, and metadata MUST come from an actual API response in this conversation. If the API returns no results, errors, or partial data, report exactly what happened. Do not "fill in" missing data from memory or make up identifiers.

From beita6969/ScienceClaw, MIT.

More from beita6969/ScienceClaw

Signals

Stars
1,019
Forks
109
Open issues
1
Last commit (this folder)
Mar 12, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from beita6969

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get pubchem-compound running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying pubchem-compound?

CallGet help
Cite this page

pubchem-compound skill. Agent Mart. https://agentmart.dev/skills/beita6969-pubchem-compound (last updated 2026-10-24)