FengAPI 接口文档

免费的图片、视频、工具类API服务平台,基于 PHP-Random-Pic-API 进行了修改和优化

12+ API接口
24/7 服务可用
免费 完全免费
API 演示
GET https://img.8845.top/xjj
200 OK 45ms

基础域名

https://img.8845.top

HTTPS 支持

所有接口均支持 HTTPS 安全连接

响应时间

平均响应时间 < 100ms

可用性

99.9% 服务可用性保证

图片类API

提供多种类型的随机图片服务

自适应动漫图片 API

GET
/acg

根据设备类型自动选择PC或移动端动漫图片(可以携带参数获取指定模式图片,不带参数根据UA)

限制: 每分钟60次
特性: 根据User-Agent自动适配
可选:
  • type=pc 返回PC壁纸
  • type=pe 返回手机壁纸
curl https://img.8845.top/acg
fetch('https://img.8845.top/acg').then(r=>r.text()).then(console.log)
import requests
print(requests.get('https://img.8845.top/acg').text)

动漫PC图片 API

GET
/good

返回随机动漫PC壁纸图片,支持代理模式

限制: 每分钟30次(服务端IP限流)
可选:
  • return=proxy 代理模式,服务器抓取远端图片后直接返回图片内容
curl https://img.8845.top/good
fetch('https://img.8845.top/good').then(r=>r.text()).then(console.log)
import requests
print(requests.get('https://img.8845.top/good').text)

效果预览 • 点击图片刷新

动漫PC
动漫PC(/good)
自适应动漫
自适应动漫(/acg)

动漫PC 图片 API (JSON)

GET
/random.php

返回JSON格式的动漫PC图片信息

限制:每分钟30次
响应:JSON
curl https://img.8845.top/random.php
fetch('https://img.8845.top/random.php').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/random.php').text)
响应示例
{
  "API_name": "FengAPI",
  "IP": "xxx.xxx.xxx.xxx",
  "image_links": "https://example.com/image.jpg",
  "Image_status": "ok",
  "delay": "50ms"
}

本地动漫 图片 API

GET
/local.php

返回本地存储的动漫图片,直接输出图片内容

限制:每分钟60次
curl -I https://img.8845.top/local.php
fetch('https://img.8845.top/local.php', {redirect:'manual'}).then(r=>console.log(r.status,r.headers.get('location')))
import requests
r = requests.get('https://img.8845.top/local.php', allow_redirects=False)
print(r.status_code, r.headers.get('location'))

Feng 高级图片 API (Beta)

GET
/feng.php

支持多类型与批量链接返回,需提供密钥。测试密钥: fengyyds

必填:license (API密钥)
可选:
  • pc 返回PC壁纸
  • pe 返回手机壁纸
  • acg 返回ACG壁纸
  • sc 返回站长收藏壁纸
  • return_link 返回图片链接(不传则直接返回图片)
  • num 返回链接数量(1-50)
curl "https://img.8845.top/feng.php?license=fengyyds&pc&return_link&num=3"
fetch('https://img.8845.top/feng.php?license=fengyyds&pc&return_link&num=3').then(r=>r.text()).then(console.log)
import requests
print(requests.get('https://img.8845.top/feng.php?license=fengyyds&pc&return_link&num=3').text)

特殊功能API

实验性/维护中的接口

动态壁纸 API

GET
/xjj/Dynamicvideo.php

状态:维护中(已停用),暂不可用

当前响应
{
  "status": "error",
  "message": "API维护中,暂停服务 (´;ω;`)",
  "data": null
}

视频类API

提供随机视频获取、播放等能力

视频 API

GET
/al

返回随机视频信息,支持调试模式和预览模式

限制:每分钟60次
可选:
  • video=yes 直接跳转至播放器
  • alt 使用备用资源路径
  • refresh=force 忽略已浏览记录,强制刷新
curl https://img.8845.top/al
fetch('https://img.8845.top/al').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/al').text)

小姐姐视频 API

GET
/xjj

返回随机小姐姐视频,浏览器将重定向到签名播放链接

限制:每分钟20次(服务端IP限流 + UA检测)
响应:302 重定向到带签名的播放链接(5分钟有效)
可选:
  • type=jk|rewu|chuanda|qingchun|nvda|shejie|gaozhiliang|heisi|baisi 指定视频分类
  • return=json 返回JSON格式
curl -I https://img.8845.top/xjj
# 跟随重定向直接打开
curl -L https://img.8845.top/xjj
// 跟随重定向打开
fetch('https://img.8845.top/xjj', {redirect:'follow'}).then(r=>console.log(r.url))
import requests
r = requests.get('https://img.8845.top/xjj', allow_redirects=True)
print(r.url)

