NLM MeSH SPARQL Scraper
Pricing
from $7.50 / 1,000 results
NLM MeSH SPARQL Scraper
Scrapes MeSH descriptors from the NLM SPARQL endpoint. Filter by year and label substring, and get each term as a flat row with tree numbers and synonyms. Export to CSV, JSON, Excel, or XML.
Pricing
from $7.50 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Share
NLM MeSH SPARQL Scraper
Scrape MeSH terms from the NLM SPARQL endpoint, filtered by year and label, up to a million per run. Each term comes with its full descriptor data, tree numbers, and synonyms. No API key or registration. Export to CSV, JSON, Excel, or XML.
The NLM MeSH browser and API are built for humans, not for bulk retrieval. This Actor queries the official MeSH SPARQL endpoint directly, so you can pull every descriptor for a release year, filter by label substring, and get a clean row per term. It is the fastest way to turn MeSH into a dataset for taxonomy work, ontology mapping, or search indexing.
| Who uses it | What they scrape NLM MeSH for |
|---|---|
| Medical librarians | Build a local index of MeSH terms for a specific year |
| Ontology engineers | Extract MeSH descriptors and tree numbers for mapping to other vocabularies |
| Search relevance teams | Generate a synonym list from MeSH terms to improve query expansion |
| Bioinformatics researchers | Pull a snapshot of MeSH for reproducible analyses |
What it does
This Actor collects MeSH descriptors from the NLM SPARQL endpoint and returns each term as a flat row with its label, tree numbers, synonyms, and other descriptor data.
- ๐ Year filter: restrict results to a specific MeSH release year, such as 2024.
- ๐ Label contains: return only terms whose label includes a given substring, like 'cancer'.
- ๐ฆ Bulk export: retrieve up to 1,000,000 terms in a single run and export to CSV, JSON, Excel, or XML.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with NLM MeSH data
๐ Build a MeSH index for a library catalog.
A medical librarian runs the Actor with year=2024 to get all current MeSH terms and loads them into the catalog's subject authority file.
๐งฌ Map MeSH to another ontology.
An ontology engineer extracts descriptors and tree numbers for a specific year, then uses the labels and synonyms to align MeSH with SNOMED CT or another vocabulary.
๐ Improve search with MeSH synonyms.
A search relevance team pulls all terms containing 'neoplasm' and uses the synonym fields to expand user queries in a clinical search engine.
๐ Reproduce a bibliometric study.
A researcher retrieves the exact MeSH snapshot used in a published analysis by setting the year filter, ensuring the same term set is available for replication.
Why choose this scraper
| What you get | |
|---|---|
| Official source | Queries the NLM MeSH SPARQL endpoint directly, no third-party data |
| Flexible filtering | Filter by release year and label substring to target exactly the terms you need |
| Scalable | Retrieve up to a million terms per run, from a preview of 10 to full datasets |
| Structured output | Each term is returned as a flat row with descriptor data, tree numbers, and synonyms |
How it compares
No other Store actor targets NLM MeSH the same way, so the honest comparison is with the alternatives teams actually weigh.
| NLM MeSH SPARQL Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When NLM MeSH 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 with an optional MeSH year and a label substring filter. Both are forwarded to the NLM SPARQL endpoint, so only matching descriptors reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{"maxItems": 10,"year": "2024"}
A larger pull:
{"maxItems": 200,"year": "2024"}
Pricing
Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.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 NLM MeSH SPARQL 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 NLM MeSH 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/mesh-sparql-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check your filters. If you set 'Label contains' to a string that does not appear in any label for the selected year, the result will be empty. Try a broader substring or remove the filter.
Why did the run stop at 10 items?
Free users are limited to 10 items as a preview. To get more, upgrade to a paid plan and increase the 'Maximum terms' input.
The run timed out. What should I do?
Large queries can take time. Reduce the 'Maximum terms' or narrow the filters. If the problem persists, contact support.
The output has unexpected fields.
The Actor returns the fields as provided by the NLM SPARQL endpoint. The sample output shows the current schema. If you need different fields, you may need to post-process the data.
FAQ
| Question | Answer |
|---|---|
| What is MeSH? | MeSH (Medical Subject Headings) is the National Library of Medicine's controlled vocabulary for indexing biomedical literature. It includes descriptors, qualifiers, and supplementary concepts. |
| Do I need an API key or registration? | No. The Actor queries the public NLM MeSH SPARQL endpoint, which does not require authentication. |
| What does each result row contain? | Each row is a MeSH descriptor with its label, tree numbers, synonyms, and other descriptor data as returned by the SPARQL endpoint. The exact fields are shown in the sample output. |
| Can I filter by year? | Yes, set the 'MeSH year' input to a specific release year, such as 2024. The filter is passed to the SPARQL query. |
| Can I filter by label? | Yes, use the 'Label contains' input to return only terms whose label includes the given substring. For example, 'cancer' returns all descriptors with 'cancer' in the label. |
| How many terms can I get? | Free users are limited to 10 items as a preview. Paid users can set 'Maximum terms' up to 1,000,000. |
| What export formats are supported? | You can export the results to CSV, JSON, Excel, or XML from the Apify dataset. |
| Is the data from the official NLM source? | Yes, the Actor queries the NLM MeSH SPARQL endpoint directly, so the data is as official as it gets. |
| Can I get MeSH qualifiers or supplementary concepts? | The Actor focuses on MeSH descriptors. Qualifiers and supplementary concepts are not included in the current output. |
| How often is MeSH updated? | MeSH is updated annually. You can specify the year to get the version you need. |
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 U.S. National Library of Medicine. 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.
