Drug data APIs

Medicine and Drug Data APIs from openFDA, DailyMed, RxNorm, GoodRx, DrugBank, First Databank, and more

The pharma industry has a transparency problem. Many manufacturers that create medications for HIV, breast cancer, pediatric meningitis, and many rare diseases are withholding their clinical trial results, information about safety, and efficacy of their product. But the situation is gradually changing.

In 2015, Bioethics International, along with researchers from Yale and Stanford universities, established the Good Pharma Scorecard - an annual ranking of pharma companies and their level of transparency that impacted how the industry approached data sharing. By 2019, almost all Big Pharma companies managed to provide full drug trials data to Food and Drug Administration within 6 months after approval. This allows everyone obtaining that data to innovate healthcare applications with up-to-date, detailed drug information.

Here are the main sources of that information, shared via APIs.

How does drug data sharing work?

FDA or the Food and Drug Administration is a federal agency of the U.S. Department of Health and Human Services responsible for the protection and promotion of public health. Along with food, tobacco, cosmetics, and veterinary products, FDA controls and supervises prescription and over-the-counter (OTC) medications.

In accordance with the Drug Listing Act, all registered drug establishments are required to submit their complete list of drugs to the FDA. And since 2011, FDA has been accepting only electronic submissions. The format for these submissions uses the Structured Product Labeling (SPL) standard to organize the data within the file. Here’s how the submission works on the example of the labeling information:

The flow of consistent labeling content: from manufacturers to computer systems

The flow of consistent labeling content: from manufacturers to computer systems, Source: Arbortext



  1. Manufacturers submit SPL files containing drug registration and listing information.
  2. The FDA reviews and approves their labeling content and then derives National Drug Codes (NDC) and stores them in the NDC Directory.
  3. Then, the FDA automatically provides labeling content and updates to the National Library of Medicine (NLM) of the National Institutes of Health. It operates the world's largest medical library: books, journals, technical reports, manuscripts, microfilms, photographs, and images on medicine and related sciences. NLM stores its vast data in the public DailyMed repository.
  4. DailyMed serves as the official provider of FDA label information for hospital information management systems, electronic prescription systems, and other healthcare software to process the labeling content for analysis, aggregation, data mining, etc.
Now that we’ve told a long story short, let’s dive into the standards that rule the drug data exchange process.

Understanding drug data standards

Initially, healthcare systems of hospitals, pharmacies, and vendors developed different variants of drug naming and labeling which made it difficult for one system to communicate with another.

Drug standards help combat medical care’s geographic isolation and high variability.

Structured Product Labeling: an XML format for electronic medication labeling

HL7 International produces a number of international data standards for sharing and processing information in a uniform and consistent manner. Structured Product Labeling (or SPL) is one of the main HL7 standards.

SPL defines the content and structure of product labeling information that must be submitted to the FDA. It’s an XML file that contains both human-readable drug label text and structured elements of the drug properties for computer systems processing.

A label created in accordance with SPL

A label created in accordance with SPL



National Drug Codes: a drug's unique 10-digit identifier

NDC is a unique 10-digit number assigned to US drugs. It consists of three sets of codes. The first set identifies the FDA-appointed labeler code - the company that manufactured, repackaged, or distributed the drug. It’s followed by the product code specifying its strength, dosage form, the formulation for this specific company, and the package code defining its size and type. The product and package codes are assigned by the company.

The NDC for a 100-count bottle of Prozac 20 mg, Source: Drugs.com

You can browse the FDA database or find an NDC number on the package.

Mylan Pharmaceuticals’ Diazepam tablets with their NDC number printed on the package

Mylan Pharmaceuticals’ Diazepam tablets with their NDC number printed on the package, Source: Basicmedical Key



RxNorm: normalized terminology for efficient and unambiguous communication of drug names

RxNorm is a tool supporting semantic interoperation. It assigns a standardized name for the drug that lists its active ingredient, strength, physical, and standard dosage form.

Receiving drug names from multiple data sources formatted in many different names, RxNorm seeks synonyms based on a certain level of abstraction and groups them under one concept with a normalized name.

Each RxNorm concept receives a unique code - RxCUI - that identifies the common meaning that the grouped source names share.

