4D 成绩 API 与 MCP 服务器
面向开发者和 AI 助手的免费 4D 成绩 API 与 MCP 服务器:无需注册,无需密钥,数据以 CC BY 4.0 协议开放使用。
这是什么
只提供开奖成绩与历史记录,不提供号码推荐。这是一个成绩与数据接口,不卖彩票,也不接受投注。API 与 MCP 服务器返回的是本站展示的同一批官方、经过交叉核对的 4D 成绩。两者都免费且无需密钥:不用注册,不用申请。数据以知识共享署名 4.0 国际许可协议(CC BY 4.0)开放,可自由重复使用,包括商业用途,但需注明来源。
REST API
接口地址:https://4dlivetoday.com/api/v1。每个响应都是 JSON 格式,统一包含数据本身、来源、许可协议,以及指回本站对应页面的链接。
- GET /api/v1
- Index: endpoints, envelope fields, link to this page
- GET /api/v1/latest
- Newest draw per operator, including Perdana's afternoon draw
- GET /api/v1/results/{date}
- Every operator's draw on a date (YYYY-MM-DD, Malaysia time)
- GET /api/v1/operators/{operator}
- One operator's recent draws (?limit=1-30, default 10)
- GET /api/v1/numbers/{number}
- Every draw a 4-digit number won, with prize tier
- GET /api/v1/games/{game}
- Recent results for an operator's other official games
- GET /api/v1/schedule
- Upcoming draw dates (regular and special) and who draws each
- GET /api/v1/openapi.json
- OpenAPI 3.1 description of this API
curl
curl https://4dlivetoday.com/api/v1/latest
curl https://4dlivetoday.com/api/v1/results/2026-09-27
curl "https://4dlivetoday.com/api/v1/operators/magnum?limit=5"
curl https://4dlivetoday.com/api/v1/numbers/0650
curl "https://4dlivetoday.com/api/v1/games/sg_toto?limit=3"
curl https://4dlivetoday.com/api/v1/scheduleExample response (GET /api/v1/latest, trimmed to 2 operators)
{
"data": {
"results": [
{
"operator": "magnum",
"operator_name": "Magnum 4D",
"date": "2026-09-27",
"draw_no": "428/26",
"first": "1063",
"second": "2421",
"third": "5815",
"special": ["6814","7902","4744","2054","0025","4678","9921","4843","1719","0193"],
"consolation": ["1091","8204","4936","1585","5173","5921","0450","0577","5386","3132"],
"status": "checked",
"url": "https://4dlivetoday.com/en/results/2026-09-27"
},
{
"operator": "gd",
"operator_name": "Grand Dragon 4D",
"date": "2026-09-29",
"draw_no": "",
"first": "9071",
"second": "3658",
"third": "9799",
"special": ["9505","3845","7466","4452","7526","7901","5567","6080","2179","1451"],
"consolation": ["0819","6924","2953","9413","4834","9074","4578","9554","1759","1058"],
"status": "checked",
"url": "https://4dlivetoday.com/en/results/2026-09-29"
}
]
},
"source": "4dlivetoday.com",
"license": "CC BY 4.0",
"license_url": "https://creativecommons.org/licenses/by/4.0/",
"attribution": "Results from 4dlivetoday.com (https://4dlivetoday.com), compiled from each operator's official site.",
"generated_at": "2026-09-29T17:40:27.992Z",
"url": "https://4dlivetoday.com/en"
}MCP 服务器
远程 MCP 服务器地址为 https://4dlivetoday.com/mcp,使用 Streamable HTTP 协议。无需登录,我们这边也无需额外安装,任何支持 MCP 的 AI 助手都可以直接连接。
https://4dlivetoday.com/mcp
Tools
| get_latest_results | The newest draw for every operator |
| get_results_by_date | Every operator's draw on a date |
| get_operator_results | One operator's most recent draws |
| lookup_number | Every draw a 4-digit number won, with prize tier |
| get_other_game_results | Recent results of another official game |
| get_draw_schedule | Upcoming draw dates |
Claude Desktop (claude_desktop_config.json, via mcp-remote)
{
"mcpServers": {
"4dlivetoday": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://4dlivetoday.com/mcp"]
}
}
}Claude.ai and Claude Desktop connectors
Settings → Connectors → Add custom connector → paste https://4dlivetoday.com/mcp
Cursor (mcp.json)
{
"mcpServers": {
"4dlivetoday": { "url": "https://4dlivetoday.com/mcp" }
}
}合理使用
响应在边缘节点缓存约 60 秒;成绩只在开奖时段才会变化,也请在你那一端做好缓存。看起来异常的流量可能会在不另行通知的情况下被限速。
署名
数据以 CC BY 4.0 协议开放。如果你展示或转载数据,请注明来源:
Results from 4dlivetoday.com (https://4dlivetoday.com), compiled from each operator's official site.源代码: GitHub