随机一言
GEThttps://api.骚福瑞.top/sjyy.php
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 否 | a=动画 b=文学 c=诗词 d=哲学 e=影视 f=网络 g=其他 |
| charset | string | 否 | utf-8 / gbk,默认 utf-8 |
| 返回字段 | 类型 | 说明 |
|---|---|---|
| hitokoto | string | 一言正文 |
| from | string | 出处 |
| creator | string | 投稿者 |
| type | string | 分类标识 |
调用示例
curl https://api.骚福瑞.top/sjyy.php?type=a
fetch('https://api.骚福瑞.top/sjyy.php')
.then(r=>r.json()).then(console.log)
Minecraft 服务器状态
GEThttps://api.骚福瑞.top/mcstatus.php?server=...
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| server | string | 是 | 服务器地址,域名(如 hypixel.net)或 IP:端口(缺省 25565) |
| 返回字段 | 说明 |
|---|---|
| online | 是否在线 |
| players | 在线人数 / 最大人数 |
| version | 服务端版本 |
| motd | 服务器 MOTD |
调用示例
curl "https://api.骚福瑞.top/mcstatus.php?server=hypixel.net"
fetch('https://api.骚福瑞.top/mcstatus.php?server=mc.example.com:25565')
.then(r=>r.json()).then(console.log)
天气查询
GEThttps://api.骚福瑞.top/weather.php?city=...
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| city | string | 否 | 城市名称,支持中文(北京)和英文(Tokyo);不传则 IP 定位 |
| adcode | string | 否 | 行政区划代码(如 110000),优先级高于 city |
| lang | string | 否 | zh(默认)/ en;生活指数仅支持中文 |
| 返回字段 | 说明 |
|---|---|
| city | 城市名 |
| weather / text | 天气状况 |
| temperature | 实时气温 |
| humidity | 湿度 |
| wind | 风向 / 风力 |
| indices | 生活指数(仅 zh) |
调用示例
curl "https://api.骚福瑞.top/weather.php?city=北京"
curl "https://api.骚福瑞.top/weather.php?adcode=110000&lang=zh"
fetch('https://api.骚福瑞.top/weather.php?city=Tokyo&lang=en')
.then(r=>r.json()).then(console.log)