API 开发文档

为开发者提供的标准数据接口服务

概览

本站提供基于 HTTP GET 的 RESTful 风格 API,所有响应均以 JSON 格式返回。您可以使用这些接口获取 Minecraft 基岩版的最新版本列表、详细信息以及下载链接。

API 基地址
/api.php
响应格式
application/json
字符编码
UTF-8

前端集成

本站所有页面会自动注入全局变量 window.MCQUKANR_API,您可以直接在控制台或前端脚本中访问。

// 示例输出 console.log(window.MCQUKANR_API); /* { "generated_at": "2025-12-30T12:00:00+08:00", "api": { "base": "/api.php", "endpoints": { "versions": "/api.php?action=getVersions", "version": "/api.php?action=getVersion&id={id}" } }, "page": { "name": "index", "type": "release" } } */

接口列表

GET ?action=getVersions

获取版本列表,支持按类型筛选。

请求参数

参数名 类型 必填 说明
action string 固定值 getVersions
type string 筛选类型:正式版 | 测试版 | iOS版

示例代码

fetch('/api.php?action=getVersions&type=正式版') .then(response => response.json()) .then(data => console.log(data));
GET ?action=getVersion

获取指定版本的详细信息,包括下载直链。

请求参数

参数名 类型 必填 说明
action string 固定值 getVersion
id int 版本唯一ID

示例代码

fetch('/api.php?action=getVersion&id=123') .then(response => response.json()) .then(data => console.log(data));

数据结构说明

字段名 类型 描述
id int 版本ID,用于获取详情或拼接下载页URL
version string 版本号(例如:1.20.50.03)
type string 版本类型(正式版/测试版/iOS版)
formatted_release_time string 格式化的发布日期 (YYYY-MM-DD)
download_url_full string 完整版下载直链(可能为空)
download_url_lite string 删减版下载直链(可能为空)
download_url_direct string 直链版下载直链(可能为空)