In some cases, source data may also include relationships that link drug names to other drug names and ingredients, as well as other information, such as NDCs, marketing categories, and pill imprint information.

The RxCUI is used to link one entity in RxNorm to every other entity it’s related to, such as name to ingredient to class

The RxCUI is used to link one entity in RxNorm to every other entity it’s related to, such as name to ingredient to class, Source: Michelle Smerek



AHFS Patient Medication Information: patient-friendly presentation of drug information

American Society of Health-System Pharmacists or AHFS is an authority on educating patients about drug use and safety. Aiming to improve medication use and enhance patient safety, AHFS developed a database - Patient Medication Information - where most prescription and OTC medications available in the US are written in lay language for a consumer’s understanding.

Available in both English and Spanish, the AHFS PMI database has been recognized at the HHS National Consumer Education Materials Contest. It's a medication data provider for many popular websites like MedlinePlus, DailyMed, and FDA.

AHFS PMI’s hierarchical and granular structure allows organizations to customize its content to their specific needs. It includes How Tos for giving instructions on using various dosage forms like eye drops, suppositories, and inhalers. Also, AHFS PMI identifies criteria used to detect drugs potentially dangerous for elderly patients. You can review a sample of a product monograph here.

If you’d like to integrate AHFS clinical drug information, you can check into their API.

Being aware of the standards that manage the data exchange flow in the pharmaceutical industry, we can get to reviewing the major public APIs provided by the federal agencies. They are openFDA, DailyMed, RxNorm, and MedlinePlus. Then, we will cover APIs provided by healthcare technology companies: DrugBank, GoodRx, First Databank, and Wolters Kluwer.

Key drug data APIs, their standards, and data coverage

Key drug data APIs, their standards, and data coverage



openFDA Drug APIs: access to the publicly available FDA data

openFDA is an open government platform for drug and medical device data. openFDA also has veterinary and food APIs, but this time we’ll focus on its drug APIs, NSDE, and substance data reports.

The APIs return results in JSON by default. Having an API key, an IP address can make 240 requests per minute and in total 120,000 requests per day, while a no-key IP is limited to 40 requests per minute and 1K requests a day.

While using different drug identifiers, drug datasets lack consistency. That’s why OpenFDA harmonizes drug identifiers where possible by annotating the original records with additional product identifiers, such as Universal Product Code and brand name. This eases both API search and understanding of the drug products.

openFDA Adverse event API: access to adverse event and medication error reports

Side effects, product use errors, product quality problems, and therapeutic failures are different kinds of undesirable experience associated with the use of a medical product. Both healthcare professionals and consumers voluntarily report adverse events to the FDA and they are stored in the FDA Adverse Event Reporting System (FAERS).

Coverage. Adverse event reports include a list of drug products and individual patient reactions. But they don’t link a certain drug to a certain reaction. Other details about the drug products vary and may include the indications for use, route of administration, dose.

Template of the adverse event report

Template of the adverse event report

Adverse events and medication errors are coded to terms in the Medical Dictionary for Regulatory Activities (MedDRA) terminology.

Disclaimer: FDA neither validates nor verifies the adverse event reports and it warns that while some drugs have a higher number of adverse events, it can be just because more people are taking them. So, they shouldn’t be the only source while evaluating an event.

Capabilities. The API finds adverse event reports which include general information, patient details (age, weight, sex, etc.), other drugs taken, and experienced reactions.

The API filters the results by:
  • the sender: manufacturer or public,
  • the patient: male or female, age group
  • the date of the report
  • the reaction: life-threatening, hospitalization, disabling, death, congenital anomaly or less serious
  • the drug class
  • the report id or type,
  • the country of occurrence
You can customize search parameters using searchable fields.

openFDA Product labeling API: access to the SPL data set

The API returns SPL-formatted drug labels and other drug-specific data that manufacturers and distributors submit to FDA about their products. Drug labels are divided into sections like prescription drugs, OTC drugs, adverse reactions, etc.

