Skip to content

必应每日壁纸 ​

获取必应每日壁纸图片。

接口信息 ​

项目说明
接口地址https://api.horatio.cn/tool/bing.php
请求方法GET
返回格式302 重定向到图片地址;info=true 时返回 200 JSON
鉴权方式无需鉴权

调用参数 ​

参数类型必填默认值说明
daynumber否0指定日期的图片,见下方日期说明
randboolean否false为 true 时随机返回最近 8 天内的图片,与 day 同传时以随机为准
sizestring否1920x1080图片分辨率,取值见下方「可用分辨率」
infoboolean否false为 true 时返回图片信息 JSON,不返回图片

日期说明

  • 0:今天
  • -1:昨天
  • 1 ~ 7:前 2 ~ 8 天

可用分辨率 ​

分辨率说明
1920x1080全高清(默认)
1366x768高清
1280x768宽屏
1024x768标准
800x600小屏
800x480手机横屏
768x1280平板竖屏
720x1280手机竖屏
640x480小屏
480x800手机竖屏
400x240小屏
320x240小屏
240x320小屏竖屏

分辨率写法

中间的 x 为英文字母 x,不是乘号;取值不合法时按默认分辨率返回。

调用示例 ​

基础调用 ​

不带任何参数调用,返回必应当天图片(1920x1080)。

请求链接:

text
https://api.horatio.cn/tool/bing.php

HTML 调用:

html
<img src="https://api.horatio.cn/tool/bing.php" />

显示效果:

指定日期 ​

获取昨天的图片:

请求链接:

text
https://api.horatio.cn/tool/bing.php?day=-1

指定分辨率 ​

获取 1366x768 分辨率的图片:

请求链接:

text
https://api.horatio.cn/tool/bing.php?size=1366x768

随机图片 ​

随机返回最近 8 天内的图片:

请求链接:

text
https://api.horatio.cn/tool/bing.php?rand=true

HTML 调用:

html
<img src="https://api.horatio.cn/tool/bing.php?rand=true" />

显示效果:

获取图片信息 ​

返回图片的详细信息(JSON):

请求链接:

text
https://api.horatio.cn/tool/bing.php?info=true

返回示例:

json
{
  "code": 200,
  "message": "success",
  "title": "曼布尔斯码头,斯旺西,威尔士 (© Helen Hotson/Shutterstock)",
  "url": "https://www.bing.com/th?id=OHR.MumblesSwansea2026_ZH-CN5419531039_1920x1080.jpg",
  "link": "https://www.bing.com/search?q=%E5%A8%81%E5%B0%94%E5%A3%AB%E6%9B%BC%E5%B8%83%E5%B0%94%E6%96%AF%E7%A0%81%E5%A4%B4&form=hpcapt&mkt=zh-cn",
  "time": "20261011",
  "data": {
    "title": "曼布尔斯码头,斯旺西,威尔士 (© Helen Hotson/Shutterstock)",
    "url": "https://www.bing.com/th?id=OHR.MumblesSwansea2026_ZH-CN5419531039_1920x1080.jpg",
    "link": "https://www.bing.com/search?q=%E5%A8%81%E5%B0%94%E5%A3%AB%E6%9B%BC%E5%B8%83%E5%B0%94%E6%96%AF%E7%A0%81%E5%A4%B4&form=hpcapt&mkt=zh-cn",
    "time": "20261011"
  }
}

顶层的 title、url、link、time 与 data 内的字段内容一致,取其一即可。

组合参数 ​

多个参数可用 & 连接:

请求链接:

text
https://api.horatio.cn/tool/bing.php?day=-1&size=1366x768

错误处理 ​

HTTP 状态码说明
302成功,重定向到图片地址;参数缺失或取值非法时返回当天默认图(默认分辨率)
200info=true 时返回图片信息 JSON

版权声明

部分代码来自互联网,如有侵权请前往 GitHub Issues 要求删除

问题反馈

遇到问题请前往 GitHub Issues 提问

Released under the MPL-2.0 License.