medical-data-api
安装方式
先用 Prompt 核对来源,也可切换到安装命令或下载可用的安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "medical-data-api":https://skillpi.com/zh/skills/deepskill-83760d693e69c103325c6a368ca028f563b7e52e9e11610fa632d03b3e5384f2。安装前核对上游来源和版本:https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/blob/bfa0a6e5a843babbf45a1ef1663fd5dc4f07c0ba/skills/43-wentorai-research-plugins/skills/domains/biomedical/medical-data-api/SKILL.md。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
此命令从 GitHub 来源仓库获取指定技能。运行前请先查看源文件。
npx skills add https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/tree/bfa0a6e5a843babbf45a1ef1663fd5dc4f07c0ba/skills/43-wentorai-research-plugins/skills/domains/biomedical/medical-data-api --skill medical-data-api来源与配置
查看 GitHub 源码brycewang-stanford/Auto-Empirical-Research-Skills固定提交 bfa0a6e5a843babbf45a1ef1663fd5dc4f07c0ba
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
本条目面向资料查询与搜索场景,提供“medical-data-api”技能的目录入口。公开标签:learning、FDA、WHO、药物安全。请通过固定上游版本核对实际功能、依赖与权限;此页为 Skillπ 独立编写的用途介绍和原站链接,不代表运行安全保证。原文与附件依各自许可开放。
文件浏览
---
name: medical-data-api
description: "Access FDA drug data and WHO global health statistics for research"
metadata:
openclaw:
emoji: "💊"
category: "domains"
subcategory: "biomedical"
keywords: ["FDA", "drug safety", "WHO", "global health", "adverse events", "medical data", "pharmacovigilance"]
source: "https://open.fda.gov"
---
# Medical Data API Guide (openFDA + WHO GHO)
## Overview
This skill covers two major open medical data APIs for academic research:
**openFDA** is the U.S. Food and Drug Administration's public API providing access to drug labeling (SPL), adverse event reports (FAERS), recalls, and NDC directory. The FAERS dataset contains over 722,000 reports for common drugs like aspirin, making it a primary pharmacovigilance resource.
**WHO Global Health Observatory (GHO)** is the WHO's OData v4 API serving over 2,000 health indicators across 194 member states -- life expectancy, mortality, disease burden, health system coverage, risk factors, and SDG targets. Returns structured JSON with numeric values, confidence intervals, and dimensional breakdowns by country, sex, and year.
Both APIs are free, require no authentication, and return JSON.
## Authentication
**openFDA**: No authentication required. An optional API key (free, via https://open.fda.gov/apis/authentication/) increases rate limits from 240/min to 120,000/day. Register at https://open.fda.gov/apis/ to obtain a key, then append `&api_key=YOUR_KEY` to requests.
**WHO GHO**: No authentication required. No API key needed. All endpoints are publicly accessible with no registration.
## Core Endpoints
### openFDA: Drug Labels
Search FDA-approved drug labeling data (Structured Product Labeling). Returns boxed warnings, indications, dosage, contraindications, and adverse reactions text.
- **URL**: `GET https://api.fda.gov/drug/label.json`
- **Parameters**:
| Parameter | Type | Required | Description |
|-----------|--------|----------|-----------------------------------------------------|
| search | string | No | Search query using openFDA query syntax |
| limit | int | No | Number of results (default 1, max 1000) |
| skip | int | No | Offset for pagination |
| count | string | No | Count unique values of a field |
- **Example**:
```bash
curl "https://api.fda.gov/drug/label.json?search=aspirin&limit=1"
```
- **Response**: Returns `meta.results.total` (26,564 for "aspirin") and `results` array. Each result contains `boxed_warning`, `indications_and_usage`, `dosage_and_administration`, `warnings`, `adverse_reactions`, `drug_interactions`, and `openfda` cross-references (brand/generic names, manufacturer, NDC, pharmacologic class).
### openFDA: Adverse Events (FAERS)
Search the FDA Adverse Event Reporting System. Each record describes a safety report including patient demographics, suspect drugs, reported reactions, and outcomes.
- **URL**: `GET https://api.fda.gov/drug/event.json`
- **Parameters**:
| Parameter | Type | Required | Description |
|-----------|--------|----------|-----------------------------------------------------|
| search | string | No | Query (e.g., `patient.drug.openfda.brand_name:"aspirin"`) |
| limit | int | No | Number of results (default 1, max 1000) |
| skip | int | No | Offset for pagination (max skip+limit = 26,000) |
| count | string | No | Count field values (e.g., `patient.reaction.reactionmeddrapt.exact`) |
- **Example**:
```bash
curl 'https://api.fda.gov/drug/event.json?search=patient.drug.openfda.brand_name:"aspirin"&limit=1'
```
- **Response**: Returns `meta.results.total` (722,607 for aspirin). Each result: `safetyreportid`, `serious` (1=yes, 2=no), `primarysourcecountry`, `receivedate`, nested `patient` with `patientsex`, `reaction` array (MedDRA terms + `reactionoutcome`), and `drug` array with `drugcharacterization` (1=suspect, 2=concomitant, 3=interacting), `medicinalproduct`, `openfda` cross-references.
### WHO GHO: Health Indicator Data
Retrieve data points for a specific health indicator with country, year, and sex dimensions.
- **URL**: `GET https://ghoapi.azureedge.net/api/{IndicatorCode}`
- **Parameters** (OData v4 query options):
| Parameter | Type | Required | Description |
|-----------|--------|----------|-------------------------------------------------------|
| $top | int | No | Limit number of records returned |
| $skip | int | No | Skip records for pagination |
| $filter | string | No | OData filter (e.g., `SpatialDim eq 'USA' and TimeDim eq 2020`) |
| $select | string | No | Select specific fields |
| $orderby | string | No | Sort results |
- **Example**:
```bash
# Life expectancy at birth (WHOSIS_000001)
curl "https://ghoapi.azureedge.net/api/WHOSIS_000001?\$top=2"
```
- **Response**: OData JSON with `value` array. Each record: `SpatialDim` (ISO country, e.g., "BTN"), `ParentLocation` (WHO region), `TimeDim` (year), `Dim1` (sex: "SEX_BTSX"/"SEX_MLE"/"SEX_FMLE"), `Value` ("67.8 [67.1-68.6]"), `NumericValue` (67.845665), `Low`/`High` confidence bounds.
### WHO GHO: Indicator Directory
List available health indicators with their codes and names.
- **URL**: `GET https://ghoapi.azureedge.net/api/Indicator`
- **Example**:
```bash
curl "https://ghoapi.azureedge.net/api/Indicator?\$top=5"
```
- **Response**: Array of entries with `IndicatorCode` (e.g., "Adult_curr_e-cig"), `IndicatorName` (e.g., "Prevalence of current e-cigarette use among adults (%)"), `Language` ("EN"). Over 2,000 indicators spanning mortality, morbidity, health systems, and risk factors.
## Rate Limits
**openFDA**:
- Without API key: 240 requests per minute (burst), 1,000 requests per day
- With free API key: 240 requests per minute, 120,000 requests per day
- Pagination ceiling: `skip` + `limit` cannot exceed 26,000 (use `search` + `sort` for deeper access)
**WHO GHO**:
- No documented rate limits; the service runs on Azure CDN (azureedge.net)
- Recommended: keep requests under 10/second for courtesy
- For bulk downloads, use the GHO data portal CSV exports at https://www.who.int/data/gho
## Academic Use Cases
### Pharmacovigilance: Adverse Event Signal Detection
Count reactions by MedDRA term to identify safety signals:
```python
import requests
resp = requests.get("https://api.fda.gov/drug/event.json", params={
"search": 'patient.drug.openfda.brand_name:"aspirin"',
"count": "patient.reaction.reactionmeddrapt.exact",
"limit": 10
})
for r in resp.json()["results"]:
print(f" {r['term']}: {r['count']} reports")
```
### Epidemiology: Cross-National Health Comparisons
Compare health indicators across countries and time periods:
```python
import requests
resp = requests.get("https://ghoapi.azureedge.net/api/WHOSIS_000001", params={
"$filter": "SpatialDim eq 'JPN' and Dim1 eq 'SEX_BTSX'",
"$orderby": "TimeDim desc",
"$top": 10
})
for row in resp.json()["value"]:
print(f" Japan {row['TimeDim']}: {row['Value']}")
```
### Public Health: Drug Label Comparison
Compare safety language across drug labels for regulatory research:
```python
import requests
for drug in ["ibuprofen", "naproxen", "celecoxib"]:
resp = requests.get("https://api.fda.gov/drug/label.json",
params={"search": f'openfda.generic_name:"{drug}"', "limit": 1})
results = resp.json().get("results", [])
if results:
warning = results[0].get("boxed_warning", ["None"])[0][:200]
print(f"{drug.upper()}: {warning}...\n")
```
## Key Indicator Codes (WHO GHO)
| Code | Indicator |
|------|-----------|
| WHOSIS_000001 | Life expectancy at birth |
| NCDMORT3070 | NCD mortality (30-70 years) |
| MDG_0000000001 | Under-five mortality rate |
| WHS4_100 | Physicians per 10,000 population |
| NCD_BMI_30A | Prevalence of obesity (BMI >= 30) |
| SA_0000001688 | Alcohol per capita consumption |
| TOBACCO_0000000262 | Tobacco smoking prevalence |
## References
- openFDA documentation: https://open.fda.gov/apis/
- openFDA API key registration: https://open.fda.gov/apis/authentication/
- openFDA query syntax: https://open.fda.gov/apis/query-syntax/
- openFDA GitHub: https://github.com/FDA/openfda
- WHO GHO API documentation: https://www.who.int/data/gho/info/gho-odata-api
- WHO GHO OData endpoint: https://ghoapi.azureedge.net/api/
- WHO GHO indicator list: https://ghoapi.azureedge.net/api/Indicator
- WHO Global Health Observatory portal: https://www.who.int/data/gho
版本历史
-
v2026.07
GitHub ↗
原版更新说明
## Highlights - **First tagged release.** Every gate is green: `make check` (validate + 183 unit tests + eval-harness + numeric benchmarks), validate-catalog, quality-evals, and OpenSSF Scorecard on `main`. - **Rigor double loop at 13 method families.** Each family closes taxonomy tag → eval scenario (does the agent avoid the method's known traps?) → deterministic numeric benchmark (does it recover the true effect?). New this cycle: heterogeneous treatment effects (CATE) and quantile treatment effects (QTE). - **Paper-WorkFlow flagship at 29/29 executable rigor gates**, now merged to its `main` with a drift-gated README badge — the credibility artifact is checked by CI, so it can never silently go stale ([RIGOR.md](https://github.com/brycewang-stanford/Paper-WorkFlow/blob/main/RIGOR.md)). - **1,150 vendored skills / 69 collections**, all license-audited, security-scanned, tracked in a machine-readable catalog with CI-enforced freshness, and importable as a single whole-repo router skill. - **Hardened weekly upstream syncs**: synced trees must pass the full gate before merge; this cycle both sync PRs were verified, patched (StatsPAI's SkillOpt execution-gate card restored), and merged. - **First-party plugin marketplace** (Python / R / Stata empirical-analysis plugins + guide) shipped in the previous cycle, now under a tagged version. ## Known Follow-Ups - Ecosystem benchmark comparison (AERS vs econometrics agents on the shared benchmark suite) — [PLAN-2026-07 week 3](https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/blob/main/docs/PLAN-2026-07.md). - Decomposition (Oaxaca–Blinder) and shift-share (Bartik) method families (weeks 3–4). - GitHub Pages catalog site, README demo screenshots, five-language README consistency script (week 4). ## Catalog - Top-level collections: **69** - `SKILL.md` files: **1150** - Cataloged agent tools: **335** ([`tools/CATALOG.md`](../tools/CATALOG.md)) ## Methodological rigor - Method families in the coverage map: **13** ([`RIGOR_COVERAGE.md`](RIGOR_COVERAGE.md)) - Eval scenarios: **26** (138 rubric items, 122 auto-checkable) ([`../eval-harness/`](../eval-harness/README.md)) - Benchmark tasks: **13** (70 gold checks, 58 required) ([`../benchmark/`](../benchmark/README.md)) ### Method families (skills tagged) - `iv`: 27 - `rdd`: 25 - `panel-fe`: 19 - `staggered-did`: 17 - `bayesian`: 13 - `did`: 10 - `event-study`: 10 - `matching`: 10 - `synthetic-control`: 10 - `cate`: 8 - `dml`: 8 - `survival`: 3 - `quantile`: 2 ### Eval scenarios by category - `causal-identification`: 14 - `citation-hygiene`: 1 - `reproducibility`: 2 - `research-integrity`: 1 - `runtime-safety`: 1 - `statistical-validity`: 2 - `writing-compliance`: 3 - `writing-style`: 2 ## License buckets - AGPL-3.0: 1 - Apache-2.0: 1 - CC-BY-NC-4.0 (non-commercial): 1 - CC-BY-SA-4.0: 1 - CC-BY-SA-4.0 (repository default): 4 - GPL-3.0: 1 - MIT: 35 - MIT Non-Commercial: 1 - Mixed (per-skill; see folder): 2 - UNKNOWN - check upstream: 22 ## Quality gates - `make check` — catalog/provenance/audit/eval freshness, repo hygiene, Paper-WorkFlow gates, stdlib unit tests, eval-harness lint + graded smoke, and the strict numeric benchmark (reference-gold drift fails the build). - External links and OpenSSF Scorecard run on their scheduled workflows.
当前收录版本
0.0.1
质量评测
满分 100。前四项来自 DeepSkill 收录的质量报告。
评分依据
提供FDA和WHO权威医疗数据接口访问能力
评分依据
触发词精准覆盖FDA、WHO、drug safety等核心关键词
评分依据
文档结构完整,包含认证、端点、示例等必要章节
评分依据
API来源明确为官方openFDA和WHO GHO服务
计算方式
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 27, 29, 117, 118, 191 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- api.fda.gov
- ghoapi.azureedge.net
- github.com
- open.fda.gov
- www.who.int
安全评级与访问范围
risk · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。