Skip to content
Back to skills

Medlineplus

ASecurity

Query MedlinePlus for consumer-oriented drug and health-topic information. Accepts drug names, RxCUI codes, NDC codes, or ICD-10-CM diagnosis codes. Uses two free, keyless NLM APIs: the Web Service (keyword search) and MedlinePlus Connect (code-based lookup).

  • 230 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 6, 2026
ai-agentspythongogitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add BioTender-max/awesome-bio-agent-skills --skill medlineplus --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Medlineplus?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Medlineplus
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/biotender-max-medlineplus/badge)](https://www.skillsdirectory.com/skills/biotender-max-medlineplus)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: medlineplus-drug-info
description: >
  Query MedlinePlus for consumer-oriented drug and health-topic information.
  Accepts drug names, RxCUI codes, NDC codes, or ICD-10-CM diagnosis codes.
  Uses two free, keyless NLM APIs: the Web Service (keyword search) and
  MedlinePlus Connect (code-based lookup).
---

# MedlinePlus Drug Info Skill

Search MedlinePlus drug / health-topic pages. Auto-detects input type:

| Input Pattern | Detected As | Example | Endpoint Used |
|---|---|---|---|
| `0069-3060-30` | NDC code | NDC → drug page | Connect (NDC) |
| `637188` (5-7 digits) | RxCUI | RxNorm concept | Connect (RxCUI) |
| `E11.9`, `J45.20` | ICD-10-CM | Diagnosis code → topic | Connect (ICD-10) |
| anything else | free text | `metformin`, `aspirin` | Connect (name) + wsearch |

Both APIs are free, require no API key, and are rate-limited to 85 req/min.

## API

| Function | Input | Returns |
|---|---|---|
| `search(query, max_results=10)` | single entity string | `dict` with `connect_results`, `wsearch_results` |
| `search_batch(queries, max_results=10)` | list of entity strings | `dict[str, dict]` |
| `summarize(result)` | one `search()` result dict | compact text for LLM |
| `to_json(result)` | one `search()` result dict | `list[dict]` flat records |

### Result dict structure

```python
{
    "query": "metformin",
    "input_type": "text",          # ndc | rxcui | icd10 | text
    "connect_results": [           # from MedlinePlus Connect
        {"title": "...", "url": "...", "summary": "...", "source": "..."},
    ],
    "wsearch_results": [           # from keyword web service
        {"title": "...", "url": "...", "snippet": "...", "rank": "..."},
    ],
    "errors": [],
}
```

## Usage

See `if __name__ == "__main__"` block in `57_MEDLINEPLUS_DRUG_INFO.py` for
runnable examples covering: drug name, RxCUI, NDC, ICD-10, batch search,
summarize, and JSON output.

## Key Fields

| Field | Source | Description |
|---|---|---|
| `title` | Connect / wsearch | MedlinePlus page title |
| `url` | Connect / wsearch | Direct link to MedlinePlus page |
| `summary` | Connect | HTML-stripped page summary (≤400 chars) |
| `snippet` | wsearch | Keyword-in-context excerpt (≤300 chars) |
| `source` | Connect | Content attribution (e.g., AHFS, ASHP) |
| `rank` | wsearch | Relevance rank returned by NLM |

## Data Source

- **Provider**: U.S. National Library of Medicine (NLM)
- **Web Service**: `https://wsearch.nlm.nih.gov/ws/query` (XML, keyword search)
- **Connect API**: `https://connect.medlineplus.gov/service` (JSON, code-based)
- **Rate limit**: 85 requests / minute / IP
- **Update frequency**: daily (Tue–Sat)
- **License**: Public domain (U.S. Government work); attribution to MedlinePlus.gov requested

Files in this skill

  • README.md1016 B
  • SKILL.md2.7 KB
  • __init__.py150 B
  • example.py10.9 KB
  • medlineplus_skill.py10.9 KB
  • retrieve.py807 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.