# Querying Openfda Labels

Looks up FDA drug labels, NDC directory entries, indications, boxed warnings, and...

- Repository: https://github.com/maziyarpanahi/openmed (5755 stars)
- Category: Writing
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add maziyarpanahi/openmed --skill querying-openfda-labels -g -a claude-code -y`
Codex: `npx skills add maziyarpanahi/openmed --skill querying-openfda-labels -g -a codex -y`
Cursor: `npx skills add maziyarpanahi/openmed --skill querying-openfda-labels -g -a cursor -y`
Gemini CLI: `npx skills add maziyarpanahi/openmed --skill querying-openfda-labels -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add maziyarpanahi/openmed`

## Description

Looks up FDA drug labels, NDC directory entries, indications, boxed warnings, and recalls/enforcement actions via the free public OpenFDA API to enrich drugs that OpenMed extracts. Use when the user wants the prescribing information for a drug, its boxed warning, approved indications, dosage forms and routes, package NDC codes, RxCUI, or whether a product has an open recall. Trigger keywords: OpenFDA, drug label, SPL, prescribing information, boxed warning, black box warning, indications, NDC, package code, recall, enforcement, Class I recall, drug enrichment. Pairs adjacent to OpenMed NER: take a drug name (or RxNorm RxCUI) from openmed.analyze_text and resolve its label, NDC, and recall status. OpenFDA is public and free, no license barrier; send only de-identified drug names, never raw clinical notes.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Querying OpenFDA drug labels, NDC, and recalls

Once OpenMed has pulled a drug name out of a note, you often need authoritative
product facts: the **boxed warning**, approved **indications**, **dosage form /
route**, package **NDC** codes, and whether the product is under **recall**. The
FDA's **OpenFDA** API exposes the Structured Product Labeling (SPL), the NDC
directory, and enforcement (recall) reports, all **public and free**.

This skill is enrichment: it attaches regulatory facts to an extracted drug. It
is **not** clinical decision support, a label lookup informs a human, it does
not prescribe.

## When to use

- You extracted a drug and need its **boxed warning** or **indications** for
  display, alerting, or expectedness checks.
- You need **NDC** package codes, dosage form, or route for a product.
- You want to know if a drug/lot is under an **open recall** (enforcement).
- You want to map a brand name to its generic ingredient and **RxCUI** via the
  label's `openfda` block.

## The three endpoints

| Endpoint | Use | Key fields |
| --- | --- | --- |
| `https://api.fda.gov/drug/label.json` | SPL prescribing info | `boxed_warning`, `indications_and_usage`, `warnings`, `dosage_and_administration`, `openfda.brand_name`, `openfda.generic_name`, `openfda.rxcui`, `openfda.product_ndc` |
| `https://api.fda.gov/drug/ndc.json` | NDC directory | `product_ndc`, `generic_name`, `brand_name`, `dosage_form`, `route`, `active_ingredients` |
| `https://api.fda.gov/drug/enforcement.json` | Recalls | `product_description`, `reason_for_recall`, `classification` (Class I/II/III), `recalling_firm`, `status`, `recall_initiation_date` |

No key needed to try it (240 req/min, 1,000/day per IP). A free `api_key=` raises
the daily cap to 120,000.

## Quick start (real OpenFDA queries)

```python
import requests

The rest: https://github.com/maziyarpanahi/openmed/blob/HEAD/skills/querying-openfda-labels/SKILL.md