Disclaimer: Although manufactures are required to submit unfinished drugs, FDA neither reviews nor approves them. Hence, they are marked as "unapproved" in the database. In addition, as drug listing updates are obligatory only twice a year, FDA may not yet have been notified of recent changes before updating the NDC Directory. As a result, drug labeling on the website is not always identical to the labeling on the currently distributed products. Such drugs are marked "OTC monograph final" or "OTC monograph not final" as they are not checked for conformance.

Coverage: prescription and OTC drug labeling submissions.

Capabilities. The API filters SPL reports by:
  • the section: prescription drugs or OTC drugs
  • ingredient: active and inactive
  • risks and adverse reactions
  • warnings and cautions: Boxed Warning, pregnancy and breastfeeding, children’s reach, etc.
  • route of administration: oral, topical, intravenous, ophthalmic, dental, intramuscular, respiratory, sublingual, subcutaneous, nasal, etc.
  • drug interactions: caffeine, grapefruit juice, alcohol, etc.
  • storage and handling
Check the full list here.

openFDA NDC Directory API: access to the database of the National Drug Codes

The API makes calls to the NDC Directory which contains a constantly updated list of all drugs manufactured, prepared, propagated, compounded, or processed for commercial distribution.

Coverage: NDC numbers along with the listing-related information but only on final marketed drugs

Capabilities. The API filters NDC products by:
  • generic name, brand name
  • dosage form
  • expiration date
  • ingredients
  • pharmacological class categories: cell-mediated immunity, increased histamine release, allergens, etc.
  • Drug Enforcement Administration schedule number: CI, CII, CIII, CIV, and CV.
The full list of the fields can be found here.

openFDA Recall enforcement reports API: access to drug recall data

If a defective drug product is removed from the market or corrected to comply with FDA laws, it’s called a drug recall. FDA utilizes a Recall Enterprise System (RES) to keep a record of drug recalls. It can be insightful information in terms of processing domestic and import regulatory and enforcement matters.

Coverage: RES database has information on drug product recalls contained in enforcement reports.

Capabilities. The API classifies enforcement report by:
  • Initiator: firm or FDA
  • Level of hazard involved: I, II, or III
  • Reason for recall
  • Recall initiation date
  • Report date
  • Product type
  • Address

DailyMed RESTful API: access to the structured product labeling data

DailyMed API returns SPL information in XML and JSON formats. Also, you can download both the current and older versions of an SPL in ZIP or PDF.

Coverage: all NDA numbers, drug names, NDC codes, RxCUIs, SPLs, Unique Ingredient Identifiers.

In this context, an NDA or new drug application is a six-digit number FDA assigns to a new pharmaceutical pending approval for sale and marketing in the United States.

Capabilities:
  • drug classes associated with one SPL
  • an SPL document, version history, media links, NDCs, and product packaging descriptions for specific Set ID
Here, Set ID is an auto-generated string of numbers and letters to exclude identical SPL versions: 9aa9d2e6-6982-48e5-831d-dbe7c04a14ed.

You can manage the output by applying optional query parameters available for each resource. For example, /applicationnumbers can retrieve an NDA for a drug, its marketing category code, and the Set ID of a label. Click on each resource for more details.

MedlinePlus: access to the patient-friendly medicine information

MedlinePlus is an NLM resource of authoritative health and wellness information for patients. Collecting data from over 1,600 organizations, MedlinePlus carefully selects quality resources within a set of criteria.

Coverage. MedlinePlus includes descriptions of over 1,000 diseases and 150 medical tests, a library of medical images, videos, and articles, health recipes and nutrition advice, and of course drugs and supplements. AHFS provides MedlinePlus with data on generic prescriptions and OTC drugs, their side effects, usual dosage, precautions, and storage. Also, MedlinePlus sources herbs and supplements data from an evidence-based collection of alternative treatments.

MedlinePlus Connect

Health organizations and IT providers can link patient portals and electronic health record (EHR) systems to MedlinePlus consumer health information using a free MedlinePlus Connect service. MedlinePlus Connect medication requests support both RxCUI and NDC.

How an EHR system communicates with MedlinePlus Connect

How an EHR system communicates with MedlinePlus Connect: It sends a request with a medication code, and the service returns link(s) to the most appropriate drug information.



MedlinePlus web service