工具类API

常用工具接口,如IP查询、一言、MC服务器状态等

IP属地查询 API

GET
/ip/index.php

查询IP地理信息,支持自动获取请求者IP(直接访问)

可选:
  • ip= 查询指定IP
  • action=info 查询数据库信息
限制:每分钟60次
curl "https://img.8845.top/ip/index.php?zd=1"
fetch('https://img.8845.top/ip/index.php?zd=1').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/ip/index.php?zd=1').text)
响应示例
{
  "code": 响应状态码,
  "ip": "属地IP",
  "country_name": "国家",
  "region_name": "省",
  "city_name": "市",
  "district_name": "县",
  "owner_domain": "IP的归属主体或用途描述",
  "isp_domain": "运营商",
  "country_code": "国家/地区代码",
  "continent_code": "大洲代码",
  "msg": "响应消息",
  "ip_type": "IPv4/IPv6",
  "is_china": true/false 是否为中国地区,
  "query_time": "接口响应时间",
  "vpn": true/false 是否开启代理,
  "vpn_time": "代理检测时间",
  "vpn_cached": true/false 代理检测是否来自缓存
}

随机一言 API

GET
/yiyan/index.php

返回随机句子,支持类型:yiyan / shiju / gx

限制:每分钟60次
可选:
  • type 句子类型:yiyan / shiju / gx
curl https://img.8845.top/yiyan/index.php?type=yiyan
fetch('https://img.8845.top/yiyan/index.php?type=yiyan').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/yiyan/index.php?type=yiyan').text)

Minecraft 服务器查询 API

GET
/mc/api

查询MC服务器状态,支持Java与基岩版

限制:每分钟30次
必填:
  • host 服务器地址(可带端口如 mc.example.com:25565)
  • type 服务器类型:java / bedrock
可选:
  • useSRV=true 使用SRV记录解析
curl "https://img.8845.top/mc/api?host=mc.hypixel.net&type=java&useSRV=true"
fetch('https://img.8845.top/mc/api?host=mc.hypixel.net&type=java&useSRV=true').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/mc/api?host=mc.hypixel.net&type=java&useSRV=true').text)
响应示例
{
  "msg": "success",
  "serv_ver": "1.8.x-1.20.x",
  "serv_name": "Hypixel Network",
  "onl_l": 45000,
  "max_l": 200000,
  "serv_ping": 25,
  "serv_ico": null
}

高级一言 API(句子束)

GET
/yiyan/sentences-bundle-master/api.php

提供更丰富的句子类型和UUID查询功能

可选:
  • type 句子类型:a-l(12类)
  • uuid 指定句子UUID
curl "https://img.8845.top/yiyan/sentences-bundle-master/api.php?type=a"
fetch('https://img.8845.top/yiyan/sentences-bundle-master/api.php?type=a').then(r=>r.json()).then(console.log)
import requests
print(requests.get('https://img.8845.top/yiyan/sentences-bundle-master/api.php?type=a').text)
响应示例
{
  "status": "success",
  "data": {
    "uuid": "xxx-xxx-xxx",
    "hitokoto": "人生如逆旅,我亦是行人。",
    "type": "a",
    "from": "临江仙·送钱穆父",
    "from_who": "苏轼"
  }
}

速率限制与错误码

请合理调用,遵守使用规范

速率限制(服务端IP限流)

  • /acg 自适应动漫:60次/分钟
  • /good 动漫PC:30次/分钟
  • /random.php JSON:30次/分钟
  • /local.php 本地动漫:60次/分钟
  • /xjj 小姐姐视频:20次/分钟
  • /al 视频API:60次/分钟
  • /ip IP查询:60次/分钟
  • /yiyan 随机一言:60次/分钟
  • /mc/api MC查询:30次/分钟

HTTP 状态码

  • 200 请求成功
  • 302 重定向(图片/视频)
  • 403 禁止访问(UA检测未通过)
  • 404 资源不存在
  • 410 链接已过期(签名URL)
  • 429 请求过于频繁
  • 500 服务器错误

最佳实践

  • 图片接口建议间隔 2 秒以上
  • 视频接口建议间隔 3 秒以上
  • 设置正常的 User-Agent
  • 签名URL有效期5分钟,过期需重新获取
  • 实现错误重试与超时控制

详细文档

查看完整的 API 文档,包含所有参数说明和代码示例:

联系我们

联系方式

邮箱: xiaoka886@qq.com

官网: img.8845.top

留言反馈: 留言中心

状态与监控: 状态页面