本帖最后由 QQ酱48402 于 2025-2-16 15:49 编辑
开源地址:https://github.com/YuGe-Git/MCMod-Search-API
测试地址:http://218.93.206.85:10369/search_api.php?key=需要搜索的mod名称
接口说明:http://218.93.206.85:10369/search_api.php
PHP的MCMOD API(非官方)
可以自行部署在PHP服务器
返回数据样式
- {
- "success": true, // 是否成功
- "search_term": "搜索关键词", // 搜索的关键词
- "timestamp": "2025-02-16 15:28:47", // 搜索时间
- "total_results": 30, // 搜索结果总数
- "best_result": { // 最佳匹配结果
- "score": 174.4, // 相关度评分
- "address": "https://www.mcmod.cn/class/2.html", // 模组页面地址
- "title": "[IC2] 工业时代2 (Industrial Craft 2)", // 模组标题
- "description": "模组描述...", // 模组描述
- "snapshot_time": "2025-02-12", // 数据更新时间
- "data": { // 模组详细数据
- "mcmod_id": "2", // MCMod 站内 ID
- "abbr": "IC2", // 模组缩写(可能为 null)
- "chinese_name": "工业时代2", // 模组中文名
- "sub_name": "Industrial Craft 2" // 模组英文名/副标题(可能为 null)
- }
- },
- "other_results": [ // 其他相关结果
- // 格式同 best_result
- ]
- }
复制代码
- 注意事项
1. 本 API 为非官方实现,仅供学习交流使用
2. 请合理使用,避免频繁请求
3. API 数据来源于 MCMOD 网站,版权归原网站所有 |
|