If you’d like to build an application and utilize MedlinePlus health topic information, go for its web service. It’s free and does not require registration or licensing.

It allows 85 requests per minute per IP address. If your case requires sending a large number of requests, you may consider an alternate method of accessing MedlinePlus data - downloadable XML records.

Capabilities. MedlinePlus web service accepts keyword searches as requests and returns relevant health topics in ranked order. The rank is based on the relevance score as determined by the search engine. At the same time, field searching can have a significant impact on the order in which results are returned. If a query string matches a health topic's title, it’ll be boosted to the top, regardless of the rank.

RxNorm APIs: access to the NLM drug information sources

All drug information in RxNorm constituent vocabularies can be found in the RxNav browser. We’ll talk about six APIs to retrieve data from the RxNorm data set:
  • RxNorm RESTful Web API
  • Prescribable RxNorm API
  • RxTerms API
  • RxClass API
  • Drug Interaction API
  • RxCUI History API
You can also use RxMix to combine functions from the APIs and create custom applications.

You can choose between XML and JSON data formats. NLM maintains the service available to all users by setting the limit of up to 20 requests per second for a single IP address. In exceptional cases, NLM may grant a larger number of requests. Meanwhile, you can limit the number of requests by caching results or installing a Docker-based version of the APIs - RxNav-in-a-Box.

RxNorm RESTful Web API: access to the complete RxNorm data set

The RxNorm API retrieves data from the RxNorm vocabulary developed by the NLM.

Coverage. The RxNorm data set consists of multiple source vocabularies.

Source vocabularies represented in RxNorm, except for MDDB removed in 2017

Source vocabularies represented in RxNorm, except for MDDB removed in 2017

Capabilities:
  • Search RxNorm concepts by identifier/name/specified term types
  • Find NDCs/properties/related info/proprietary information/status for a concept,
  • Find properties for NDC, its status
  • Search brands by ingredients
  • Search concept by specified relationship types/term types
  • Return the related drugs
  • Find the closest concepts matching the input string when it doesn’t correspond to any concept as it is
  • Make spelling suggestions

Prescribable RxNorm API: access to up-to-date prescription content

In contrast to the RxNorm data set, Prescribable Content includes only active US-based prescription drugs. No obsolete or suppressed data and veterinary drugs.

Coverage. Prescribable RxNorm API fetches only data from two RxNorm source vocabularies: FDA Structured Product Labels and RxNorm normalized names and codes.

Capabilities coincide with the ones in RxNorm API which have to do with the following data:

RxTerms API: access to the drug terminology for efficient data entry

RxTerms data set contains US drug interface terminology derived from RxNorm but adjusted for medications data entry like e-prescribing or entry of medical practitioner instructions. Check out how the RxTerms data is applied in this demo.

Coverage. It covers 99 percent of both generic and brand names of most commonly prescribed drugs in the US.

Capabilities. RxTerms API retrieves:
  • Concepts
  • Information for a specified concept
  • Display name for a specified concept
RxTerms applies commonly used synonyms and abbreviations for user-friendly data entry and tallman lettering to avoid medication errors. This efficient data entry approach helps avoid excessively long drug names as it identifies two parts in the drug data. The first one is the drug name and how it’s placed into the body, and the second one describes its strength and dose form.

RxClass API: access to the RxClass Browser

RxClass Browser navigates through the class trees linking them with drug sources and eventually finding the RxNorm drug members associated with each class.

Coverage. RxClass contains 13 drug class trees and nine drug sources that associate generic drugs to the classes. While three out of nine sources - DailyMed, MEDRT, and FDASPL - overlap in terms of drug associations with some class trees, RxClass selects only one of them at any given time.

The drug sources and the classes they associate with

The drug sources and the classes they associate with

Capabilities. From a number of different drug class types, the RxClass API retrieves
  • RxNorm drug members by class name or identifier
  • Drug classes by RxNorm drug name or identifier

Drug Interaction API: access to drug-drug interactions

Coverage. The API leverages two sources for drug-drug interactions (DDIs) information: a list of high-priority DDIs and the DrugBank database. We’ll talk about DrugBank APIs in more detail later.

