Random Drugs
GEThttps://api-drugs.dataandapis.com/v1/drugs/random
Random Drugs es un endpoint de Drugs API. 135.000 medicamentos de la FDA por NDC, unidos a 17.900 informes de retirada.
Envía tu clave en la cabecera X-Api-Key. Cada llamada cuesta 1 token; una clave gratuita incluye 500 tokens al mes.
Petición
Parámetros de consulta
| Parámetro | Ejemplo | |
|---|---|---|
| amount | 3 | Opcional |
Petición de ejemplo
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()Respuesta de ejemplo
Respuesta de ejemplo{
"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",
…
Ver la respuesta completa
Respuesta de ejemplo
{
"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"
}
]
}
]
}
