Random Drugs
GEThttps://api-drugs.dataandapis.com/v1/drugs/random
Random Drugs is an endpoint of the Drugs API. 135,000 FDA drug products by NDC, joined with 17,900 recall reports.
Send your key in the X-Api-Key header. Each call costs 1 token; a free key includes 500 tokens a month.
Request
Query parameters
| Parameter | Example | |
|---|---|---|
| amount | 3 | Optional |
Example request
curl
curl "https://api-drugs.dataandapis.com/v1/drugs/random?amount=3" \
-H "X-Api-Key: YOUR_API_KEY"Node.js
const res = await fetch("https://api-drugs.dataandapis.com/v1/drugs/random?amount=3", {
headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api-drugs.dataandapis.com/v1/drugs/random?amount=3",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Example response
Example response{
"ok": true,
"count": 3,
"results": [
{
"product_ndc": "58228-2010",
"brand_name": "Burn Ease",
"generic_name": "Burn Ease",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
"dosage_form": "GEL",
"routes": [
"TOPICAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "LIDOCAINE HYDROCHLORIDE",
"strength": "2 g/100g"
}
]
},
{
"product_ndc": "58228-2510",
"brand_name": "Alcohol Wipes",
"generic_name": "Alcohol Wipes",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
…
Show full response
Example response
{
"ok": true,
"count": 3,
"results": [
{
"product_ndc": "58228-2010",
"brand_name": "Burn Ease",
"generic_name": "Burn Ease",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
"dosage_form": "GEL",
"routes": [
"TOPICAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "LIDOCAINE HYDROCHLORIDE",
"strength": "2 g/100g"
}
]
},
{
"product_ndc": "58228-2510",
"brand_name": "Alcohol Wipes",
"generic_name": "Alcohol Wipes",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
…{
"ok": true,
"count": 3,
"results": [
{
"product_ndc": "58228-2010",
"brand_name": "Burn Ease",
"generic_name": "Burn Ease",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
"dosage_form": "GEL",
"routes": [
"TOPICAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "LIDOCAINE HYDROCHLORIDE",
"strength": "2 g/100g"
}
]
},
{
"product_ndc": "58228-2510",
"brand_name": "Alcohol Wipes",
"generic_name": "Alcohol Wipes",
"labeler": "ProStat First Aid LLC",
"product_type": "HUMAN OTC DRUG",
"dosage_form": "SWAB",
"routes": [
"TOPICAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "ISOPROPYL ALCOHOL",
"strength": ".7 mL/mL"
}
]
},
{
"product_ndc": "58228-6283",
"brand_name": "Burn Ease 3.5g",
"generic_name": "Burn Ease 3.5G",
"labeler": "Front Line Safety",
"product_type": "HUMAN OTC DRUG",
"dosage_form": "GEL",
"routes": [
"TOPICAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "LIDOCAINE HYDROCHLORIDE",
"strength": "2 g/100g"
}
]
}
]
}
