Blog

openFDA vs DailyMed for Drug Interaction Workflows

Where openFDA and DailyMed overlap, where they differ, and why most teams still build a normalization layer.

Published Mar 6, 2026Updated Mar 13, 202612 min read
openFDADailyMedSPLDrug Interactions

Both sources are SPL-centric

openFDA and DailyMed both operate on FDA labeling content represented in Structured Product Labeling (SPL). SPL is a document markup standard defined by HL7, adopted by the FDA as the required format for prescription drug labeling submissions. Every label you find in either system traces back to this common XML-based format.

That shared base is useful for traceability, because interaction statements originate from regulated product labeling requirements. Section 7 of the FDA's Physician Labeling Rule covers Drug Interactions, and both openFDA and DailyMed expose the text content from that section, albeit through different retrieval mechanisms.

Understanding that both sources derive from the same upstream SPL submissions is important for teams evaluating data consistency. In most cases, the underlying content is identical. The differences lie in how each service indexes, exposes, and updates that content for programmatic access.

Where openFDA helps teams move quickly

openFDA provides a searchable API surface for label fields, including interaction-related text fields. The /drug/label.json endpoint accepts query parameters for filtering, sorting, and paginating through label records. For engineering teams that want immediate REST access and query/filter behavior, this can reduce ingestion setup time significantly compared to bulk-download workflows.

The openFDA API accepts free-text search queries across structured fields. You can filter by generic name, brand name, RxCUI, NDC code, or SPL set ID. Results return JSON objects with the full label text broken into named sections, making it straightforward to extract the drug_interactions field programmatically.

Rate limits are clearly documented: 240 requests per minute and 120,000 requests per day with a free API key, or 40 requests per minute without one. These limits are generally sufficient for development and moderate production workloads, especially when combined with a caching layer.

  • Queryable fields include drug_interactions, warnings, contraindications, boxed_warning, and other safety context fields.
  • Published authentication and rate-limit documentation helps with early API planning and capacity estimation.
  • JSON response format maps cleanly to application data models without XML parsing.
  • The openfda sub-object on each result provides cross-reference identifiers like rxcui, spl_set_id, and product_ndc.
  • Sorting by effective_time allows retrieval of the most recently updated label for a given product.

API endpoint details: openFDA REST query syntax

The openFDA drug label endpoint follows a consistent REST pattern. The base URL is https://api.fda.gov/drug/label.json, and queries are constructed using a search parameter with field:value syntax. Multiple conditions can be combined with +AND+ or +OR+ operators, and wildcard matching is supported with the asterisk character.

Pagination is handled through limit (maximum 1000 per request) and skip (maximum 25000) parameters. For large result sets, the API also supports a sort parameter to order results by fields like effective_time in ascending or descending order. This is particularly useful for always retrieving the most current label version.

A typical interaction-focused query targets the openfda.rxcui or openfda.generic_name field, retrieves the top result sorted by effective_time descending, and then extracts the drug_interactions array from the response. Each element in that array is a string containing the full Section 7 text from the label.

API endpoint details: DailyMed web services

DailyMed exposes several web service endpoints documented on the NLM DailyMed support page. These include endpoints for SPL retrieval by set ID, NDC lookup, and full-text search. Responses are available in XML and, for some endpoints, JSON format.

The DailyMed service model is oriented around SPL document retrieval rather than field-level search. You request a specific label by its set ID or NDC, and receive the complete SPL document or individual sections. This makes DailyMed well-suited for workflows where you already know which label you need and want the full, authoritative document.

DailyMed also provides bulk download archives (updated daily) containing all current SPL documents. Teams that need to operate on the entire label corpus, or that need offline access for regulatory or compliance reasons, often prefer the bulk download approach over per-request API calls.

Practical query examples

To illustrate the differences in practice, consider retrieving the drug interactions section for metformin from each source.

With openFDA, you would issue a GET request to the drug label endpoint with search=openfda.generic_name:metformin&sort=effective_time:desc&limit=1. This returns a JSON object where results[0].drug_interactions contains the interaction text. The openfda sub-object provides the spl_set_id for caching and traceability.

With DailyMed, you would first resolve the drug to a set ID (for example, via the /spls.json endpoint with a drug name search), then request the specific SPL sections. The retrieval is a two-step process: identify the document, then fetch its content. The returned data is structured as SPL XML sections.

The openFDA approach requires fewer round-trips for simple lookups. The DailyMed approach provides more granular control over document retrieval and is closer to the source-of-truth SPL submission.

Head-to-head comparison

The following comparison summarizes the key differences across dimensions that matter for interaction pipeline engineering. These observations are based on publicly documented behavior from each service.

  • Data freshness: openFDA indexes labels on a periodic schedule that can lag behind DailyMed by days to weeks. DailyMed publishes labels closer to the time of FDA submission acceptance. For time-sensitive label updates, DailyMed is generally more current.
  • Rate limits: openFDA documents explicit rate limits (240/min, 120K/day with API key). DailyMed does not publish formal rate limits but expects reasonable usage patterns and may throttle aggressive clients.
  • Authentication: openFDA uses optional API keys that unlock higher rate limits. DailyMed web services require no authentication.
  • Query flexibility: openFDA supports field-level search, boolean operators, wildcards, and sorting. DailyMed web services support lookup by set ID, NDC, and drug name, but do not offer the same ad-hoc query flexibility.
  • Bulk download: DailyMed provides daily-updated bulk SPL archives. openFDA provides bulk download files but they are oriented around the entire dataset rather than incremental updates.
  • Response format: openFDA returns JSON with label text split into named sections. DailyMed returns XML (SPL format) or JSON depending on the endpoint, with the full document structure preserved.
  • Identifier cross-references: openFDA embeds an openfda object with rxcui, ndc, spl_set_id, and unii identifiers on each result. DailyMed provides set ID and NDC but does not embed RxCUI directly in API responses.

