dailymed-database
БесплатноБез исполняемых скриптовНе проверенQuery FDA drug labels (DailyMed) via REST API. Search structured product labels (SPLs) by name, NDC, set ID, or RxCUI; get indications, dosage, warnings…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
DailyMed Drug Label Database
Overview
DailyMed is the National Library of Medicine's official repository of FDA-approved drug labeling information, containing 140,000+ structured product labels (SPLs) for prescription drugs, OTC medications, biologics, and vaccines. The REST API (v2) provides structured JSON/XML access to the full label content including indications, dosage, warnings, contraindications, adverse reactions, and packaging data — with no authentication required.
When to Use
- Retrieving official FDA-approved prescribing information for a drug by name, NDC code, or set ID
- Extracting structured label sections (indications, warnings, dosage, adverse reactions) for pharmacological research
- Looking up all marketed formulations of an active ingredient with packaging and NDC codes
- Cross-referencing drug labels using RxCUI identifiers from RxNorm integration
- Building drug information pipelines that require authoritative FDA label content (not user-reported data)
- Comparing label content across brand name and generic formulations of the same drug
- For adverse event reports from FAERS, use
fda-databaseinstead; DailyMed contains label text, not post-market safety signals - For drug-drug interaction severity data, use
ddinter-database; DailyMed label text is unstructured for interactions
Prerequisites
- Python packages:
requests,pandas,matplotlib - Data requirements: drug names, NDC codes, set IDs, or RxCUI identifiers
- Environment: internet connection; no API key required
- Rate limits: no officially published limit; ~100 requests/minute is safe for polite access; add
time.sleep(0.3)in batch loops
pip install requests pandas matplotlib
Quick Start
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
# Search drug labels by name
r = requests.get(f"{BASE}/spls.json", params={"drug_name": "metformin", "pagesize": 5})
r.raise_for_status()
data = r.json()
print(f"Total labels found: {data['metadata']['total_elements']}")
for spl in data["data"][:3]:
print(f" {spl['title']!r:60s} setid={spl['setid']}")
Core API
Query 1: Search Drug Labels by Name
Search for structured product labels (SPLs) using drug name. Returns paginated list of matching labels with set IDs.
import requests
import pandas as pd
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_spls(drug_name, pagesize=20, page=1):
"""Search DailyMed SPLs by drug name. Returns list of label summaries."""
r = requests.get(f"{BASE}/spls.json",
params={"drug_name": drug_name, "pagesize": pagesize, "page": page},
timeout=15)
r.raise_for_status()
return r.json()
result = search_spls("atorvastatin", pagesize=10)
meta = result["metadata"]
print(f"Search: 'atorvastatin' → {meta['total_elements']} labels across {meta['total_pages']} pages")
df = pd.DataFrame(result["data"])
print(df"setid", "title", "published_date".to_string(index=False))
# setid title published_date
# 8f6c7c7c-... ATORVASTATIN CALCIUM tablet 2024-03-15
# a4b7d3e1-... ATORVASTATIN CALCIUM tablet, film coated 2023-11-20
Query 2: Retrieve Full Label by Set ID
Fetch the complete structured product label for a specific drug using its set ID. Returns all label sections including indications, warnings, dosage, and adverse reactions.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def get_spl(setid):
"""Retrieve full SPL document by set ID. Returns label metadata and XML/JSON."""
r = requests.get(f"{BASE}/spls/{setid}.json", timeout=20)
r.raise_for_status()
return r.json()
# Use a known set ID from search results
setid = "8f6c7c7c-1f7f-4f1a-af86-8b2eef2a8b2c" # example atorvastatin label
label = get_spl(setid)
data = label["data"]
print(f"Title: {data.get('title')}")
print(f"Set ID: {data.get('setid')}")
print(f"Published: {data.get('published_date')}")
print(f"Version: {data.get('version')}")
# Access structured sections
if "sections" in data:
sections = data["sections"]
print(f"\nLabel sections ({len(sections)} total):")
for sec in sections[:5]:
print(f" [{sec.get('loinc_code', 'N/A')}] {sec.get('title', 'Untitled')}")
Query 3: Search by NDC Code
Look up drug labels by National Drug Code (NDC) — useful when you have a product barcode or dispensing record.
import requests
BASE = "https://dailymed.nlm.nih.gov/dailymed/services/v2"
def search_by_ndc(ndc_code):
"""Find SPL by NDC code (formatted as XXXXX-XXXX-XX or without dashes)."""
r = requests.get(f"{BASE}/spls.json",
params={"ndc": ndc_code},
timeout=15)
r.raise_for_status()
return r.json()
# NDC for Lipitor 10mg (atorvastatin)
result = search_by
Установить dailymed-database в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dailymed-database?
Query FDA drug labels (DailyMed) via REST API. Search structured product labels (SPLs) by name, NDC, set ID, or RxCUI; get indications, dosage, warnings, adverse reactions, packaging. No auth. For adverse events use fda-database; for DDIs use ddinter-database.
Как установить скилл dailymed-database?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dailymed-database запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic