cURL
curl "https://api.ruseo.cn/api/bqb?type=1&words=%E5%A4%A7%E7%AC%91&page=1&limit=10"
随机或搜索表情包图片,支持随机结果和关键词搜索两种模式。
https://api.ruseo.cn/api/bqb
接口调用前需要确认的核心配置。
/api/bqbbqb必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
type |
是 | integer | 搜索类型:1=随机结果,2=指定关键词搜索 | 1 |
words |
否 | string | 搜索关键词,type=2时需要,长度不超过10个汉字 | 大笑 |
page |
否 | integer | 页码,type=2时有效,默认1 | 1 |
limit |
否 | integer | 结果数量,不超过20,默认1 | 10 |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/bqb?type=1&words=%E5%A4%A7%E7%AC%91&page=1&limit=10
curl "https://api.ruseo.cn/api/bqb?type=1&words=%E5%A4%A7%E7%AC%91&page=1&limit=10"
$url = 'https://api.ruseo.cn/api/bqb?type=1&words=%E5%A4%A7%E7%AC%91&page=1&limit=10';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/bqb?type=1&words=%E5%A4%A7%E7%AC%91&page=1&limit=10')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "bqb",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
code |
integer | 状态码,200成功,400错误 | 200 |
msg |
string | 信息提示 | success |
res |
array | 表情包图片地址结果集 | ["https://res.apihz.cn/img/bqb/xxx.jpg"] |
page |
string | 当前页码,type=2时返回 | 1 |
maxpage |
string | 最大页码,type=2时返回 | 8 |
count |
string | 结果总数量,type=2时返回 | 40 |
点击左侧“发送请求”查看结果...