PubChem Compound Scraper — Chemical Properties & SMILES avatar

PubChem Compound Scraper — Chemical Properties & SMILES

Pricing

from $3.00 / 1,000 results

Go to Apify Store
PubChem Compound Scraper — Chemical Properties & SMILES

PubChem Compound Scraper — Chemical Properties & SMILES

Fetch molecular formula, weight, SMILES, InChIKey, XLogP, TPSA, and more for any compound from PubChem — the world's largest free chemistry database.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

Compute Edge

Compute Edge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Extract structured chemical compound data from PubChem, the world's largest freely accessible chemistry database maintained by the NIH/NCBI. With over 115 million compounds and growing, PubChem is the authoritative source for molecular properties used in drug discovery, cheminformatics, and computational chemistry.

This Actor calls PubChem's official PUG-REST API — no authentication required — and returns structured JSON for every compound: molecular formula, SMILES notation, InChIKey, drug-likeness metrics (XLogP, TPSA, Lipinski rule-of-five parameters), and more.

Features

  • Look up by name or CID — search by IUPAC name, common name, brand name, or PubChem Compound ID
  • 30-compound default run — aspirin, caffeine, glucose, and 27 other common compounds out of the box with zero configuration
  • Drug-likeness metrics — XLogP, TPSA, H-bond donor/acceptor counts, and rotatable bond count for Lipinski filtering
  • SMILES & InChIKey — canonical SMILES and InChIKey for cheminformatics pipelines and database lookups
  • Batch input — supply hundreds of names or CIDs via a simple list
  • Rate-limit aware — automatic 250ms delay between requests respects PubChem's rate limits; 503 errors trigger a 1-second retry
  • LLM-ready output — clean, structured JSON ideal for RAG pipelines and AI/ML workflows

Data Fields

FieldTypeDescription
cidnumberPubChem Compound ID
inputNamestringQuery term used for name lookups (null for CID lookups)
molecularFormulastringMolecular formula (e.g. C9H8O4)
molecularWeightnumberMolecular weight in g/mol
iupacNamestringSystematic IUPAC name
smilesstringSMILES notation (ConnectivitySMILES preferred, CanonicalSMILES fallback)
inchiKeystringInChIKey hash for structure identification
xlogPnumberPredicted partition coefficient (lipophilicity)
tpsanumberTopological polar surface area (Ų)
hBondDonorCountnumberNumber of hydrogen bond donors
hBondAcceptorCountnumberNumber of hydrogen bond acceptors
rotatableBondCountnumberNumber of rotatable bonds
exactMassnumberExact monoisotopic mass
chargenumberNet formal charge
pubchemUrlstringLink to the compound's PubChem page

How to Scrape PubChem Compound Data

  1. Open the Actor on the Apify platform and click Try for free.
  2. Leave inputs empty to run with the built-in default list of 30 common compounds (aspirin, caffeine, glucose, etc.), or provide your own list.
  3. Enter compound names in the "Compound Names" field — one per line (e.g. warfarin, metformin, sertraline).
  4. Or enter CIDs in the "PubChem CIDs" field for direct lookups (e.g. 2244 for aspirin, 5090 for caffeine). You can mix names and CIDs.
  5. Set Max Results to cap the number of compounds returned (default: 1000).
  6. Click Start and results appear in the Dataset tab — typically within seconds for small lists.
  7. Export as JSON, CSV, or Excel, or connect via the Apify API for downstream processing.

Input Example

{
"names": ["metformin", "atorvastatin", "lisinopril", "omeprazole"],
"cids": ["2244", "5090"],
"maxResults": 100
}

Output Example

{
"cid": 2244,
"inputName": "aspirin",
"molecularFormula": "C9H8O4",
"molecularWeight": 180.16,
"iupacName": "2-acetyloxybenzoic acid",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"inchiKey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N",
"xlogP": 1.2,
"tpsa": 63.6,
"hBondDonorCount": 1,
"hBondAcceptorCount": 4,
"rotatableBondCount": 3,
"exactMass": 180.042259,
"charge": 0,
"pubchemUrl": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}

Use Cases

  • Cheminformatics & Drug Discovery — Build compound libraries, run Lipinski rule-of-five screening, generate SMILES datasets for machine learning models
  • Chemical Supplier Research — Cross-reference product catalogs with PubChem data to validate molecular identity
  • RAG Datasets & LLM Training — Generate clean, structured chemistry corpora for AI models and retrieval-augmented generation pipelines
  • Research & Academia — Automate literature review data collection, compare compound properties across series
  • Regulatory & Compliance — Look up InChIKeys for compound identity verification in pharmaceutical submissions

FAQ

Q: Does this require an API key? A: No. PubChem's PUG-REST API is completely free and open — no registration or authentication required.

Q: How many compounds can I fetch? A: The Actor supports up to 50,000 compounds per run. PubChem itself has 115M+ compounds. For large runs, the built-in 250ms delay keeps you within PubChem's rate limits (~5 req/sec).

Q: What if a compound name isn't found? A: The Actor logs a warning and skips it, continuing with the rest of the list. Common causes: misspellings, ambiguous names, or brand names not indexed in PubChem. Try the IUPAC name or CID for reliable lookups.

Q: Can I look up by InChIKey or SMILES? A: The current version supports lookup by name and CID. InChIKey and SMILES lookup can be added — contact the author or open an issue if needed.

Other Actors

  • FDA OpenFDA Scraper — Extract drug labels, indications, and adverse events from FDA OpenFDA
  • DailyMed Drug Database Scraper — Structured prescription drug label data from NIH DailyMed
  • ClinicalTrials.gov Scraper — Active and completed clinical trial data including endpoints and enrollment

This Actor uses PubChem's official PUG-REST API, which is explicitly provided for programmatic access by the NIH/NCBI. All data is in the public domain. This Actor is provided for research and informational purposes. The author is not affiliated with PubChem, NIH, or NCBI. Always verify compound data from primary sources before use in any application affecting human health or safety. For questions or support, contact the actor author through the Apify platform.