GnistAI GnistAI
Log in

OpenFDA

FDA data — drug adverse events, product recalls, and medical device reports.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Science

Data source: openFDA

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/openfda/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-openfda": {
      "url": "https://context.gnist.ai/mcp/openfda/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/openfda/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_adverse_events", "arguments": {"drug_name": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/openfda/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/openfda/search_adverse_events?drug_name=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/openfda/search_adverse_events",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "drug_name": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc openfda

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

search_adverse_events
Search FDA adverse event reports (FAERS) for a drug or active ingredient.
ParameterTypeRequiredDescription
drug_namestringrequiredDrug name — brand (e.g. "Tylenol") or generic (e.g. "acetaminophen").
reactionanyoptionalOptional MedDRA reaction term to filter by (e.g. "headache", "nausea").
date_fromanyoptionalStart date filter in YYYYMMDD format (e.g. "20200101").
date_toanyoptionalEnd date filter in YYYYMMDD format (e.g. "20221231").
limitintegeroptionalNumber of reports to return (1–100, default 10). (default: 10)
get_drug_label
Fetch FDA-approved drug label for a medication.
ParameterTypeRequiredDescription
drug_namestringrequiredBrand name (e.g. "Advil") or generic name (e.g. "ibuprofen").
search_enforcement
Search FDA enforcement actions — recalls, market withdrawals, and safety alerts.
ParameterTypeRequiredDescription
product_typestringoptionalProduct category — "drug", "food", or "device" (default "drug"). (default: "drug")
date_fromanyoptionalStart date of recall initiation in YYYYMMDD format.
date_toanyoptionalEnd date of recall initiation in YYYYMMDD format.
classificationanyoptionalRecall classification — "Class I" (most serious), "Class II", or "Class III".
limitintegeroptionalNumber of actions to return (1–100, default 10). (default: 10)
device_adverse_events
Search FDA medical device adverse event reports (MAUDE database).
ParameterTypeRequiredDescription
device_namestringrequiredDevice brand name (e.g. "pacemaker", "insulin pump", "hip implant").
event_typeanyoptionalFilter by event type — "Malfunction", "Injury", "Death", or "No apparent adverse event".
date_fromanyoptionalStart date filter in YYYYMMDD format.
date_toanyoptionalEnd date filter in YYYYMMDD format.
limitintegeroptionalNumber of reports to return (1–100, default 10). (default: 10)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related