侧边栏壁纸

每日必应壁纸API-文档

2024年03月31日 78阅读 0评论 0点赞

API 地址

https://www.mengze2.cn/tool/api/v1/bing.php

请求方法

  • GET

请求参数

参数名类型是否必须描述
typestring返回数据的类型,可选值为 imagejson,默认为 json。当参数值为 image 时,直接返回图片;当参数值为 json 时,返回 JSON 格式的数据。

响应

  • 当参数 type 值为 json 时,响应内容为 JSON 格式的数据,包含以下字段:

    • imageUrl: 必应壁纸的图片链接。
    • title: 必应壁纸的标题。
  • 当参数 type 值为 image 时,响应内容为图片文件。

示例

请求

GET https://www.mengze2.cn/tool/api/v1/bing.php?type=json

响应

{
  "imageUrl": "https://www.bing.com/th?id=OHR.HungarianEggs_EN-GB1813160198_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
  "title": "Egg-cellent craftmanship"
}

或者

请求

GET https://www.mengze2.cn/tool/api/v1/bing.php?type=image

响应

错误处理

  • 如果无法获取必应壁纸信息,API 将返回 500 错误,并包含 JSON 格式的错误信息。
0

—— 评论区 ——

昵称
邮箱
网址
取消
人生倒计时
舔狗日记