NCI Thesaurus Concept Scraper
parseforge/nci-thesaurus-concept-scraper
Developer toolsAIOther
Scrapes NCI Thesaurus cancer ontology concepts by search term or NCIt code, returning synonyms, definitions, semantic types, and parent-child hierarchies as flat rows.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 62
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 12 days ago
Overview
NCI Thesaurus Concept Scraper
Scrape NCI Thesaurus cancer ontology concepts by keyword search or NCIt code, with synonyms, definitions, and parent-child hierarchies. Export to CSV, JSON, Excel, or XML.
The National Cancer Institute's Thesaurus is the standard reference for cancer research terminology, but its size and structure make manual lookups slow. This Actor reads the public NCI Thesaurus API directly, matching concepts by term or code, and returns every one in a clean, flat schema ready for analysis or integration.
| Who uses it | What they scrape NCI Thesaurus for |
|---|---|
| Bioinformatics researchers | Mapping gene and disease terms to standard NCIt codes for consistent study annotations. |
| Clinical data managers | Validating and enriching trial data with official NCI concept definitions. |
| Ontology engineers | Extracting whole branches of the NCI hierarchy to populate knowledge graphs. |
What it does
This Actor collects NCI Thesaurus concepts by keyword or specific NCIt code and returns each one as a flat row with its synonyms, definition, semantic type, and an optional parent-child hierarchy.
- π Search by term: Find concepts whose preferred name or synonyms contain a keyword like 'melanoma' or 'BRAF gene'.
- π·οΈ By concept codes: Fetch exact concepts using a list of known NCIt codes, such as C3224 for Melanoma.
- π Full detail with hierarchy: Optionally add all parent and child concept links, plus extra properties like maps to other terminologies.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with NCI Thesaurus data
𧬠Standardize cancer research terms.
A bioinformatician runs a list of gene names through the Actor by codes to retrieve official NCI definitions and synonyms, ensuring their lab data uses FDA-recognized terminology.
π Enrich clinical trial metadata.
A data manager searches for 'non-small cell lung carcinoma' and its variants, then exports the full hierarchy to document how each condition appears in their database.
πΈοΈ Build a cancer knowledge graph.
An ontology engineer pulls dozens of melanoma-related concepts by term search with full detail, loading the parent-child relationships directly into Neo4j for graph queries.
Why choose this scraper
| What you get | |
|---|---|
| Synonyms collected | Every alternative label for a concept so you can map real-world terms to a single NCIt code. |
| Full hierarchy optional | Get the parent concepts that classify a term and the child concepts it subsumes, all in one output row. |
| Flat, predictable output | No nested JSON puzzles. Each concept becomes one row with all its attributes in named columns. |
How it compares
No other Store actor targets NCI Thesaurus the same way, so the honest comparison is with the alternatives teams actually weigh.
| NCI Thesaurus Concept Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When NCI Thesaurus 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
Run the Actor by providing a search term or a list of NCIt codes, and set the detail level to include parent-child relationships or only a summary of each concept. The Input tab lists every parameter.
A first run with the defaults:
{
"term": "melanoma",
"codes": [
"C3224",
"C16612"
],
"maxItems": 10
}
A larger pull:
{
"term": "melanoma",
"codes": [
"C3224",
"C16612"
],
"maxItems": 200
}
Pricing
Pay-per-result: $0.01 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $1.00 |
| 1,000 results | $10.00 |
| 10,000 results | $100.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
- Create a free Apify account with $5 in credit.
- Open the NCI Thesaurus Concept Scraper.
- Set your inputs and any filters, then click Start.
- 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 NCI Thesaurus 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/nci-thesaurus-concept-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 search term?
Check that the term is spelled correctly and is a known NCI Thesaurus concept name. Try a broader keyword or look it up on the NCI website first to confirm its exact name. If you know the NCIt code, switch to 'By concept codes' mode.
The Actor returns fewer concepts than the Maximum concepts I set.
The NCI API only returns concepts that match your term. If the whole thesaurus contains fewer matches than your limit, you receive all of them. The limit is a ceiling, not a guarantee.
I get an error when providing concept codes.
Make sure every code starts with a capital 'C' followed by digits, with no spaces (for example C3224). Codes are case-sensitive. Also confirm you selected 'By concept codes' as the Mode.
My CSV export has empty cells in some columns.
That is expected. Not every concept has all properties. Some may lack synonyms, a definition, or parent-child relationships. Empty cells are the Actor's way of showing the field is absent for that record.
FAQ
| Question | Answer |
|---|---|
| Can I get only the synonyms for a concept without the full record? | Yes. Set the detail level to 'Summary'. The output will include the concept name, synonyms, definition, semantic type, and status, but not the parent-child links. |
| How do I find the NCIt code for a concept I only know by name? | Use the 'Search by term' mode. Type the name or a keyword, and the Actor will return the matching concepts with their NCIt codes so you can look them up later by code. |
| What is the difference between a semantic type and a parent concept? | The semantic type is a broad category like 'Gene' or 'Disease or Disorder'. Parent concepts are specific NCI Thesaurus superclasses that define an 'is a' hierarchy, for instance Melanoma has parent 'Melanocytic Neoplasm'. |
| Can I scrape the entire NCI Thesaurus? | You can scrape large portions by using broad search terms or feeding a long list of codes. The 'Maximum concepts' setting caps how many results the run returns in one go, up to a million. |
| Does the Actor include retired or obsolete concepts? | By default, yes, if the NCI Thesaurus API still returns them. You can filter them out of your dataset after the run using the 'status' field, which shows whether a concept is current or retired. |
| Are cross-references to other terminologies like SNOMED or ICD-10 included? | When you choose 'Full' detail, the output includes extra properties that often contain mappings to external terminologies if NCI publishes them for that concept. |
| Can I run this Actor on a schedule to track changes in the NCI Thesaurus? | You can set up an Apify schedule to run the Actor daily or weekly with the same search or codes. Then diff the datasets to spot new concepts, retired ones, or definition updates. |
| Is an NCI API key required? | No. The Actor reads the public NCI Thesaurus API endpoints. No registration or API key is needed. |
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 National Cancer 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
| Field | Type | What it does | Default |
|---|---|---|---|
| mode | string (2 options) | How to select concepts. 'Search by term' finds NCI Thesaurus concepts matching a keyword. 'By concept codes' fetches specific concepts by their NCIt code (for example C3224). | search |
| term | string | Only used when Mode is 'Search by term'. A keyword to search the NCI Thesaurus, for example 'melanoma' or 'BRAF gene'. Leave empty when using concept codes. | melanoma |
| codes | array | Only used when Mode is 'By concept codes'. A list of NCIt concept codes, for example C3224 or C16612. Leave empty when searching by term. | ["C3224","C16612"] |
| include | string (2 options) | How much detail to pull per concept. 'Summary' returns names, synonyms, definitions, semantic type, and status. 'Full' adds parent and child concepts plus extra properties. | full |
| maxItems | integer | How many concepts to collect per run. | 10 |
Pricing
from $4.52 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.00452 to $0.005 |
| result details | Detailed result with additional fields. | $0.00905 to $0.01 |
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.
curl -X POST "https://api.apify.com/v2/acts/parseforge~nci-thesaurus-concept-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"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.
