get_fda_drug_labels: Search Drug Labels by Drug Name in FDA Drug Labeling Database

View source: R/get_fda_drug_labels.R

get_fda_drug_labelsR Documentation

Search Drug Labels by Drug Name in FDA Drug Labeling Database

Description

Retrieves drug label information from the FDA Drug Labeling Database that match a specific drug name using the RESTful API endpoint /drug/label.json?search=<drug_name>.

This includes details such as the product ID, brand name, generic name, indications and usage, dosage and administration, warnings, drug interactions, and other prescribing information from FDA-approved drug labels.

Usage

get_fda_drug_labels(drug_name)

Arguments

drug_name

A character string representing the name of the drug.

Details

This function sends a GET request to the FDA openFDA API. It supports caching via the memoise package to avoid redundant calls, and respects a rate limit between successive API requests.

If the API request fails, returns no matches, or returns an error status code, the function returns NULL with an informative message.

Value

A tibble with the following columns:

  • product_id: Unique identifier for the product

  • brand_name: Brand or trade name of the product

  • generic_name: Generic name of the active ingredient

  • manufacturer: Name of the manufacturer

  • product_type: Type of drug product

  • route: Route of administration

  • indications: Approved indications for use

  • warnings: Important warnings and precautions

Note

Requires an internet connection.

Source

FDA Drug Labeling Database via openFDA: https://open.fda.gov/apis/drug/label/

See Also

GET, fromJSON, as_tibble

Examples


  # This function requires an internet connection and downloads data from FDA
  get_fda_drug_labels("aspirin")



MedxR documentation built on Jan. 14, 2026, 5:08 p.m.