Skip to content
Back to skills

Openfda

ASecurity

Query FDA drug labeling data via openFDA. Use whenever the user asks about drug prescribing information — indications, warnings, dosage, adverse reactions, contraindications, or administration routes. Supports single or batch lookup by brand/generic name or by indication/condition.

  • 230 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 6, 2026
ai-agentsgoreactapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add BioTender-max/awesome-bio-agent-skills --skill openfda --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openfda?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openfda
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/biotender-max-openfda/badge)](https://www.skillsdirectory.com/skills/biotender-max-openfda)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openfda-human-drug
description: >
  Query FDA drug labeling data via openFDA. Use whenever the user asks about
  drug prescribing information — indications, warnings, dosage, adverse reactions,
  contraindications, or administration routes. Supports single or batch lookup
  by brand/generic name or by indication/condition.
---

# openFDA Human Drug Skill

Query structured SPL (Structured Product Labeling) data from the FDA. No API key needed (≤1 000 req/day).

## Input → Detection

| Input Example | Routed To |
|---|---|
| `"ASPIRIN"` or `["METFORMIN","LISINOPRIL"]` | `search_drug` — brand/generic name lookup |
| `"hypertension"` or `["diabetes","migraine"]` | `search_by_indication` — indication text search |
| *(no input)* | `count_by_route` — top administration routes |

All search functions accept **a single string or a list of strings**.

## API

| Function | Input | Returns |
|---|---|---|
| `search_drug(query, limit)` | str \| list[str], int | `{term: [label_dicts]}` |
| `search_by_indication(query, limit)` | str \| list[str], int | `{condition: [label_dicts]}` |
| `count_by_route(top_n)` | int | `[{term, count}]` |
| `summarize(results)` | dict from above | compact multi-line text |

Each `label_dict` contains: `brand_name`, `generic_name`, `manufacturer`, `route`, `substance_name`, `product_type`, `indications`, `contraindications`, `warnings`, `dosage`, `adverse_reactions`.

## Usage

See `if __name__ == "__main__"` block in `05_openFDA_Human_Drug.py` for runnable examples covering: single drug, batch drugs, single indication, batch indications, route counts, and raw JSON output.

## Notes

- Long text fields (`indications`, `warnings`, etc.) are truncated to keep payloads concise.
- On HTTP/query errors the result dict contains an `error` key for that term.
- Endpoint: `https://api.fda.gov/drug/label.json`

Files in this skill

  • README.md972 B
  • SKILL.md1.8 KB
  • __init__.py134 B
  • example.py5.1 KB
  • openfda_skill.py8.4 KB
  • retrieve.py694 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.