| 项目 | 值 |
|---|---|
| Base URL | https://chat.claw99.ai |
| 格式 | JSON / UTF-8 |
| 鉴权 | 无需(公开只读);如已配置 API Key,请带 key= 参数 |
| 缓存 | 60 秒(同一彩种 60 秒内返回缓存) |
| CORS | 允许跨域 GET |
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/4d/list | 可用彩种清单 |
| GET | /api/4d/latest | 最新成绩(JSON) |
| GET | /api/4d/text | 最新成绩(纯文本,便于直接显示/转发) |
| 参数 | 必填 | 说明 | 示例 |
|---|---|---|---|
codes | 否 | 彩种代号,逗号分隔;留空=全部 | M,PMP,ST,SG |
key | 否 | API Key(若服务端已启用) | abcd1234 |
| 代号 | 彩种 | 代号 | 彩种 |
|---|---|---|---|
M | Magnum 4D 马来西亚 | STC | Sandakan 4D 沙巴 |
PMP | Da Ma Cai 马来西亚 | EE | Sabah 88 4D 沙巴 |
ST | Sports Toto 4D 马来西亚 | CS | Special Cash Sweep 砂拉越 |
SG | Singapore Pools 4D 新加坡 | H / WB / P / 6L | 8LUCKY / 9 Winbox / Perdana / Lotto 6D |
cURL
curl "https://chat.claw99.ai/api/4d/latest?codes=M,SG"
JavaScript
fetch("https://chat.claw99.ai/api/4d/latest?codes=M").then(r=>r.json()).then(d=>{
const r = d.results[0];
console.log(r.label, r.draw_id, r.first, r.second, r.third);
});
PHP
$json = file_get_contents("https://chat.claw99.ai/api/4d/latest?codes=M");
$d = json_decode($json, true);
echo $d["results"][0]["first"]; // 首奖
Python
import requests
d = requests.get("https://chat.claw99.ai/api/4d/latest?codes=M").json()
print(d["results"][0]["first"])
{
"ok": true,
"count": 1,
"results": [
{
"code": "M", // 彩种代号
"label": "Magnum 4D 马来西亚", // 显示名
"draw_id": "423/26", // 期号
"draw_date": "2026-09-16", // 开彩日期
"day": "Wed", // 星期
"live": false, // 是否开彩中
"first": "6087", // 首奖
"second": "0781", // 二奖
"third": "3815", // 三奖
"special": ["1207","0005",...], // 特别奖(10 个)
"consolation": ["3187","7591",...] // 安慰奖(10 个)
}
]
}
{
"ok": true,
"count": 1,
"text": "🎰 Magnum 4D 马来西亚
期号 423/26 | 2026-09-16 (Wed)
🥇 首奖 6087
🥈 二奖 0781
🥉 三奖 3815
..."
}
0781),对接时请按字符串处理,勿转数字。results 可能为空数组,请判空。