
Search Drug Labels by Drug Name in FDA Drug Labeling Database
Source:R/get_fda_drug_labels.R
get_fda_drug_labels.Rd
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.
Source
FDA Drug Labeling Database via openFDA: https://open.fda.gov/apis/drug/label/
Value
A tibble with the following columns:
brand_name
: Brand or trade name of the productgeneric_name
: Generic name of the active ingredientmanufacturer
: Name of the manufacturerproduct_type
: Type of drug productroute
: Route of administrationindications
: Approved indications for usewarnings
: Important warnings and precautionsadverse_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.
Examples
if (interactive()) {
get_fda_drug_labels("aspirin")
}