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

Image for post
Image for post

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?

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:

Image for post
Image for post
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

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

Structured Product Labeling: an XML format for electronic medication labeling

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.

Image for post
Image for post
A label created in accordance with SPL

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

Image for post
Image for post
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.

Image for post
Image for post
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

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.

Image for post
Image for post
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

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.

Image for post
Image for post
Key drug data APIs, their standards, and data coverage

openFDA Drug APIs: access to the publicly available FDA data

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

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.

Image for post
Image for post
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

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

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

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

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

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

Image for post
Image for post
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

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

  • 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

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

Image for post
Image for post
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

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

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

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.

Image for post
Image for post
The drug sources and the classes they associate with

Capabilities. From a number of different drug class types, the RxClass API retrieves

Capabilities:

  • RxNorm drug members by class name or identifier
  • Drug classes by RxNorm drug name or identifier

Drug Interaction API: access to drug-drug interactions

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

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

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

European medicines agencies and their databases

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.

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

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

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.

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

Healthcare tech providers and their drug data APIs

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

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 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

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.

Image for post
Image for post
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

Image for post
Image for post
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.

Image for post
Image for post
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

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.

Written by

Being a Technology & Solution Consulting company, AltexSoft co-builds technology products to help companies accelerate growth.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store