cURL
curl "https://api.ruseo.cn/api/remedy_search?key=YOUR_API_KEY&words=%E6%A2%A6%E9%81%97&page=1"
按症状关键词搜索民间偏方,不传关键词则随机返回偏方
https://api.ruseo.cn/api/remedy_search
接口调用前需要确认的核心配置。
/api/remedy_searchremedy_search必填参数必须传入,示例值可直接用于联调。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
是 | string | 需要审核通过的 ApiKey。请注册账号获取API Key。 | YOUR_API_KEY |
words |
否 | string | 症状关键词,不传则随机返回1条 | 梦遗 |
page |
否 | integer | 查询页码,默认第1页,最大100页,每页最多3条 | 1 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/remedy_search?key=YOUR_API_KEY&words=%E6%A2%A6%E9%81%97&page=1
curl "https://api.ruseo.cn/api/remedy_search?key=YOUR_API_KEY&words=%E6%A2%A6%E9%81%97&page=1"
$url = 'https://api.ruseo.cn/api/remedy_search?key=YOUR_API_KEY&words=%E6%A2%A6%E9%81%97&page=1';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/remedy_search?key=YOUR_API_KEY&words=%E6%A2%A6%E9%81%97&page=1')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "remedy_search",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
code |
integer | 状态码,200表示成功,400表示失败 | 200 |
msg |
string | 返回提示信息 | success |
page |
integer | 当前页码 | 1 |
datas |
array | 偏方数据集 | [{...}] |
datas.title |
string | 偏方标题 | 止泻固精话芡实 |
datas.content |
string | 偏方详细内容 | 民间许多老人... |
点击左侧“发送请求”查看结果...