稳定、快速、免费的 API 接口服务
站点统计在线人数
接口地址: https://api.iamap.cn/api/online
返回格式: JSON
请求方式: GET
请求示例: https://api.iamap.cn/api/online?qq=您的QQ号
请求参数说明:
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| 是 | string | 输入你的QQ号码 |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|---|---|
| 在线超时时间 | string | 在线超时时间:300秒 |
| 今日统计周期 | string | 每天 00:00:00 自动重置今日统计 |
| Cookie有效期 | string | 有效期为 365天 |
| 时间戳输出 | string | 响应中包含的当前服务器时间Unix时间戳 |
| online | string | 在线数量 |
返回示例:
{
"success": true,
"qq": "123456",
"data": {
"total": 150,
"online": 12,
"today": 25,
"timestamp": 1716384000
}
}
错误码格式说明:
| 名称 | 类型 | 说明 |
|---|
代码示例:
<script>//建议配合前端使用时的调用方式:
fetch('https://api.iamap.cn/api/online?qq=您的QQ号')
.then(response => response.json())
.then(data => console.log(data))
</script>