Skip to contents

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, adverse reactions, drug interactions, and other prescribing information from FDA-approved drug labels.

Usage

get_fda_drug_labels(drug_name)

Source

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

Arguments

drug_name

A character string representing the name of the drug.

Value

A tibble with the following columns:

  • 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

  • adverse_effects: Known adverse reactions

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.

Note

Requires an internet connection.

See also

Examples

if (interactive()) {
  get_fda_drug_labels("aspirin")
}