pharmacopeia

Methodology & editorial policy

How the dataset is built and what it is for. pharmacopeia is a reference layer over public medication data — it never interprets, recommends, or gives medical advice.

Current snapshot v0.2.0-scale · 2,577 drugs · 2,208 classes · 2,577 ingredients.

Principles

Every design choice serves one goal: structured public facts about medications, served as predictable JSON and browsable pages, with a clear audit trail back to an authoritative source.

  • Reference, never recommendation. The project describes what regulators and the literature say. It does not tell anyone what to take, prescribe, or substitute.
  • Public sources only. Nothing here depends on a paid or licence-restricted feed.
  • Auditable by construction. Every record carries provenance, so any field can be traced to its origin.
  • Stable identity. Entities are keyed by a permanent slug; identifiers (RxCUI, UNII, ATC) cross-link to external systems.

Data sources

All data is derived from public, openly licensed sources. Each record links to the specific source document it was built from.

openFDAopen.fda.gov
FDA structured product labeling (SPL): indications, warnings, dosing, adverse reactions; drug-shortage and FAERS datasets.
RxNorm / RxNav (NLM)rxnav.nlm.nih.gov
Normalized drug names, ingredient relationships, and RxCUI identifiers — the backbone of the slug + identifier model.
DailyMed (NLM)dailymed.nlm.nih.gov
Source structured product labels behind individual openFDA label records.
WHO ATCwww.whocc.no
Anatomical Therapeutic Chemical classification codes and the class hierarchy.
PubChem (NIH)pubchem.ncbi.nlm.nih.gov
2D chemical structures (SMILES, InChIKey) and the fingerprints behind structural-analog ranking.
ICD-10-CM (CMS/NCHS)www.cms.gov
Public-domain condition codes used to crosswalk labeled indications into the conditions index.
ClinicalTrials.gov / PubMedclinicaltrials.gov
Trial registrations and curated literature references pinned to each drug.
CPICcpicpgx.org
Curated pharmacogenomic drug–gene pairs and evidence levels.

How records are built

The ingest pipeline resolves a drug from RxNorm, fetches its openFDA label, and assembles a single validated record. Narrative label sections (boxed warning, indications, dosing, adverse reactions) are kept verbatim as reference text; structured fields (identifiers, classes, dosing rows) are normalized. Crosswalks for ICD-10, DEA scheduling, the FDA Orange Book, structures, interactions, shortages, trials, literature, and pharmacogenomics are applied conservatively — they only ever fill data, never overwrite an existing value, and a missing crosswalk value means “no confident match,” not “none exists.”

Every record is validated against a Zod schemabefore it is published; the same schema generates the API's runtime validation and the SDK types, so the shape you read here is the shape the API guarantees.

Provenance & confidence

Each record carries a provenance object: the canonical sourceUrl, a sourceHash of the source content, the extractedAt timestamp, the extractor that produced it, and a confidence score. AI-extracted content is labeled as such in the interface. For any use beyond casual reference, verify the field against the cited sourceUrl.

Review & corrections

Candidate records are gated before publication: a programmatic candidate needs a real openFDA label to ship, and records that resolve but cannot be grounded in a source are held back for review rather than published. Found an error? Every page links its source — open an issue on the project repository with the slug and the source discrepancy and it will be corrected at the next refresh.

Update cadence

Refreshes are delta-based: a section is re-fetched only when its source content hash changes, and scheduled jobs (for example the daily drug-shortage refresh) rebuild their slice straight from the upstream source and skip the write when nothing changed. The changelog and its feed record notable dataset changes.

Limitations

  • Jurisdiction is US-FDA only in v0. Labeling, availability, and approvals elsewhere will differ.
  • FAERS adverse-event counts are voluntarily reported volumes, not incidence rates, safety signals, or causal evidence.
  • Crosswalks are precision-biased: absence of a code or link is not evidence of absence.
  • This is not a clinical decision-support tool, an EHR/FHIR layer, a symptom checker, or a diagnostic API.

pharmacopeia is for educational and informational use only. Nothing here is medical advice. Always verify against each record's cited source and consult a qualified professional.

Search pharmacopeia

Search drugs, classes, and ingredients