Search Drugs
GEThttps://api-drugs.dataandapis.com/v1/drugs
Search 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 | |
|---|---|---|
| brand | Lipitor | Opcional |
| class | Opcional | |
| form | Opcional | |
| generic | atorvastatin | Opcional |
| ingredient | atorvastatin | Opcional |
| labeler | Opcional | |
| limit | 20 | Opcional |
| page | 1 | Opcional |
| q | Opcional | |
| route | ORAL | Opcional |
| schedule | Opcional | |
| type | PRESCRIPTION | Opcional |
Petición de ejemplo
curl
curl "https://api-drugs.dataandapis.com/v1/drugs?brand=Lipitor&generic=atorvastatin&ingredient=atorvastatin&limit=20&page=1&route=ORAL&type=PRESCRIPTION" \
-H "X-Api-Key: YOUR_API_KEY"Node.js
const res = await fetch("https://api-drugs.dataandapis.com/v1/drugs?brand=Lipitor&generic=atorvastatin&ingredient=atorvastatin&limit=20&page=1&route=ORAL&type=PRESCRIPTION", {
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?brand=Lipitor&generic=atorvastatin&ingredient=atorvastatin&limit=20&page=1&route=ORAL&type=PRESCRIPTION",
headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()Respuesta de ejemplo
Respuesta de ejemplo{
"ok": true,
"total": 4,
"page": 1,
"limit": 20,
"count": 2,
"results": [
{
"product_ndc": "58151-155",
"brand_name": "Lipitor",
"generic_name": "atorvastatin calcium",
"labeler": "Viatris Specialty LLC",
"product_type": "HUMAN PRESCRIPTION DRUG",
"dosage_form": "TABLET, FILM COATED",
"routes": [
"ORAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "ATORVASTATIN CALCIUM TRIHYDRATE",
"strength": "10 mg/1"
}
]
},
{
"product_ndc": "58151-156",
"brand_name": "Lipitor",
…
Ver la respuesta completa
Respuesta de ejemplo
{
"ok": true,
"total": 4,
"page": 1,
"limit": 20,
"count": 2,
"results": [
{
"product_ndc": "58151-155",
"brand_name": "Lipitor",
"generic_name": "atorvastatin calcium",
"labeler": "Viatris Specialty LLC",
"product_type": "HUMAN PRESCRIPTION DRUG",
"dosage_form": "TABLET, FILM COATED",
"routes": [
"ORAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "ATORVASTATIN CALCIUM TRIHYDRATE",
"strength": "10 mg/1"
}
]
},
{
"product_ndc": "58151-156",
"brand_name": "Lipitor",
…{
"ok": true,
"total": 4,
"page": 1,
"limit": 20,
"count": 2,
"results": [
{
"product_ndc": "58151-155",
"brand_name": "Lipitor",
"generic_name": "atorvastatin calcium",
"labeler": "Viatris Specialty LLC",
"product_type": "HUMAN PRESCRIPTION DRUG",
"dosage_form": "TABLET, FILM COATED",
"routes": [
"ORAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "ATORVASTATIN CALCIUM TRIHYDRATE",
"strength": "10 mg/1"
}
]
},
{
"product_ndc": "58151-156",
"brand_name": "Lipitor",
"generic_name": "atorvastatin calcium",
"labeler": "Viatris Specialty LLC",
"product_type": "HUMAN PRESCRIPTION DRUG",
"dosage_form": "TABLET, FILM COATED",
"routes": [
"ORAL"
],
"dea_schedule": null,
"active_ingredients": [
{
"name": "ATORVASTATIN CALCIUM TRIHYDRATE",
"strength": "20 mg/1"
}
]
}
]
}
