ParseForge Scrapers

PubChem Compound Scraper

parseforge/pubchem-compound-scraper

EducationDeveloper toolsOther

Look up chemical compounds on PubChem by CID, name, SMILES, or InChIKey. Returns a flat row of molecular properties including formula, weight, SMILES, InChI, IUPAC name, XLogP, and TPSA.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
104
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

PubChem Compound Scraper

Look up chemical compounds on PubChem by CID, name, SMILES, or InChIKey and get back a structured row of molecular properties. Fetch molecular weight, formula, SMILES, InChI, IUPAC name, XLogP, TPSA, and more for up to a million compounds per run. Export to CSV, JSON, Excel, or XML.

PubChem's web interface is built for single-compound lookups, not bulk data extraction. Manually copying properties for a list of identifiers is slow and error-prone. This Actor reads the PubChem PUG REST API directly, so you can submit a list of CIDs, chemical names, SMILES strings, or InChIKeys and receive a clean, flat dataset of the properties you select.

Who uses it What they scrape PubChem for
Cheminformatics scientists Building a local database of molecular descriptors for a compound library.
Pharmaceutical researchers Fetching physicochemical properties for a list of drug candidates by name or SMILES.
Data engineers in biotech Automating the enrichment of chemical inventory tables with canonical identifiers and computed properties.
Academic researchers Collecting consistent property data for a set of compounds to use in QSAR modeling.

What it does

This Actor collects chemical compound properties from PubChem by CID, name, SMILES, or InChIKey and returns each compound as a flat row with the requested molecular descriptors.

  • ๐Ÿ”ข CID lookup: Submit a list of numeric PubChem Compound IDs to retrieve exact records.
  • ๐Ÿ“› Name lookup: Use common chemical names like 'aspirin' or 'ibuprofen' and let PubChem resolve them.
  • ๐Ÿงฌ SMILES lookup: Input SMILES strings to find matching compounds by structure.
  • ๐Ÿ”‘ InChIKey lookup: Use hashed InChI identifiers for precise, structure-based lookups.
  • ๐Ÿ“‹ Property selection: Choose exactly which properties to return from a list of 23 molecular descriptors.
  • ๐Ÿ“– Synonym fetching: Optionally include all common names and synonyms for each compound in the output.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with PubChem data

๐Ÿงช Build a compound property database.

A cheminformatician submits a list of 5,000 CIDs and fetches MolecularWeight, XLogP, TPSA, and HBondDonorCount for each, then exports the dataset as a CSV for their internal discovery platform.

๐Ÿ’Š Enrich a drug candidate list.

A pharmaceutical researcher pastes a list of common drug names and retrieves IUPAC names, CanonicalSMILES, and InChIKeys to standardize identifiers across their team's shared spreadsheet.

๐Ÿ”ฌ Prepare data for QSAR modeling.

An academic researcher looks up compounds by SMILES and collects ExactMass, Complexity, RotatableBondCount, and HBondAcceptorCount to use as features in a quantitative structure-activity relationship model.

๐Ÿ“‹ Standardize chemical inventory.

A biotech data engineer runs a weekly job that takes a list of InChIKeys from their inventory system and fetches the latest MolecularFormula and MolecularWeight from PubChem to keep their internal database current.

Why choose this scraper

What you get
Bulk lookups Submit thousands of identifiers in one run instead of searching one by one on the website.
Structured output Every compound comes back as a flat row with a fixed schema, ready for CSV, JSON, Excel, or XML export.
Flexible input Mix and match lookup modes across runs. Use CIDs for precision, names for convenience, or SMILES for structure-based searches.
Selective properties Choose only the molecular descriptors you need, from MolecularFormula and MolecularWeight to TPSA and Complexity.

How it compares

This Actor supports four distinct lookup modes and lets you select exactly which molecular properties to return, while most competitors focus on name-based lookups with a fixed property set.

Feature ParseForge PubChem Compound Lookup PubChem Compounds Scraper PubChem Compound Scraper
Lookup by CID Yes Not listed Not listed Yes
Lookup by SMILES Yes Not listed Not listed Yes
Lookup by InChIKey Yes Not listed Not listed Not listed
Selectable output properties Yes (23 properties) Not listed Not listed Not listed
Include synonyms Yes Yes Not listed Yes
Bulk lookup up to 1M compounds Yes Not listed Not listed Not listed

Configure the run

Drive the Actor from a list of identifiers in CID, name, SMILES, or InChIKey mode, and select which molecular properties to include so only the data you need reaches your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
  "maxItems": 10,
  "mode": "cid",
  "identifiers": [
    "2244",
    "3672",
    "1983",
    "5793",
    "2519"
  ],
  "properties": [
    "MolecularFormula",
    "MolecularWeight",
    "CanonicalSMILES",
    "IsomericSMILES",
    "InChI",
    "InChIKey",
    "IUPACName",
    "XLogP",
    "ExactMass",
    "TPSA",
    "HBondDonorCount",
    "HBondAcceptorCount",
    "RotatableBondCount"
  ]
}

A larger pull:

{
  "maxItems": 200,
  "mode": "cid",
  "identifiers": [
    "2244",
    "3672",
    "1983",
    "5793",
    "2519"
  ],
  "properties": [
    "MolecularFormula",
    "MolecularWeight",
    "CanonicalSMILES",
    "IsomericSMILES",
    "InChI",
    "InChIKey",
    "IUPACName",
    "XLogP",
    "ExactMass",
    "TPSA",
    "HBondDonorCount",
    "HBondAcceptorCount",
    "RotatableBondCount"
  ]
}

Pricing

Pay-per-result: $0.02667 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.67
1,000 results $26.67
10,000 results $266.70

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the PubChem Compound Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to PubChem through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/pubchem-compound-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results for my list of names?

Check that your names are common PubChem synonyms. Very specific or non-standard names may not resolve. Try using a CID or SMILES instead for those compounds.

Why are some properties missing in my output?

Ensure you have checked those properties in the 'Properties to Fetch' input field. Also, some properties may not be available for every compound in PubChem's database.

The Actor is running slowly with a large list of identifiers.

PubChem's API processes requests sequentially. For very large lists, consider splitting them into multiple runs or increasing the Actor's timeout in the run settings.

I get an error when using SMILES strings.

Verify that your SMILES strings are valid and canonical. Invalid or ambiguous SMILES will cause the PubChem API to reject the lookup.

FAQ

Question Answer
What input formats does this Actor accept? You can provide identifiers as CIDs (numeric PubChem IDs), common chemical names, SMILES strings, or InChIKeys. Choose the corresponding mode in the input settings.
How many compounds can I look up in a single run? You can set the maximum number of compounds up to 1,000,000 per run. The Actor will process your list of identifiers in order until it reaches that limit.
Can I choose which properties to include in the output? Yes. The input schema lets you select from 23 molecular properties, including MolecularFormula, MolecularWeight, CanonicalSMILES, InChI, IUPACName, XLogP, TPSA, and more. Only the properties you check will appear in the results.
Does this Actor also return synonyms for each compound? Yes, there is an 'Include Synonyms' checkbox. When enabled, each result row will contain a list of common names and synonyms for that compound.
What is the difference between the SMILES and InChIKey lookup modes? SMILES mode looks up compounds by their SMILES structure string. InChIKey mode uses the hashed version of the IUPAC International Chemical Identifier, which is a fixed-length string useful for database indexing.
Can I mix CIDs and names in the same run? No, each run uses a single lookup mode. If you have a mixed list, run the Actor once for each mode and merge the resulting datasets.
What export formats are supported? You can export your results to CSV, JSON, Excel, or XML directly from the Apify dataset.
Is there a rate limit for the PubChem API? The Actor respects PubChem's PUG REST API usage policies. It makes requests sequentially and will not exceed the allowed request rate.
What happens if an identifier cannot be found? If PubChem does not recognize an identifier, that entry will be skipped or will return an empty row, depending on the API response. The Actor will continue processing the remaining identifiers.
Can I use this Actor to search by molecular formula or substructure? This Actor is designed for direct identifier lookups (CID, name, SMILES, InChIKey). It does not support formula-based or substructure searches.

Related actors

  • pubchem-compound-scraper: Use this Actor when you need to look up compounds by identifier and fetch structured molecular properties.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by National Center for Biotechnology Information. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many compounds to collect per run. 10
mode string (4 options) How identifiers are interpreted. CID = numeric PubChem ID, NAME = common chemical name, SMILES = structure string, INCHIKEY = hashed InChI. cid
identifiers array List of identifiers to look up. Examples: ['2244','3672','1983'] for CIDs, or ['aspirin','ibuprofen','caffeine'] for names. ["2244","3672","1983","5793","2519"]
properties array Which compound properties to retrieve. Default selection covers core chemistry. Add more for advanced cheminformatics. ["MolecularFormula","MolecularWeight","C
includeSynonyms boolean Also fetch the list of common names and synonyms for each compound. true

Pricing

from $20.00 per 1,000 results

Charged forWhat it isPrice each
Result Item Charged once per result collected. $0.02 to $0.02667

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~pubchem-compound-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run PubChem Compound Scraper on Apify All scrapers