← 返回开奖大厅

澳洲3开奖 API

与开奖大厅共用同一份数据,每期均按时自动开奖,预设号码到期执行、暂停恢复和期号设置都会反映到接口。未执行的预设只在管理后台显示,公开接口不会提前返回。号码由本站独立生成并保存。

接口基址:http://127.0.0.1:8765。本机地址仅限本机调用;部署后,本页示例自动使用当前站点地址。以下只读接口无需令牌,返回 UTF-8 JSON,支持不携带凭据的跨域 GET。访问本机地址时,浏览器可能要求本地网络访问权限。

接口地址

用途GET 路径(点击查看)
最新开奖、待开奖期号及倒计时/api/australia3/latest
历史记录/api/australia3/history?page=1&pageSize=10
原网页兼容接口(最近150条)/api/australia3

最新开奖

示例号码仅说明格式,不代表实际开奖结果。初次启动尚未开奖时,latest 为 null。

{
  "ok": true,
  "game": "australia3",
  "name": "澳洲3",
  "latest": {
    "period": "5490421",
    "numbers": [1, 2, 3],
    "sum": 6,
    "openedAt": 1791216000,
    "openedText": "2026-10-06 00:00:00",
    "source": "auto"
  },
  "currentIssue": "5490422",
  "periodSeconds": 120,
  "mode": "auto",
  "paused": false,
  "status": "auto",
  "nextAt": 1791216120,
  "remainingSeconds": 120,
  "serverTime": 1791216000
}
字段说明
latest.period / currentIssue最近已开奖期号 / 当前待开奖期号,均为字符串。请用 latest.period 去重,勿把 currentIssue 当作已开奖结果。
latest.numbers / sum三个0至9整数(允许重复)/ 三数之和。
openedAt / serverTime / nextAtUnix 时间戳,单位秒,可有小数。JavaScript 转日期时乘1000。openedText 为北京时间(UTC+8)。
periodSeconds当前周期,默认120秒,以管理页设置为准。
mode / status / paused当前 mode 固定为 auto;status 为 auto 或 paused;paused 表示是否暂停。
nextAt / remainingSeconds自动模式运行时返回预计开奖时间和剩余秒数;暂停时 nextAt 为 null,自动模式剩余秒数冻结。
latest.sourceauto 表示自动生成号码;preset 表示预设号码到时自动开奖;manual 仅为旧版手动开奖历史记录。

原网页接口保留旧的内部 game: "australia8ball" 字段值以兼容现有页面,实际内容仍是澳洲3。新接入推荐使用 /latest。

历史查询

GET /api/australia3/history?date=2026-10-06&page=1&pageSize=20

响应字段:ok、records、total、page、pages、pageSize。records 内的记录与 latest 格式相同,按期号倒序排列。无记录时 records 为空数组,total 为0,page 和 pages 为1。历史查询覆盖全部保存记录,不限150条。持续开奖时页码会移动;增量采集请按期号去重并保留重叠查询。

参数无效返回 HTTP 400,例如 {"ok":false,"message":"pageSize须为1至100的整数"}。

调用示例

命令行:

curl "http://127.0.0.1:8765/api/australia3/latest"
curl "http://127.0.0.1:8765/api/australia3/history?page=1&pageSize=20"

JavaScript(浏览器;无需请求头或凭据):

async function readLatest() {
  const response = await fetch('http://127.0.0.1:8765/api/australia3/latest', {
    credentials: 'omit', cache: 'no-store'
  });
  const data = await response.json();
  if (!response.ok || !data.ok) throw new Error(data.message || '读取失败');
  if (data.latest) console.log(data.latest.period, data.latest.numbers, data.latest.sum);
  return data;
}
readLatest().catch(console.error);

Python(无需安装第三方库):

import json
from urllib.request import urlopen

with urlopen('http://127.0.0.1:8765/api/australia3/latest', timeout=10) as response:
    data = json.load(response)
if data['latest'] is not None:
    print(data['latest']['period'], data['latest']['numbers'], data['latest']['sum'])

建议每3秒轮询一次,失败时稍后重试;只有 latest.period 改变时才处理新结果。倒计时可按 remainingSeconds 在客户端递减,暂停时冻结。到零后重新读取,以已返回的开奖记录为准。

服务器进程必须运行才能调用和自动开奖。停机期间不会补造开奖记录。接口禁止缓存;只读接口不会暴露管理令牌,管理接口不开放跨域访问。