多功能表情包检索API,支持静态图片与GIF格式精准调取,彻底解决斗图缺图难题,提升互动趣味性。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| msg | string | 是 | 需要搜索的关键词,如:鄙视 | 鄙视 |
| page | integer | 否 | 页数,默认为当前第1页内容 | 1 |
| num | integer | 否 | 每页数量,默认每页为40条 | 40 |
| n | integer | 否 | 无此值返回多列表,有则返回指定当前页的n条图 | 1 |
[
{
"name": "msg",
"type": "string",
"required": true,
"description": "需要搜索的关键词,如:鄙视",
"example": "鄙视"
},
{
"name": "page",
"type": "integer",
"required": false,
"description": "页数,默认为当前第1页内容",
"example": "1"
},
{
"name": "num",
"type": "integer",
"required": false,
"description": "每页数量,默认每页为40条",
"example": "40"
},
{
"name": "n",
"type": "integer",
"required": false,
"description": "无此值返回多列表,有则返回指定当前页的n条图",
"example": "1"
}
]
{"openapi":"3.1.1","info":{"title":"聊天图片表情搜索","description":"多功能表情包检索API,支持静态图片与GIF格式精准调取,彻底解决斗图缺图难题,提升互动趣味性。","version":"1.0.0"},"paths":{"/v1/meme.php":{"get":{"summary":"聊天图片表情搜索","description":"多功能表情包检索API,支持静态图片与GIF格式精准调取,彻底解决斗图缺图难题,提升互动趣味性。","parameters":[{"name":"msg","in":"query","required":true,"schema":{"type":"string","example":"鄙视"},"description":"需要搜索的关键词,如:鄙视"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"页数,默认为当前第1页内容"},{"name":"num","in":"query","required":false,"schema":{"type":"integer","example":40},"description":"每页数量,默认每页为40条"},{"name":"n","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"无此值返回多列表,有则返回指定当前页的n条图"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"聊天图片表情搜索","description":"多功能表情包检索API,支持静态图片与GIF格式精准调取,彻底解决斗图缺图难题,提升互动趣味性。","parameters":[{"name":"msg","in":"query","required":true,"schema":{"type":"string","example":"鄙视"},"description":"需要搜索的关键词,如:鄙视"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"页数,默认为当前第1页内容"},{"name":"num","in":"query","required":false,"schema":{"type":"integer","example":40},"description":"每页数量,默认每页为40条"},{"name":"n","in":"query","required":false,"schema":{"type":"integer","example":1},"description":"无此值返回多列表,有则返回指定当前页的n条图"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"servers":[{"url":"http://xiaoapi.cn","description":"当前访问入口(http)"}]}
{
"code": 200,
"page": 1,
"num": 40,
"data": [
{
"img_url": "https://biaoqing.gtimg.com/back/yuntu/o/14c78e60e4cc43f25e955fd87f97b2ea.JPG",
"img_size": 27339,
"img_height": 220,
"img_width": 220
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/7e50b06be5583201313c3abba309547b.jpg",
"img_size": 4353,
"img_height": 198,
"img_width": 170
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/3e57e4ba493ce3c642afeef36f4bed32.png",
"img_size": 49813,
"img_height": 240,
"img_width": 237
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/d2eda019f93fa96ad795c82c2f32566b.jpg",
"img_size": 6923,
"img_height": 240,
"img_width": 212
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/b253d94a45c6aa75727dbc0f426df41a.jpg",
"img_size": 10476,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/011228c8e664ceb0dd75a60dcdd6bdc7.jpg",
"img_size": 23603,
"img_height": 240,
"img_width": 224
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/cfcb12c02c99188b691aebadfbffc4f7.jpg",
"img_size": 6905,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/277b34b1d5ee13d5fc71701c4af644b2.jpg",
"img_size": 10834,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/bf61d83348b5655d8cb5cd7779c5e65f.jpg",
"img_size": 9543,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/fe0c69dc1e6c7da647791ade0e30c1d1.jpg",
"img_size": 9760,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/3784d2599e83dbb7cdf5dfc67635c9a1.jpg",
"img_size": 5686,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/3b99d811d97820485e085eddb7a42faa.jpg",
"img_size": 9443,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/11223f844b1103d9f5b7112e5a6e14d0.jpg",
"img_size": 9101,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/9002da84160625e7a1a278a6c8381f5e.jpg",
"img_size": 14686,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/a31ab4f316b60986936dede0457a0fb5.gif",
"img_size": 5213,
"img_height": 136,
"img_width": 136
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/bc12aa2266199dd6c14d73122ae45b4e.png",
"img_size": 29044,
"img_height": 170,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/5cc6329c73cbc04a1d37f2ba722beb3f.jpg",
"img_size": 8531,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/148948294707020_240.jpg",
"img_size": 8057,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/53fc03ef5056d971728839f2dd72ef83.png",
"img_size": 27919,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/8bc7612c539ea6baaab71503ee498994.jpg",
"img_size": 10726,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/ed5ebd085d4011a67c1d7c1efa501e3a.jpg",
"img_size": 10894,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/e7b3226ecac5078acd764248e21973aa.jpg",
"img_size": 10596,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/df9aab04e054d53986e9d651076dbf25.jpg",
"img_size": 11053,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/62ba9bcf98546d4aefa841ed5eccb0b5.jpg",
"img_size": 10082,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/b6e5071ecd0e8196506e8de55e5c8a20.jpg",
"img_size": 10534,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/91d269d77c1134c8a602abfd8394a536.jpg",
"img_size": 11443,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/8d0786890ee44de3449e74b7f9cf245d.jpg",
"img_size": 10368,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/c6f1d3bd55a0c01b545ea696a2e88425.jpg",
"img_size": 10731,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/6ab3b40f3833dd2a03b9fc632ed04863.jpg",
"img_size": 10607,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/5d5681016cd55586928d17e9b0aa32c1.jpg",
"img_size": 10639,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/e270a699070a93ca69750a30a60ad5c9.jpg",
"img_size": 10765,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/b8b41d925ee2f74fdd4c78a96a5c23cd.png",
"img_size": 29808,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/1ddf3ccf8c0004739c51490940bd69dc.png",
"img_size": 27705,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/632431177090c414b09b0350aa951efb.gif",
"img_size": 78577,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/ffb244a511c4373ba3ab3756ec49cac0.jpg",
"img_size": 9606,
"img_height": 180,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/e0906dc80276bde0eaf5bb020f389df9.gif",
"img_size": 28811,
"img_height": 190,
"img_width": 190
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/593f5640f3f0bafb6c93c94417d7e094.jpg",
"img_size": 11200,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/d6cd455f47dbef20e55ac8f5e95fe7b8.jpg",
"img_size": 10020,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/d6c82a44ef3e176a15a1bce4632a5dc0.jpg",
"img_size": 10750,
"img_height": 240,
"img_width": 240
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/2e6175741e8177e11977581810f6669f.jpg",
"img_size": 10788,
"img_height": 240,
"img_width": 240
}
],
"tips": "慕名API:http://xiaoapi.cn"
}
多功能表情包检索接口,支持通过关键词快速搜索并获取静态图片与GIF动图资源,适用于聊天场景中表情包查找与斗图需求,帮助用户提升互动趣味性。
/v1/meme.php
GET、POST
无需密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| msg | string | 是 | 需要搜索的关键词,如:鄙视 |
| page | integer | 否 | 页数,默认为第1页内容 |
| num | integer | 否 | 每页数量,默认每页为40条 |
| n | integer | 否 | 无此值返回多列表,有则返回指定当前页的n条图 |
{
"code": 200,
"page": 1,
"num": 40,
"data": [
{
"img_url": "https://biaoqing.gtimg.com/back/yuntu/o/14c78e60e4cc43f25e955fd87f97b2ea.JPG",
"img_size": 27333,
"img_height": 220,
"img_width": 220
},
{
"img_url": "https://biaoqing.gtimg.com/product/200678/o/a31ab4f316b60986936dede0457a0fb5.gif",
"img_size": 5213,
"img_height": 136,
"img_width": 136
}
],
"tips": "慕名API:http://xiaoapi.cn"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 接口返回状态码,200 表示请求成功 |
| page | integer | 当前返回数据的页码 |
| num | integer | 每页返回的条目数量 |
| data | array | 图片资源列表,每项为一张表情图片的信息对象 |
| tips | string | 接口提示信息 |
| 字段 | 类型 | 说明 |
|---|---|---|
| img_url | string | 表情图片的完整访问地址,支持 JPG、PNG、GIF 等格式 |
| img_size | integer | 图片文件大小,单位为字节(Byte) |
| img_height | integer | 图片高度,单位为像素(px) |
| img_width | integer | 图片宽度,单位为像素(px) |
{"code":0,"msg":"未提供调用密钥","errcode":11001}
未提供调用密钥:
{"code":0,"msg":"未提供调用密钥","errcode":11001}
请求过于频繁:
{"code":0,"msg":"请求过于频繁(QPM 限制)","errcode":11005}
服务暂不可用:
{"code":0,"msg":"服务暂不可用","errcode":11017}
| errcode | 说明 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
搜索「鄙视」表情包,返回第一页 40 条数据:
curl "https://api.xiaoapi.cn/v1/meme.php?msg=%E9%84%AD%E8%A6%96&page=1&num=40"
获取指定页数内容:
curl "https://api.xiaoapi.cn/v1/meme.php?msg=%E9%84%AD%E8%A6%96&page=2&num=20"
获取当前页第 1 条表情详情:
curl "https://api.xiaoapi.cn/v1/meme.php?msg=%E9%84%AD%E8%A6%96&n=1"
// 搜索表情包示例
$msg = "鄙视";
$page = 1;
$num = 40;
$url = "https://api.xiaoapi.cn/v1/meme.php?msg=" . urlencode($msg) . "&page={$page}&num={$num}";
$response = file_get_contents($url);
$result = json_decode($response, true);
if ($result['code'] == 200) {
echo "当前页码:" . $result['page'] . "\n";
echo "每页数量:" . $result['num'] . "\n";
foreach ($result['data'] as $item) {
echo "图片地址:" . $item['img_url'] . "\n";
echo "文件大小:" . $item['img_size'] . " 字节\n";
echo "尺寸:{$item['img_width']}x{$item['img_height']}\n";
echo "---\n";
}
}
msg 为必传参数,建议使用简洁明确的情绪或动作词(如“鄙视”“鼓掌”),以提高匹配准确率。n 参数慎用:该参数用于返回当前页内指定位置的单个结果,获取后请注意处理空值情况;若需批量结果集,请勿传递此参数。page 默认为 1,num 默认为 40;若搜索结果较多,可通过递增 page 值翻页获取后续内容。img_url 为第三方表情库直链,建议获取后尽快使用,部分资源可能存在临时性或变更风险。img_height 与 img_width 为图片原始像素尺寸,GIF 动图可能与静态图尺寸存在差异,使用前可据此判断是否满足展示需求。code 非 200 时表示请求异常,需在业务代码中对异常状态进行容错处理,避免因单个请求失败导致整体流程中断。curl -X POST "https://xiaoapi.cn/v1/meme.php" -d "msg=鄙视" -d "num=5"
curl -G "https://xiaoapi.cn/v1/meme.php" --data-urlencode "msg=鄙视" --data "page=1&num=3&n=1"
// 结果将在此处显示