# MedlinePlus Consumer Health Topics Scraper (`ninhothedev/medlineplus-scraper`) Actor

$0.5/1K 🔥 MedlinePlus Scraper! Fetch health topics, conditions, symptoms & trusted medical info from MedlinePlus. No key needed. JSON, CSV, Excel or API in seconds. Build a patient-education or health-lookup app ⚡

- **URL**: https://apify.com/ninhothedev/medlineplus-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## MedlinePlus Consumer Health Topics Scraper

Get **plain-language, consumer-facing health information** straight from the
U.S. National Library of Medicine (NLM). This actor searches
[MedlinePlus](https://medlineplus.gov/) via the free, **key-less** NLM Web
Service and returns clean, structured records — summaries, alternative titles,
MeSH terms, health groups and links — ready for patient education tools, health
chatbots and accessibility projects.

- No API key, no login, no account required.
- English **and** Spanish health topics (plus drug and genetics collections).
- Highlight markup and HTML are stripped for you — you get clean text.
- \~**$0.50 per 1,000 records** (typical), pay-as-you-go.

### What makes this different from my other NLM/clinical actors

The NLM publishes many datasets. This actor is the **consumer / patient-facing**
one — plain-language explanations written for the general public, not
researchers or clinicians. Pick the right tool:

| Actor | Audience | Data |
| --- | --- | --- |
| **MedlinePlus (this one)** | **Patients & public** | **Plain-language health topics: summaries, groups, MeSH, links** |
| [Clinical Trials Scraper](https://apify.com/ninhothedev/clinical-trials-scraper) | Researchers | ClinicalTrials.gov study records |
| [NCBI E-utilities Scraper](https://apify.com/ninhothedev/ncbi-eutils-scraper) | Researchers | PubMed / NCBI database records |
| [HPO Phenotype Scraper](https://apify.com/ninhothedev/hpo-phenotype-scraper) | Clinical genetics | Human Phenotype Ontology terms |
| [NLM Clinical Tables Scraper](https://apify.com/ninhothedev/nlm-clinical-tables-scraper) | Developers/clinical | Coded clinical lookup tables (ICD, RxNorm…) |

In short: the other actors return **clinical, coded or research** data.
**This one returns the readable, plain-language health content** a patient would
actually see on MedlinePlus.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `mode` | select | Operation mode. Only `search` is supported. |
| `db` | select | Collection: `healthTopics` (English), `healthTopicsSpanish` (Spanish), `drugs`, or `genetics`. Default `healthTopics`. |
| `queries` | array | Search terms; each is queried separately. Default `["diabetes","hypertension","asthma"]`. |
| `maxItems` | integer | Max total records across all queries. Default `200`, hard cap `3000`. |

```json
{
  "mode": "search",
  "db": "healthTopics",
  "queries": ["diabetes", "hypertension", "asthma"],
  "maxItems": 200
}
```

### Output

Each dataset item is a `health_topic` record:

```json
{
  "type": "health_topic",
  "title": "Diabetes",
  "alt_titles": ["Diabetes Mellitus", "Sugar Diabetes", "DM"],
  "full_summary": "What is diabetes? Diabetes, also known as diabetes mellitus, is a disease in which your blood glucose ...",
  "snippet": "What is diabetes? Diabetes, also known as diabetes mellitus, is a disease ...",
  "mesh_terms": ["Diabetes Mellitus"],
  "groups": ["Older Adults", "Endocrine System", "Metabolic Problems"],
  "url": "https://medlineplus.gov/diabetes.html",
  "organization": "National Library of Medicine",
  "language": "en",
  "query": "diabetes",
  "rank": 2,
  "source": "medlineplus",
  "scraped_at": "2026-08-11T00:00:00+00:00"
}
```

All fields are nullable. `full_summary` is HTML-stripped and capped at 6000
characters. Highlight tags (`<span class="qt0">`) are removed from every field.

### Use cases

- **Patient education** — build readable condition explainers and handouts.
- **Health chatbots** — ground answers in authoritative NLM plain-language text.
- **Plain-language content** — source reliable, public-domain health copy.
- **Accessibility** — feed screen-reader-friendly, jargon-free health info.

### Data source & licensing

Data comes from the **NLM MedlinePlus Web Service**
(`https://wsearch.nlm.nih.gov/ws/query`), which is free and requires no key.
MedlinePlus content is produced by the U.S. National Library of Medicine and is
**in the public domain** (U.S. Government work). Please review NLM's
[terms and conditions](https://medlineplus.gov/about/using/usingcontent/) and
attribute the source where appropriate.

### Notes

- This actor does not provide medical advice; it retrieves published NLM content.
- Pagination is handled automatically via `retstart` / `retmax`.

# Actor input Schema

## `mode` (type: `string`):

Operation mode. Only 'search' is supported: it queries the NLM MedlinePlus Web Service for consumer health topics matching your terms.

## `db` (type: `string`):

Which MedlinePlus collection to search. 'healthTopics' = English plain-language topics, 'healthTopicsSpanish' = Spanish topics, 'drugs' = drug information, 'genetics' = genetic conditions/genes.

## `queries` (type: `array`):

List of search terms. Each term is queried separately and its matching health topics are returned (e.g. a condition, symptom or drug name).

## `maxItems` (type: `integer`):

Maximum total number of health topic records to return across all queries. Hard-capped at 3000.

## Actor input object example

```json
{
  "mode": "search",
  "db": "healthTopics",
  "queries": [
    "diabetes",
    "hypertension",
    "asthma"
  ],
  "maxItems": 200
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "diabetes",
        "hypertension",
        "asthma"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/medlineplus-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": [
        "diabetes",
        "hypertension",
        "asthma",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/medlineplus-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "diabetes",
    "hypertension",
    "asthma"
  ]
}' |
apify call ninhothedev/medlineplus-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/medlineplus-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8PgV8PxOAVGHL06PT/builds/pR6Xaom1y3T75Pbok/openapi.json