Where DailyMed remains valuable

DailyMed remains a direct NLM channel for official label content and provides web services plus downloadable resources. For teams building systems that require audit trails back to the authoritative label source, DailyMed's closer relationship to the original SPL submissions is an advantage.

Many teams keep DailyMed in their ingestion strategy for source fidelity, reconciliation, and auditing workflows. In regulated environments, being able to point to the NLM-published SPL document as the source of an interaction statement can simplify compliance reviews.

DailyMed's bulk download capability is also valuable for teams that want to build their own search index or operate in air-gapped environments. Rather than depending on an external API at query time, you can ingest the full corpus and run extraction locally.

When to use which: a decision framework

The choice between openFDA and DailyMed is not always exclusive. Many production systems use both, with each serving a different role in the pipeline. Here is a framework for deciding.

Choose openFDA as your primary retrieval layer when: you need fast, ad-hoc queries by drug name, RxCUI, or NDC; your workload fits within the published rate limits; you want JSON responses that map directly to application models; and you are building a real-time API that resolves interactions on demand.

Choose DailyMed as your primary retrieval layer when: you need the most current label version as close to submission time as possible; your compliance requirements mandate sourcing from the NLM-published label; you want to build an offline or bulk-processed label index; or you need the full SPL XML for downstream document processing.

Choose both when: you use openFDA for real-time queries during normal operation and DailyMed for periodic reconciliation to verify that your cached labels match the latest published versions. This dual-source pattern adds complexity but provides a cross-check that is valuable for clinical decision support systems.

Combining both sources in a production pipeline

A practical production architecture might use openFDA as the real-time query layer and DailyMed as a reconciliation and freshness-check layer. In this pattern, the API call path queries openFDA for label data keyed by spl_set_id, caches the result, and serves subsequent requests from cache.

On a separate schedule (daily or weekly), a background job compares the effective_time of cached labels against the latest version available from DailyMed. When DailyMed shows a newer version, the cache entry is invalidated and refreshed on the next request. This approach keeps real-time latency low while ensuring data freshness over time.

For teams concerned about openFDA availability, DailyMed can also serve as a fallback retrieval source. If an openFDA request fails or times out, the system can attempt to fetch the same label from DailyMed by set ID. This adds resilience without requiring a full dual-ingestion pipeline.

The /how-it-compares page on this site includes a structured comparison of these approaches alongside other data source options like DrugBank, for teams evaluating multiple integration paths.

Caching and performance considerations

FDA drug labels are not updated in real time. Most labels change infrequently, with updates tied to labeling supplements, safety communications, or periodic revisions. This makes label data highly cacheable. A well-designed caching layer can reduce external API calls by 90% or more in steady-state operation.

The recommended cache key is the openfda.spl_set_id field, which is a stable identifier for a given product's labeling across versions. Cache entries should store the effective_time from the label so that freshness can be assessed without re-fetching the full document.

Time-to-live (TTL) values depend on your freshness requirements. A 24-hour TTL is reasonable for most use cases, with a background refresh job that checks for newer versions. For systems that need tighter freshness guarantees, a 1-hour TTL combined with conditional checks against DailyMed's last-modified metadata can work.

Rate limit management is especially important when warming a cache from cold. If you need to populate interaction data for thousands of drugs, staggering requests to stay within openFDA's 240/minute limit is essential. A queue-based approach with configurable concurrency helps avoid throttling.

The /faqs page on this site addresses common questions about API capacity planning and data freshness for interaction workflows.

What neither source gives you out of the box

Neither source is a turnkey, opinionated interaction-severity API for your product UX. The drug_interactions text in both openFDA and DailyMed is unstructured prose written for clinicians, not structured data ready for application logic.

Product teams generally add their own layers for terminology normalization (mapping drug mentions in the text to standard identifiers), extraction quality controls (ensuring that interaction pairs are correctly identified), severity policy (classifying interactions as contraindicated, major, moderate, minor, or unknown), and customer-facing response contracts (stable JSON schemas with citations).

This gap is exactly where purpose-built interaction APIs add value. Rather than asking every consuming team to build and maintain their own extraction and classification pipeline, a managed service can handle that complexity once and expose clean, structured results. The /docs page on this site describes the response schema that RxLabelGuard provides for this purpose.

References

  1. openFDA Drug Label Endpoint (U.S. Food and Drug Administration (FDA); accessed Mar 6, 2026)
  2. openFDA Drug Label Searchable Fields (U.S. Food and Drug Administration (FDA); accessed Mar 6, 2026)
  3. DailyMed (U.S. National Library of Medicine (NLM); accessed Mar 6, 2026)
  4. DailyMed Web Services (U.S. National Library of Medicine (NLM); accessed Mar 6, 2026)
  5. How Do I Use Prescription Drug Labeling (U.S. Food and Drug Administration (FDA); accessed Mar 6, 2026)
  6. openFDA Authentication (U.S. Food and Drug Administration (FDA); accessed Mar 6, 2026)
  7. The FDA Announces New Prescription Drug Information Format (U.S. Food and Drug Administration (FDA); accessed Mar 6, 2026)