药品说明书
检索美国 FDA 药品说明书(openFDA SPL),返回商品名、通用名、生产商、给药途径,以及适应症、警告、黑框警告和用法用量章节(每节最多 4000 字符)。
| 接口 | POST /v1/drug-label-searches |
| 所需权限 | drug_label:search |
| MCP 工具 | drug_label |
| 计量单位 | labels |
计量单位出现在 execution.usage.units 中,用于对账和计费。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
invocation_id |
string | 是 | 调用方(市场)生成的调用 ID:同一个 ID 在同一操作上只执行一次,用同一 ID 重试会被拒绝而不会重复计费。1–128 个字符,可用 A-Z a-z 0-9 . _ : -。 |
provider |
string | 是 | 处理本次请求的数据源,按下方数据源表的覆盖范围选择。 可选值:openfda |
brand_name |
string | 否 | 按商品名匹配,1–200 个字符;brand_name、generic_name、query 三者必须且只能填一个。 |
generic_name |
string | 否 | 按通用名匹配,1–200 个字符;brand_name、generic_name、query 三者必须且只能填一个。 |
max_results |
integer | 否 | 返回的说明书数量,1–10,默认 5。 |
query |
string | 否 | 在整份说明书中检索的短语,1–200 个字符;brand_name、generic_name、query 三者必须且只能填一个。 |
| 数据源 | 区域 | 说明 | 限制 |
|---|---|---|---|
openfda |
US | openFDA 药品说明书 | max_results: 10, max_section_chars: 4000, timeout_seconds: 30 |
curl -sS https://services.zgi.im/v1/drug-label-searches \ -H "Authorization: Bearer $ZGI_SERVICES_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"invocation_id": "docs-1791778521-drug_label", "provider": "openfda", "generic_name": "ibuprofen", "max_results": 1}'POST /v1/drug-label-searches HTTP/1.1Host: services.zgi.imAuthorization: Bearer <token>Content-Type: application/json
{ "invocation_id": "docs-1791778521-drug_label", "provider": "openfda", "generic_name": "ibuprofen", "max_results": 1}通过 MCP 调用时,工具参数与 HTTP 请求体完全相同。
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "drug_label", "arguments": { "invocation_id": "docs-1791778521-drug_label", "provider": "openfda", "generic_name": "ibuprofen", "max_results": 1 } }}curl -sS https://services.zgi.im/v1/mcp \ -H "Authorization: Bearer $ZGI_SERVICES_TOKEN" \ -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \ -H 'MCP-Protocol-Version: 2025-11-25' \ -d @request.json以下为一次真实调用的返回,列表只保留前两项,长文本已截断。
{ "code": 0, "message": "success", "data": { "execution": { "id": "exe_01a12e52997e71c4aa1e0c4eadee492a", "invocation_id": "docs-1791778521-drug_label", "capability": "drug_label", "operation": "drug_label.search", "provider": "openfda", "outcome": "succeeded", "error_category": null, "error_code": null, "usage": { "provider_requests": 1, "units": [ { "name": "labels", "value": 1, "source": "measured" } ] }, "upstream_ref": null, "request_id": "req_ccd3722594e5677b3e5993ed", "started_at": "2026-10-12T04:15:27.614112683Z", "finished_at": "2026-10-12T04:15:27.962315852Z", "duration_ms": 348 }, "result": { "total_results": 1147, "labels": [ { "set_id": "00653b7c-7099-487e-9a01-e89781c21323", "brand_names": [ "Ibuprofen Dye Free" ], "generic_names": [ "IBUPROFEN" ], "manufacturer": "CVS Pharmacy", "product_type": "HUMAN OTC DRUG", "route": [ "ORAL" ], "indications": "Uses temporarily relieves minor aches and pains due to: headache toothache backache menstrual cramps the common cold muscular aches minor pain of arthritis t...", "warnings": "Warnings Allergy alert: Ibuprofen may cause a severe allergic reaction, especially in people allergic to aspirin. Symptoms may include: rash facial swelling ...", "boxed_warning": null, "dosage_and_administration": "Directions do not take more than directed the smallest effective dose should be used adults and children 12 years and over: take 1 tablet every 4 to 6 hours ...", "effective_date": "2026-04-29", "truncated_fields": [] } ], "disclaimer": "Drug label text from FDA SPL; not medical advice.", "source": { "name": "openFDA, U.S. Food and Drug Administration", "license": "CC0 1.0 (public domain)", "url": "https://open.fda.gov" } } }}