fda-database
Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o fda-database.zip https://jpskill.com/download/18407.zip && unzip -o fda-database.zip && rm fda-database.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18407.zip -OutFile "$d\fda-database.zip"; Expand-Archive "$d\fda-database.zip" -DestinationPath $d -Force; ri "$d\fda-database.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
fda-database.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
fda-databaseフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 9
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
FDAデータベースへのアクセス
概要
openFDAを通じて、包括的なFDA規制データにアクセスします。openFDAは、公開データセットに対してオープンなAPIを提供するFDAのイニシアチブです。標準化されたインターフェースを備えたPythonを使用して、医薬品、医療機器、食品、動物/獣医製品、および物質に関する情報をクエリします。
主な機能:
- 医薬品、医療機器、食品、および獣医製品の有害事象をクエリします
- 製品のラベリング、承認、および規制当局への提出物にアクセスします
- リコールおよび執行措置を監視します
- National Drug Codes (NDC) および物質識別子 (UNII) を検索します
- 医療機器の分類と承認 (510k, PMA) を分析します
- 医薬品の供給不足と供給問題を追跡します
- 化学構造と物質の関係を調査します
このSkillを使用するタイミング
このSkillは、以下を扱う場合に使用する必要があります。
- 医薬品の研究: 安全性プロファイル、有害事象、ラベリング、承認、供給不足
- 医療機器の監視: 有害事象、リコール、510(k) 承認、PMA 承認
- 食品の安全性: リコール、アレルゲンの追跡、有害事象、栄養補助食品
- 獣医学: 動物用医薬品の有害事象(種別および品種別)
- 化学/物質データ: UNII 検索、CAS番号のマッピング、分子構造
- 規制分析: 承認経路、執行措置、コンプライアンスの追跡
- ファーマコビジランス: 市販後調査、安全性シグナルの検出
- 科学研究: 薬物相互作用、比較安全性、疫学研究
クイックスタート
1. 基本的な設定
from scripts.fda_query import FDAQuery
# 初期化 (APIキーはオプションですが推奨)
fda = FDAQuery(api_key="YOUR_API_KEY")
# 医薬品の有害事象をクエリ
events = fda.query_drug_events("aspirin", limit=100)
# 医薬品のラベリングを取得
label = fda.query_drug_label("Lipitor", brand=True)
# 医療機器のリコールを検索
recalls = fda.query("device", "enforcement",
search="classification:Class+I",
limit=50)
2. APIキーの設定
APIはキーなしでも動作しますが、登録するとより高いレート制限が提供されます。
- キーなし: 240 リクエスト/分、1,000/日
- キーあり: 240 リクエスト/分、120,000/日
登録はこちら: https://open.fda.gov/apis/authentication/
環境変数として設定:
export FDA_API_KEY="your_key_here"
3. 例の実行
# 包括的な例を実行
python scripts/fda_examples.py
# これは以下を示します:
# - 医薬品の安全性プロファイル
# - 医療機器の監視
# - 食品のリコール監視
# - 物質の検索
# - 医薬品の比較分析
# - 獣医用医薬品の分析
FDAデータベースのカテゴリ
医薬品
承認から市販後調査まで、医薬品のライフサイクル全体をカバーする6つの医薬品関連エンドポイントにアクセスします。
エンドポイント:
- 有害事象 - 副作用、エラー、および治療の失敗に関する報告
- 製品ラベリング - 処方情報、警告、適応
- NDCディレクトリ - National Drug Code 製品情報
- 執行報告書 - 医薬品のリコールと安全対策
- Drugs@FDA - 1939年以降の過去の承認データ
- 医薬品の供給不足 - 現在および解決済みの供給問題
一般的なユースケース:
# 安全性シグナルの検出
fda.count_by_field("drug", "event",
search="patient.drug.medicinalproduct:metformin",
field="patient.reaction.reactionmeddrapt")
# 処方情報を取得
label = fda.query_drug_label("Keytruda", brand=True)
# リコールを確認
recalls = fda.query_drug_recalls(drug_name="metformin")
# 供給不足を監視
shortages = fda.query("drug", "drugshortages",
search="status:Currently+in+Shortage")
参考資料: 詳細なドキュメントについては、references/drugs.md を参照してください
医療機器
医療機器の安全性、承認、および登録をカバーする9つの医療機器関連エンドポイントにアクセスします。
エンドポイント:
- 有害事象 - 医療機器の故障、負傷、死亡
- 510(k) 承認 - 市販前通知
- 分類 - 医療機器のカテゴリとリスククラス
- 執行報告書 - 医療機器のリコール
- リコール - 詳細なリコール情報
- PMA - クラスIII医療機器の市販前承認データ
- 登録とリスト - 製造施設のデータ
- UDI - Unique Device Identification データベース
- COVID-19 血清学 - 抗体検査の性能データ
一般的なユースケース:
# 医療機器の安全性を監視
events = fda.query_device_events("pacemaker", limit=100)
# 医療機器の分類を検索
classification = fda.query_device_classification("DQY")
# 510(k) 承認を見つける
clearances = fda.query_device_510k(applicant="Medtronic")
# UDIで検索
device_info = fda.query("device", "udi",
search="identifiers.id:00884838003019")
参考資料: 詳細なドキュメントについては、references/devices.md を参照してください
食品
安全性監視とリコールのための2つの食品関連エンドポイントにアクセスします。
エンドポイント:
- 有害事象 - 食品、栄養補助食品、および化粧品のイベント
- 執行報告書 - 食品のリコール
一般的なユースケース:
# アレルゲンのリコールを監視
recalls = fda.query_food_recalls(reason="undeclared peanut")
# 栄養補助食品のイベントを追跡
events = fda.query_food_events(
industry="Dietary Supplements")
# 汚染のリコールを見つける
listeria = fda.query_food_recalls(
reason="listeria",
classification="I")
参考資料: 詳細なドキュメントについては、references/foods.md を参照してください
動物と獣医
種固有の情報を含む獣医用医薬品の有害事象データにアクセスします。
エンドポイント:
- 有害事象 - 種、品種、および製品別の動物用医薬品の副作用
一般的なユースケース:
# 種固有のイベント
dog_events = fda.query_animal_events(
species="Dog",
drug_name="flea collar")
# 品種素因分析
breed_query = fda.query("animalandveterinary", "event",
search="reaction.veddra_term_name:*seizure*+AND+"
"animal.breed.breed_component:*Labrador*")
参考資料: `referen
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
FDA Database Access
Overview
Access comprehensive FDA regulatory data through openFDA, the FDA's initiative to provide open APIs for public datasets. Query information about drugs, medical devices, foods, animal/veterinary products, and substances using Python with standardized interfaces.
Key capabilities:
- Query adverse events for drugs, devices, foods, and veterinary products
- Access product labeling, approvals, and regulatory submissions
- Monitor recalls and enforcement actions
- Look up National Drug Codes (NDC) and substance identifiers (UNII)
- Analyze device classifications and clearances (510k, PMA)
- Track drug shortages and supply issues
- Research chemical structures and substance relationships
When to Use This Skill
This skill should be used when working with:
- Drug research: Safety profiles, adverse events, labeling, approvals, shortages
- Medical device surveillance: Adverse events, recalls, 510(k) clearances, PMA approvals
- Food safety: Recalls, allergen tracking, adverse events, dietary supplements
- Veterinary medicine: Animal drug adverse events by species and breed
- Chemical/substance data: UNII lookup, CAS number mapping, molecular structures
- Regulatory analysis: Approval pathways, enforcement actions, compliance tracking
- Pharmacovigilance: Post-market surveillance, safety signal detection
- Scientific research: Drug interactions, comparative safety, epidemiological studies
Quick Start
1. Basic Setup
from scripts.fda_query import FDAQuery
# Initialize (API key optional but recommended)
fda = FDAQuery(api_key="YOUR_API_KEY")
# Query drug adverse events
events = fda.query_drug_events("aspirin", limit=100)
# Get drug labeling
label = fda.query_drug_label("Lipitor", brand=True)
# Search device recalls
recalls = fda.query("device", "enforcement",
search="classification:Class+I",
limit=50)
2. API Key Setup
While the API works without a key, registering provides higher rate limits:
- Without key: 240 requests/min, 1,000/day
- With key: 240 requests/min, 120,000/day
Register at: https://open.fda.gov/apis/authentication/
Set as environment variable:
export FDA_API_KEY="your_key_here"
3. Running Examples
# Run comprehensive examples
python scripts/fda_examples.py
# This demonstrates:
# - Drug safety profiles
# - Device surveillance
# - Food recall monitoring
# - Substance lookup
# - Comparative drug analysis
# - Veterinary drug analysis
FDA Database Categories
Drugs
Access 6 drug-related endpoints covering the full drug lifecycle from approval to post-market surveillance.
Endpoints:
- Adverse Events - Reports of side effects, errors, and therapeutic failures
- Product Labeling - Prescribing information, warnings, indications
- NDC Directory - National Drug Code product information
- Enforcement Reports - Drug recalls and safety actions
- Drugs@FDA - Historical approval data since 1939
- Drug Shortages - Current and resolved supply issues
Common use cases:
# Safety signal detection
fda.count_by_field("drug", "event",
search="patient.drug.medicinalproduct:metformin",
field="patient.reaction.reactionmeddrapt")
# Get prescribing information
label = fda.query_drug_label("Keytruda", brand=True)
# Check for recalls
recalls = fda.query_drug_recalls(drug_name="metformin")
# Monitor shortages
shortages = fda.query("drug", "drugshortages",
search="status:Currently+in+Shortage")
Reference: See references/drugs.md for detailed documentation
Devices
Access 9 device-related endpoints covering medical device safety, approvals, and registrations.
Endpoints:
- Adverse Events - Device malfunctions, injuries, deaths
- 510(k) Clearances - Premarket notifications
- Classification - Device categories and risk classes
- Enforcement Reports - Device recalls
- Recalls - Detailed recall information
- PMA - Premarket approval data for Class III devices
- Registrations & Listings - Manufacturing facility data
- UDI - Unique Device Identification database
- COVID-19 Serology - Antibody test performance data
Common use cases:
# Monitor device safety
events = fda.query_device_events("pacemaker", limit=100)
# Look up device classification
classification = fda.query_device_classification("DQY")
# Find 510(k) clearances
clearances = fda.query_device_510k(applicant="Medtronic")
# Search by UDI
device_info = fda.query("device", "udi",
search="identifiers.id:00884838003019")
Reference: See references/devices.md for detailed documentation
Foods
Access 2 food-related endpoints for safety monitoring and recalls.
Endpoints:
- Adverse Events - Food, dietary supplement, and cosmetic events
- Enforcement Reports - Food product recalls
Common use cases:
# Monitor allergen recalls
recalls = fda.query_food_recalls(reason="undeclared peanut")
# Track dietary supplement events
events = fda.query_food_events(
industry="Dietary Supplements")
# Find contamination recalls
listeria = fda.query_food_recalls(
reason="listeria",
classification="I")
Reference: See references/foods.md for detailed documentation
Animal & Veterinary
Access veterinary drug adverse event data with species-specific information.
Endpoint:
- Adverse Events - Animal drug side effects by species, breed, and product
Common use cases:
# Species-specific events
dog_events = fda.query_animal_events(
species="Dog",
drug_name="flea collar")
# Breed predisposition analysis
breed_query = fda.query("animalandveterinary", "event",
search="reaction.veddra_term_name:*seizure*+AND+"
"animal.breed.breed_component:*Labrador*")
Reference: See references/animal_veterinary.md for detailed documentation
Substances & Other
Access molecular-level substance data with UNII codes, chemical structures, and relationships.
Endpoints:
- Substance Data - UNII, CAS, chemical structures, relationships
- NSDE - Historical substance data (legacy)
Common use cases:
# UNII to CAS mapping
substance = fda.query_substance_by_unii("R16CO5Y76E")
# Search by name
results = fda.query_substance_by_name("acetaminophen")
# Get chemical structure
structure = fda.query("other", "substance",
search="names.name:ibuprofen+AND+substanceClass:chemical")
Reference: See references/other.md for detailed documentation
Common Query Patterns
Pattern 1: Safety Profile Analysis
Create comprehensive safety profiles combining multiple data sources:
def drug_safety_profile(fda, drug_name):
"""Generate complete safety profile."""
# 1. Total adverse events
events = fda.query_drug_events(drug_name, limit=1)
total = events["meta"]["results"]["total"]
# 2. Most common reactions
reactions = fda.count_by_field(
"drug", "event",
search=f"patient.drug.medicinalproduct:*{drug_name}*",
field="patient.reaction.reactionmeddrapt",
exact=True
)
# 3. Serious events
serious = fda.query("drug", "event",
search=f"patient.drug.medicinalproduct:*{drug_name}*+AND+serious:1",
limit=1)
# 4. Recent recalls
recalls = fda.query_drug_recalls(drug_name=drug_name)
return {
"total_events": total,
"top_reactions": reactions["results"][:10],
"serious_events": serious["meta"]["results"]["total"],
"recalls": recalls["results"]
}
Pattern 2: Temporal Trend Analysis
Analyze trends over time using date ranges:
from datetime import datetime, timedelta
def get_monthly_trends(fda, drug_name, months=12):
"""Get monthly adverse event trends."""
trends = []
for i in range(months):
end = datetime.now() - timedelta(days=30*i)
start = end - timedelta(days=30)
date_range = f"[{start.strftime('%Y%m%d')}+TO+{end.strftime('%Y%m%d')}]"
search = f"patient.drug.medicinalproduct:*{drug_name}*+AND+receivedate:{date_range}"
result = fda.query("drug", "event", search=search, limit=1)
count = result["meta"]["results"]["total"] if "meta" in result else 0
trends.append({
"month": start.strftime("%Y-%m"),
"events": count
})
return trends
Pattern 3: Comparative Analysis
Compare multiple products side-by-side:
def compare_drugs(fda, drug_list):
"""Compare safety profiles of multiple drugs."""
comparison = {}
for drug in drug_list:
# Total events
events = fda.query_drug_events(drug, limit=1)
total = events["meta"]["results"]["total"] if "meta" in events else 0
# Serious events
serious = fda.query("drug", "event",
search=f"patient.drug.medicinalproduct:*{drug}*+AND+serious:1",
limit=1)
serious_count = serious["meta"]["results"]["total"] if "meta" in serious else 0
comparison[drug] = {
"total_events": total,
"serious_events": serious_count,
"serious_rate": (serious_count/total*100) if total > 0 else 0
}
return comparison
Pattern 4: Cross-Database Lookup
Link data across multiple endpoints:
def comprehensive_device_lookup(fda, device_name):
"""Look up device across all relevant databases."""
return {
"adverse_events": fda.query_device_events(device_name, limit=10),
"510k_clearances": fda.query_device_510k(device_name=device_name),
"recalls": fda.query("device", "enforcement",
search=f"product_description:*{device_name}*"),
"udi_info": fda.query("device", "udi",
search=f"brand_name:*{device_name}*")
}
Working with Results
Response Structure
All API responses follow this structure:
{
"meta": {
"disclaimer": "...",
"results": {
"skip": 0,
"limit": 100,
"total": 15234
}
},
"results": [
# Array of result objects
]
}
Error Handling
Always handle potential errors:
result = fda.query_drug_events("aspirin", limit=10)
if "error" in result:
print(f"Error: {result['error']}")
elif "results" not in result or len(result["results"]) == 0:
print("No results found")
else:
# Process results
for event in result["results"]:
# Handle event data
pass
Pagination
For large result sets, use pagination:
# Automatic pagination
all_results = fda.query_all(
"drug", "event",
search="patient.drug.medicinalproduct:aspirin",
max_results=5000
)
# Manual pagination
for skip in range(0, 1000, 100):
batch = fda.query("drug", "event",
search="...",
limit=100,
skip=skip)
# Process batch
Best Practices
1. Use Specific Searches
DO:
# Specific field search
search="patient.drug.medicinalproduct:aspirin"
DON'T:
# Overly broad wildcard
search="*aspirin*"
2. Implement Rate Limiting
The FDAQuery class handles rate limiting automatically, but be aware of limits:
- 240 requests per minute
- 120,000 requests per day (with API key)
3. Cache Frequently Accessed Data
The FDAQuery class includes built-in caching (enabled by default):
# Caching is automatic
fda = FDAQuery(api_key=api_key, use_cache=True, cache_ttl=3600)
4. Use Exact Matching for Counting
When counting/aggregating, use .exact suffix:
# Count exact phrases
fda.count_by_field("drug", "event",
search="...",
field="patient.reaction.reactionmeddrapt",
exact=True) # Adds .exact automatically
5. Validate Input Data
Clean and validate search terms:
def clean_drug_name(name):
"""Clean drug name for query."""
return name.strip().replace('"', '\\"')
drug_name = clean_drug_name(user_input)
API Reference
For detailed information about:
- Authentication and rate limits → See
references/api_basics.md - Drug databases → See
references/drugs.md - Device databases → See
references/devices.md - Food databases → See
references/foods.md - Animal/veterinary databases → See
references/animal_veterinary.md - Substance databases → See
references/other.md
Scripts
scripts/fda_query.py
Main query module with FDAQuery class providing:
- Unified interface to all FDA endpoints
- Automatic rate limiting and caching
- Error handling and retry logic
- Common query patterns
scripts/fda_examples.py
Comprehensive examples demonstrating:
- Drug safety profile analysis
- Device surveillance monitoring
- Food recall tracking
- Substance lookup
- Comparative drug analysis
- Veterinary drug analysis
Run examples:
python scripts/fda_examples.py
Additional Resources
- openFDA Homepage: https://open.fda.gov/
- API Documentation: https://open.fda.gov/apis/
- Interactive API Explorer: https://open.fda.gov/apis/try-the-api/
- GitHub Repository: https://github.com/FDA/openfda
- Terms of Service: https://open.fda.gov/terms/
Support and Troubleshooting
Common Issues
Issue: Rate limit exceeded
- Solution: Use API key, implement delays, or reduce request frequency
Issue: No results found
- Solution: Try broader search terms, check spelling, use wildcards
Issue: Invalid query syntax
- Solution: Review query syntax in
references/api_basics.md
Issue: Missing fields in results
- Solution: Not all records contain all fields; always check field existence
Getting Help
- GitHub Issues: https://github.com/FDA/openfda/issues
- Email: open-fda@fda.hhs.gov
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (14,366 bytes)
- 📎 references/animal_veterinary.md (11,799 bytes)
- 📎 references/api_basics.md (15,948 bytes)
- 📎 references/devices.md (18,934 bytes)
- 📎 references/drugs.md (13,903 bytes)
- 📎 references/foods.md (10,789 bytes)
- 📎 references/other.md (13,735 bytes)
- 📎 scripts/fda_examples.py (10,785 bytes)
- 📎 scripts/fda_query.py (15,411 bytes)