openfda-database

Query FDA regulatory records via the openFDA API with search, count, and download workflows.

2.7k|283|Updated May 13, 2026
One-click install
npx skills add https://github.com/google-deepmind/science-skills --skill openfda-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openfda-database
Source: https://github.com/google-deepmind/science-skills/tree/main/skills/openfda_database
Command: npx skills add https://github.com/google-deepmind/science-skills --skill openfda-database

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-dotenv, and includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps you quickly search and retrieve FDA regulatory and safety data from the openFDA API without manually crafting brittle requests or risking rate-limit failures.

Core Features & Use Cases

  • Unified openFDA querying: Search, count, and download data across drug, device, food, tobacco, cosmetic, animal/veterinary, other, and transparency endpoints.
  • Operational guardrails: Enforces output-to-file usage, includes API-key guidance to avoid exhausting daily limits, and supports MedDRA-aware reaction term workflows.
  • Practical scientific workflows: Supports adverse events, recalls, labeling lookups, approvals/clearances, shortages, NDC lookups, and other FDA safety/regulatory queries at scale.

Quick Start

Use the openfda-database skill to search for aspirin adverse event reports by running: uv run scripts/openfda_query.py search --category drug --endpoint event --search "patient.drug.medicinalproduct:aspirin" --limit 5 --output /tmp/aspirin_fda_events.json

Frequently Asked Questions about openfda-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query FDA adverse event data without hitting API rate limits?

To query FDA adverse event data without hitting rate limits, use openFDA API querying scripts that handle HTTP 429 responses and support setting an FDA_API_KEY via environment variables to raise daily request thresholds.

What is the best way to download paginated datasets from openFDA endpoints?

The best way to download paginated datasets from openFDA endpoints is by executing query scripts with the --output flag, which enforces output-to-file usage and validates category and endpoint compatibility for safe data retrieval.

Can I search for drug safety labeling and recalls across all openFDA categories?

Yes, you can search for drug safety labeling and recalls across all openFDA categories including drug, device, food, and tobacco, by specifying the category and endpoint parameters in your API querying script.

Do I need an API key to count exact-match field distributions from openFDA?

You do not strictly need an API key to count exact-match field distributions from openFDA, but providing one via .env or --api_key is recommended to avoid exhausting daily rate limits during large-scale scientific research.

Why does my openFDA query script fail when I omit the output file parameter?

Your openFDA query script fails when omitting the output file parameter because the skill enforces operational guardrails requiring the --output flag to ensure safe data download and prevent unintended terminal flooding.

Does openFDA API querying support MedDRA-aware reaction term workflows?

Yes, openFDA API querying supports MedDRA-aware reaction term workflows, allowing researchers to accurately search and retrieve adverse event reports using standardized medical terminology for scientific analysis.