其他分享
首页 > 其他分享> > 必应壁纸接口 | Bing wallpaper interface

必应壁纸接口 | Bing wallpaper interface

作者:互联网

必应壁纸接口 | Bing wallpaper interface

api : https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=zh-CN

请求参数

参数 Lianxia
format 非必需 返回数据格式,不存在返回xml格式
js :返回 JSON 格式
 XML : 返回XML 格式
一般是js
idx 非必需 请求图片截止天数
0  今天
1  截止至昨天
-1 截止至明天
n 必需 1-8 返回请求数量,最多一次获取8张()
mkt 非必需 地区 如: zh-CN
# 一次可以获取8张
如:https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=8&mkt=zh-CN
{
    "images": [
        {
            "startdate": "20220710", 
            "fullstartdate": "202207101600", 
            "enddate": "20220711", 
            "url": "/th?id=OHR.BarcelonaPop_ZH-CN3687855585_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.BarcelonaPop_ZH-CN3687855585", 
            "copyright": "巴塞罗那城市上空,西班牙 (© SW Photography/Getty Images)", 
            "copyrightlink": "https://www.bing.com/search?q=%E8%A5%BF%E7%8F%AD%E7%89%99%E5%B7%B4%E5%A1%9E%E7%BD%97%E9%82%A3&form=hpcapt&mkt=zh-cn", 
            "title": "城市规划永不停歇", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220710_BarcelonaPop%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "c901390a7087d796c0e804d5e2f2b7fe", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220709", 
            "fullstartdate": "202207091600", 
            "enddate": "20220710", 
            "url": "/th?id=OHR.OludenizTurkey_ZH-CN3467496108_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.OludenizTurkey_ZH-CN3467496108", 
            "copyright": "鸟瞰视角下的彩色船只,土耳其欧鲁旦尼斯 (© den-belitsky/Getty Images)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%9C%9F%E8%80%B3%E5%85%B6%E6%AC%A7%E9%B2%81%E6%97%A6%E5%B0%BC%E6%96%AF&form=hpcapt&mkt=zh-cn", 
            "title": "绚丽多彩的海滩", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220709_OludenizTurkey%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "d6350ce1f9115e91376377ab95796771", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220708", 
            "fullstartdate": "202207081600", 
            "enddate": "20220709", 
            "url": "/th?id=OHR.DolomitesMW_ZH-CN3307894335_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.DolomitesMW_ZH-CN3307894335", 
            "copyright": "多洛米蒂山上空的银河,意大利 (© Carlos Fernandez/Getty Images)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%A4%9A%E6%B4%9B%E7%B1%B3%E8%92%82%E5%B1%B1&form=hpcapt&mkt=zh-cn", 
            "title": "彩虹桥", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220708_DolomitesMW%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "2794df0063da6fd876b59fec052ce821", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220707", 
            "fullstartdate": "202207071600", 
            "enddate": "20220708", 
            "url": "/th?id=OHR.PreveliGorge_ZH-CN3109665395_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.PreveliGorge_ZH-CN3109665395", 
            "copyright": "普雷维利峡谷里的河流和棕榈树森林,希腊克里特岛 (© borchee/Getty Images)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%85%8B%E9%87%8C%E7%89%B9%E5%B2%9B&form=hpcapt&mkt=zh-cn", 
            "title": "值得一去的魅力峡谷", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220707_PreveliGorge%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "3b76556233c38d192877bf9e7299bd0f", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220706", 
            "fullstartdate": "202207061600", 
            "enddate": "20220707", 
            "url": "/th?id=OHR.HecetaHead_ZH-CN2813876594_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.HecetaHead_ZH-CN2813876594", 
            "copyright": "哈萨塔角灯塔,佛罗伦萨,俄勒冈州 (© Tom Schwabel/Tandem Stills + Motion)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%93%88%E8%90%A8%E5%A1%94%E8%A7%92%E7%81%AF%E5%A1%94+%E4%BF%84%E5%8B%92%E5%86%88%E5%B7%9E&form=hpcapt&mkt=zh-cn", 
            "title": "黑夜海岸边的一盏灯", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220706_HecetaHead%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "eceedd5ef675251844417c48cf9eb6a4", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220705", 
            "fullstartdate": "202207051600", 
            "enddate": "20220706", 
            "url": "/th?id=OHR.KissingPuffins_ZH-CN2578608262_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.KissingPuffins_ZH-CN2578608262", 
            "copyright": "一对大西洋海雀在接吻,设得兰群岛,苏格兰 (© Vince Burton/Minden Pictures)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%A4%A7%E8%A5%BF%E6%B4%8B%E6%B5%B7%E9%9B%80&form=hpcapt&mkt=zh-cn", 
            "title": "春天是接吻的季节", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220705_KissingPuffins%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "55eee8ae83488cc11e7186f28684a616", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220704", 
            "fullstartdate": "202207041600", 
            "enddate": "20220705", 
            "url": "/th?id=OHR.FannetteIsland_ZH-CN2395055456_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.FannetteIsland_ZH-CN2395055456", 
            "copyright": "被翡翠湾环绕的芬尼特岛,太浩湖,加利福尼亚 (© Rachid Dahnoun/Tandem Stills + Motion)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%A4%AA%E6%B5%A9%E6%B9%96+%E7%BF%A1%E7%BF%A0%E6%B9%BE&form=hpcapt&mkt=zh-cn", 
            "title": "这座岛海拔超过一英里", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220704_FannetteIsland%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "c289926e16caae6a11d694d630e1fa13", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }, 
        {
            "startdate": "20220703", 
            "fullstartdate": "202207031600", 
            "enddate": "20220704", 
            "url": "/th?id=OHR.SharavatiBridge_ZH-CN2011371774_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", 
            "urlbase": "/th?id=OHR.SharavatiBridge_ZH-CN2011371774", 
            "copyright": "一列火车穿过卡纳塔克邦的沙拉瓦蒂桥,印度 (© Amith Nag Photography/Getty Images)", 
            "copyrightlink": "https://www.bing.com/search?q=%E5%8D%A1%E7%BA%B3%E5%A1%94%E5%85%8B%E9%82%A6&form=hpcapt&mkt=zh-cn", 
            "title": "工程奇迹", 
            "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20220703_SharavatiBridge%22&FORM=HPQUIZ", 
            "wp": true, 
            "hsh": "12ee697dbadb3d7008ee818ea8346f44", 
            "drk": 1, 
            "top": 1, 
            "bot": 1, 
            "hs": [ ]
        }
    ], 
    "tooltips": {
        "loading": "正在加载...", 
        "previous": "上一个图像", 
        "next": "下一个图像", 
        "walle": "此图片不能下载用作壁纸。", 
        "walls": "下载今日美图。仅限用作桌面壁纸。"
    }
}

得到JSON 之后,可以知道 key "url" 对应的 value 就是地址

在前面加上 https://cn.bing.com 就可以得到图片。

标签:search,ZH,E5%,Bing,wallpaper,1920x1080,th,interface,OHR
来源: https://www.cnblogs.com/lianxia/p/16466395.html