Capabilities:
  • Finds interactions between a list of drugs
  • Finds the interactions for an RxNorm drug
  • Gets the sources of the interactions

RxCUI History API: access to concept history

This API allows for looking up concept information on any RxNorm concept that has ever been in the RxNorm data set: be it a retired concept or the one without RxNorm vocabulary terms.

Coverage: the complete RxNorm data set starting from the 2005 version.

Capabilities:
  • Gets the history information for an RxNorm concept by RxCUI
  • Gets the concepts by a specified status

European medicines agencies and their databases

We’ve been talking a lot about American drug data standards and their APIs, but we aren’t leaving Europe out. There, the main organization in charge of evaluation, supervision, and safety monitoring of medicines is the European Medicines Agency.

On their website, EMA publishes human medicines data in the Excel table format. It includes information at various stages of the drug lifecycle: from early development through initial evaluation to post-authorization changes, safety reviews, and withdrawals of authorization. You can download EMA medicine data, which is updated on a daily basis.

European public assessment reports

European public assessment reports include information on authorized, refused, suspended or withdrawn medicines at an EU level, withdrawal assessment reports

Meanwhile, the United Kingdom standardizes their drug information in the Electronic medicines compendium.

This searchable database is checked and approved by European government agencies. emc gets data from over 250 pharmaceutical companies, the National Health Service of the UK, and other healthcare organizations. The emc database contains medication characteristics like dose, use, and side effects, package leaflets, audio and video content, safety alert, and additional details like change of ownership, package information, or stock issues.

Healthcare tech providers and their drug data APIs

Besides official public drug APIs, there are a lot of healthcare tech players with customized API solutions that have multiple drug data sources integrated under the hood. Tech providers build their own in-house drug databases composed of many different sources and tuned with additional sophisticated features.

We’ve picked five API providers that are widely used and deliver exhaustive drug data information.

DrugBank Clinical Drug API: access to comprehensive clinical data from the USA, Canada, and European Union

DrugBank is a healthcare tech provider with a pharmaceutical knowledge base which they collect, curate, and organize into a single unified resource. The DrugBank API is scoped by region of availability which is USA, Canada, or EU. JSON is the default response format.

Coverage:
  • Drug products dataset comprises all drugs approved by FDA, EMA, and Health Canada. It includes brand name, labeler, dosage, dose form, route of administration, and marketing period. Drug products come complete with simple and clinical descriptions and medicinal ingredients.
  • Drug ingredients are sourced from over 24,000 references including FDA labels. They sum up common synonyms, indication descriptions, mechanism of action, toxicity, and chemical structure.
  • The product concept dataset is organized hierarchically to simplify navigation and the comparison of similar products.
  • Pill image dataset is sourced from the NIH so it covers only US drugs.
  • The adverse effects are collected from clinical trial data, drug labels and post-market reporting.
Capabilities. The Drug API enables:
  • Autocomplete search for drug products by drug ingredient name
  • Multi-step search for a specific product by selected attributes (e.g. route or dosage)
Its add-on modules allow you to:
  • Search by condition
  • Find drug-drug interactions (DDI) with a list of medications
  • Get DDIs and adverse effects for a product or ingredient

GoodRx APIs: access to US prescription drug retail pricing

GoodRx is a telemedicine platform that tracks prescription drug prices in the US. The service partners with local pharmacies to offer discount coupons on medications. Aggregating drug prices from their contracted pharmacies, GoodRx finds the cheapest tags for a given prescription.

GoodRx APIs power such platforms as prescription adherence apps, drug information resources, EHR and practice management software, digital health platforms, and medical reference apps.

Coverage. Nationwide pharmacy chains, including Walmart, CVS, Walgreens, and RiteAid. In total, GoodRx covers 80 percent of US retail drug purchases.

Capabilities. GoodRx provides five public APIs that return data for the most-prescribed version of that drug. Also, you can filter the result by specifying form, dosage, brand or generic version, and/or quantity of the drug.
  • Fair Price API returns the maximum reasonable price for a given drug at a local pharmacy.
  • Low Price API returns the lowest cash price for a given prescription drug
  • Price Comparison API returns the three lowest prices without applying insurance
  • Drug Info API shows all available form and dosage options to ease price calls construction
  • Drug Search API matches the query to the drug name in the database, does spell checking if necessary, and returns the top five suggestions
