Microproduct data guidebeginner

DailyMed Drug Labels

Structured FDA drug-label (SPL) documents for building label lookup, section-search, and medication-reference tools.

At a glance

Difficulty
Beginner — comfortable for a first prototype
Size
Medium · ≤5 GB
Formats
JSON, XML, ZIP
Access
API or Download
API key
Not required
Provider
U.S. National Library of Medicine
Updates
Daily

From source to product signal

Test a product idea in four steps

DailyMed REST returns Structured Product Labeling metadata and sections. Start with one drug name search and a single SET ID. Labels are regulatory documents, not a complete picture of off-label use, and they can lag manufacturer updates.

1

Check the setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the data

  1. 1.Open the DailyMed web-services help page.
  2. 2.Search drug names for one generic and request the first page.
  3. 3.Keep SET ID, title, and last-updated date.
Open official source
3

Run the Python example

Install the packages, then run the notebook cell.

python -m pip install pandas requests

import pandas as pd
import requests

response = requests.get(
    "https://dailymed.nlm.nih.gov/dailymed/services/v2/spls.json",
    params={"drug_name": "ibuprofen", "pagesize": 20, "page": 1},
    timeout=30,
)
response.raise_for_status()
labels = pd.DataFrame(response.json()["data"])
labels["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(labels.head())
4

Test a useful signal

List ibuprofen SPL titles

Test whether DailyMed search can power a bounded label-lookup inbox.

  1. 01Keep SET ID, title, and published date from the first page.
  2. 02Deduplicate SET IDs and list titles that look like different dosage forms.
  3. 03Explain that SPL is the currently published label text and is not a complete clinical-use database.

Dataset details

U.S. National Library of Medicine is a government source. Last verified 2026-08-18. Temporal coverage: currently published SPL labels with historical versions.

Theme

Health, Food & Safety

Domains

PharmaceuticalsHealth CareRegulation

Data types

DocumentsTextRegistry Data

Tasks

Label LookupSection SearchReference Building

Geography

United States

Formats

JSONXMLZIP

Provider

U.S. National Library of Medicine

Data terms

NLM copyright and data-use terms