ParseForge Scrapers

MyChem.info Drug Annotation Scraper

parseforge/mychem-drug-annotation-scraper

Developer toolsAIOther

Scrapes curated drug annotations from MyChem.info for a search query or a list of drug names or InChIKeys. Returns each drug as one flat row with indications, mechanisms, targets, and identifiers.

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

Overview

ParseForge

MyChem.info Drug Annotation Scraper

Scrape curated drug annotations from MyChem.info by drug name, keyword, or InChIKey. Each record returns the drug's indications, mechanisms, targets, and identifiers in one flat row. No API key required. Export to CSV, JSON, Excel, or XML.

MyChem.info aggregates drug annotations from ChEMBL, DrugBank, PharmGKB, and other sources, but querying it programmatically means writing your own API client and parsing deeply nested JSON. This Actor resolves drug names, keywords, or InChIKeys to the best-matching curated annotations and returns each drug as a flat, analysis-ready row.

Who uses it What they scrape MyChem.info for
Pharmacologists Pull mechanism-of-action and target data for a set of compounds.
Bioinformaticians Build a local dataset of drug annotations for enrichment analysis.
Clinical researchers Gather indications and contraindications for drugs in a trial.
Data journalists Investigate drug approvals and label changes across therapeutic areas.

What it does

This Actor collects curated drug annotations from MyChem.info for a search query or a list of drug names or InChIKeys, and returns each drug as one flat row.

  • ๐Ÿ” Search by keyword: enter a therapeutic area or drug name and get the best-matching annotated compounds.
  • ๐Ÿ“‹ Batch by list: paste up to a million drug names or InChIKeys and resolve each to its curated annotation.
  • ๐Ÿงฌ Identifier resolution: accepts common drug names and InChIKeys, returning the canonical MyChem.info record.
  • ๐Ÿ“Š Flat output: every drug is returned as one row with indications, mechanisms, targets, and identifiers.

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

What you can do with MyChem.info data

๐Ÿงช Build a kinase inhibitor dataset.

A pharmacologist enters 'kinase inhibitor' as the search query and exports the resulting drugs with their targets and mechanisms for a selectivity analysis.

๐Ÿ“‹ Annotate a compound library.

A bioinformatician pastes a list of InChIKeys from a screening hit list and gets back indications and targets for each compound to prioritize follow-up.

๐Ÿ“ˆ Track drug repurposing candidates.

A clinical researcher searches for a disease keyword and collects all drugs annotated with that indication to identify candidates for repurposing.

๐Ÿ—ž๏ธ Investigate drug safety signals.

A data journalist pulls annotations for a set of drugs and compares their listed contraindications and adverse effects across sources.

Why choose this scraper

What you get
No API coding The Actor handles MyChem.info's query and response parsing for you.
Curated annotations Each record aggregates data from ChEMBL, DrugBank, PharmGKB, and more.
Flat schema Nested JSON is flattened into one row per drug for easy analysis.
Batch friendly Resolve up to a million drugs in a single run.

How it compares

No other Store actor targets MyChem.info the same way, so the honest comparison is with the alternatives teams actually weigh.

MyChem.info Drug Annotation Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When MyChem.info changes Maintained for you You fix it You re-learn the page
Proxies, retries, anti-bot Built in Your problem Browser only
Output Fixed JSON schema, CSV/Excel export Whatever you build Copy-paste
Cost Pay per result Engineering time Analyst hours

Configure the run

Drive the Actor from a search query, a list of drug names or InChIKeys, or both, and cap how many drugs are collected per run. The Input tab lists every parameter.

A first run with the defaults:

{
  "searchQuery": "leukemia",
  "drugList": [
    "imatinib",
    "dasatinib",
    "nilotinib",
    "aspirin",
    "metformin"
  ],
  "maxItems": 10
}

A larger pull:

{
  "searchQuery": "leukemia",
  "drugList": [
    "imatinib",
    "dasatinib",
    "nilotinib",
    "aspirin",
    "metformin"
  ],
  "maxItems": 200
}

Pricing

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

Results collected Approximate cost
100 results $0.40
1,000 results $4.00
10,000 results $40.00

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 MyChem.info Drug Annotation 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 MyChem.info 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/mychem-drug-annotation-scraper"

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

Troubleshooting

Why am I getting no results?

Check that your search query or drug list is not empty. If using a keyword, try a broader term. If using drug names, verify the spelling or try the InChIKey instead.

Why does my drug name return the wrong drug?

MyChem.info may match a different compound with a similar name. Use the InChIKey for unambiguous resolution, or refine your search query.

Why is the run slow with a large drug list?

The Actor queries MyChem.info for each drug individually. For very large lists, consider splitting them into smaller batches or increasing the run timeout.

Why are some fields empty in the output?

Not all drugs have annotations for every field. MyChem.info only returns data that is available from its sources.

FAQ

Question Answer
What is MyChem.info? MyChem.info is a free API that provides integrated drug annotations from sources like ChEMBL, DrugBank, PharmGKB, and the FDA. It is maintained by The Su Lab at The Scripps Research Institute.
Do I need an API key? No. The Actor queries the public MyChem.info endpoint directly, so no registration or key is required.
What input formats does it accept? You can provide a free-text search query, a list of drug names, a list of InChIKeys, or any combination of these.
What does the output look like? Each drug is returned as one flat row with fields for indications, mechanisms, targets, identifiers, and more. The exact fields are shown in the sample output.
How many drugs can I collect in one run? You can set the maximum number of drugs per run, up to 1,000,000.
What if a drug name is ambiguous? The Actor uses MyChem.info's best-match resolution, which returns the most relevant curated annotation for the query.
Can I search by therapeutic area? Yes. Enter a keyword like 'leukemia' or 'diabetes' and the Actor returns drugs annotated with that indication.
Does it support InChIKeys? Yes. You can paste a list of InChIKeys and each will be resolved to its drug annotation.
What export formats are available? You can export the results as CSV, JSON, Excel, or XML.
Is the data updated? The Actor fetches live data from MyChem.info on each run, so you always get the current annotations.

Related actors

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 The Su Lab at The Scripps Research Institute. 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
searchQuery string A free-text search term such as a therapeutic area or drug name (for example imatinib, leukemia, kinase). The Actor returns the curated annotations for the best-matching drug-annotated compounds. Leave blank when supplying a drug list below. leukemia
drugList array One or more drug names (for example imatinib, aspirin) or InChIKeys (for example KTUFNOKKBVMGRW-UHFFFAOYSA-N). Each entry is resolved to its curated MyChem.info annotation. ["imatinib","dasatinib","nilotinib","asp
maxItems integer How many drugs to collect per run. 10

Pricing

from $2.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.002 to $0.004

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~mychem-drug-annotation-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 MyChem.info Drug Annotation Scraper on Apify All scrapers