If you’re interested in more GoodRx drug content other than just prices, contact them directly at info@goodrx.com.

First Databank Cloud Connector API: access to MedKnowledge database

Formerly known as National Drug Data File Plus, FDB MedKnowledge by First DataBank is an integrated US drug database researched, verified, and updated by expert clinical staff.

The FDB Cloud Connector API integrates your application with theMedKnowledge via web services hosted by FDB in the cloud. Its infrastructure is powered by Amazon Web Services.

How request executions with FDB Cloud Connector works

How request executions with FDB Cloud Connector works

Coverage. FDB MedKnowledge is one of the most widely used drug databases in the US. It contains vast clinical information powered by various standard vocabularies and government modules: FDB concepts, NDC, RxNorm, AHFS, DailyMed, Medicaid, Medicare, state boards of pharmacy, etc.

Capabilities. FDB Cloud Connector provides web services supporting the extensive array of drug knowledge it has integrated:
  • Dosing and ordering data,
  • Drug images and imprints,
  • Drug pricing information for most drugs commonly dispensed by a US pharmacy,
  • Multiple allergic reactions, warnings, and precautions,
  • Drug-drug and drug-food interactions, indications, and side effects
  • and many more details.

Wolters Kluwer Health APIs: access to global clinical drug information for healthcare professionals

Wolters Kluwer Health (WKH) is a provider of healthcare information for professionals, hospitals, insurance companies, pharmacies, EMRs, etc. Operating in South America and Asia Pacific, Europe and Australia, the Middle East and New Zealand, WKH is a truly global provider.

WKH take pride in their evidence-based process of reviewing and developing their own content obtained from general healthcare sources

WKH take pride in their evidence-based process of reviewing and developing their own content obtained from general healthcare sources

WKH clinical drug info is largely contained in its Medi-Span database of drug-descriptive and drug pricing data. It uses the Generic Product Identifier (GPI) to consistently organize the obtained content. GPI is a unique 14-digit combination where each group of digits identifies a certain drug characteristic.

GPI for Lipitor Oral Tablet 10 Mg

GPI for Lipitor Oral Tablet 10 Mg

Coverage. WKH maintains long-standing relationships with pharmaceutical companies to obtain timely information on drug products. Besides, they involve clinical drug information leaders, such as PQA, ONC, Surescripts, ASHP, APhA, and NCPDP.

Capabilities. Medi-Span clinical API suite offers:
  • Searching and retrieving adverse drug effects data for a given drug or specific drug identifier (e.g. incidence or severity level, time frame of the incident, medical conditions prone to particular adverse drug effect)
  • Drug dosing information specific to patient parameters and conditions, route of administration, indication, dose type, etc., dosing recommendations
  • Drug filtering by allergens
  • Precautions filtered by severity, drug necessity, conditions like breast-feeding
  • drugs prescribtion by specific medical condition, FDA approval and medical recognition, source and its quality, therapy duration, expected result,
  • Prevention of drug duplications
  • Compatibility and stability information for parenteral drugs
  • Calculation for morphine equivalent dosing to safely prescribe pain medications
  • Return drug identifiers: NDC, proprietary GPI, and Canadian Drug Identification Number
  • Identification of contraindicated routes of administration or those not recommended
There are also data mapping APIs that map concepts between Medi-Span and the data obtained from RxNorm, FDA UNII, and VA NDF-RT organizations.

APIs role in health IT interoperability

Signed into law in 2016, the Cures Act aims at expediting medical product development by creating intercenter institutes to coordinate activities in major disease areas, drugs included. And that’s where standardized APIs are needed to enable efficient information exchange among the increasing number of health systems.

Interoperability is no longer managed in old-school ways like phone calls and fax machines. Now API is the new standard of how information is sent, retrieved and processed. It’s a means of delivering a centralized view of the patient story. Still, today healthcare APIs lack standardization in terms of data sets and implementation. While medical data exchange standards are gradually adopted, the industry is taking another step towards system interoperability.

Comments1

Sort by