Bing & Windows Spotlight Wallpaper API
Bing & Windows Spotlight Wallpaper API

本文档系统整理了微软 Bing 每日壁纸 (Bing Daily Wallpaper) 与 Windows 聚焦 (Windows Spotlight) 的核心 API 接口。涵盖接口地址、请求参数、全局区域配置、响应数据结构(Response Schema)深度解析、4K/UHD 高清原图拼接规则,以及 Spotlight V3 与 V4 版本的演进对比与技术参考。


1. Bing Daily Wallpaper API#

微软必应搜索首页的每日壁纸归档接口,支持获取当天及往期历史壁纸(最多支持回溯最近 7~8 天)。

1.1 接口端点与 cURL 请求 (Endpoint)#

curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=8"

1.2 请求参数说明 (Request Parameters)#

参数

类型

必填

默认值

说明

format

string

是

js

响应数据格式。可选值:js(返回 JSON)或 xml(返回 XML 载荷)。

idx

integer

否

0

日期偏移量(相对于当天)。0 表示当天壁纸,1 表示昨天,依次类推递增回溯历史归档(最大支持到 7 或 8)。

n

integer

否

1

单次请求返回的壁纸数量。单次调用上限为 8。

mkt

string

否

-

可选的市场与语言区域代码(如 zh-CN、en-US、ja-JP 等)。不同国家与地区的每日壁纸和版权说明存在地域差异。


1.3 响应数据示例 (Response Example)#

{
  "images": [
    {
      "startdate": "20261030",
      "fullstartdate": "202610300700",
      "enddate": "20261031",
      "url": "/th?id=OHR.AutumnCranes_EN-US9795571462_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp",
      "urlbase": "/th?id=OHR.AutumnCranes_EN-US9795571462",
      "copyright": "Sandhill cranes, Bosque del Apache National Wildlife Refuge, New Mexico, USA (© Terry St.Louis/Getty Images)",
      "copyrightlink": "https://www.bing.com/search?q=Sandhill+Cranes&form=hpcapt&filters=HpDate%3a%2220261030_0700%22",
      "title": "Time to fly high",
      "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20261030_AutumnCranes%22&FORM=HPQUIZ",
      "wp": true,
      "hsh": "5d23d8ca2501c88990d08bf23b12dd87",
      "drk": 1,
      "top": 1,
      "bot": 1,
      "hs": []
    }
  ],
  "tooltips": {
    "loading": "Loading...",
    "previous": "Previous image",
    "next": "Next image",
    "walle": "This image is not available to download as wallpaper.",
    "walls": "Download this image. Use of this image is restricted to wallpaper only."
  }
}

1.4 响应字段深度解析 (Response Breakdown)#

响应顶层包含两个核心对象:images 数组与 tooltips 交互文案对象。

images[] 核心字段说明#

字段名称

类型

说明与技术细节

startdate

string

壁纸生效起始日期(格式:YYYYMMDD,如 "20261030")。

fullstartdate

string

壁纸生效完整时间戳,精确到分钟(格式:YYYYMMDDHHmm,如 "202610300700")。

enddate

string

壁纸展示截止日期(格式:YYYYMMDD,如 "20261031")。

url

string

默认 1080P 分辨率壁纸的相对路径(如 /th?id=..._1920x1080.jpg...)。拼接完整地址需在前方加上主域名 https://www.bing.com。

urlbase

string

壁纸的基础相对 URL(去除了特定分辨率与图片后缀)。可用于自由拼接多种分辨率与 4K 超高清版本。

copyright

string

壁纸标题、拍摄地点以及摄影师/图片库的完整版权说明。

copyrightlink

string

点击必应主页右下角版权信息时触发的搜索跳转完整 URL。

title

string

壁纸短标题或主题名称(如 "Time to fly high")。

quiz

string

该每日壁纸关联的必应趣味知识问答(Homepage Quiz)搜索相对链接。

wp

boolean

壁纸版权授权状态(Wallpaper Permission)。为 true 表示允许用户下载并作为个人壁纸使用;false 则受限。

hsh

string

图片内容 Hash 标识(MD5 摘要),可用于客户端本地做缓存唯一性对比,避免重复下载。

drk / top / bot

integer

界面对比度与明暗指示标记(1 或 0)。用于指导客户端在壁纸上方或下方绘制文字/图标时采用深色还是浅色模式,确保可读性。

hs

array

首页交互热点(Hotspots)数组,包含壁纸上可点击的交互提示浮层坐标与说明文字。

tooltips 字段说明#

包含必应首页轮播组件与交互提示的多语言本地化文案:

  • loading:图片加载中文本(如 "Loading...")。

  • previous / next:切换上一张/下一张的按钮提示。

  • walle:当 wp: false 时弹出的禁止下载提示文案。

  • walls:当 wp: true 时的合规下载提示文案。

💡 获取 4K / UHD 超高清壁纸的技巧#

通过接口返回的 urlbase,可以自行组合高规格分辨率:

  • 4K 超高清 (UHD):https://www.bing.com + urlbase + _UHD.jpg

  • 1080P 全高清:https://www.bing.com + urlbase + _1920x1080.jpg

  • 手机竖屏尺寸:https://www.bing.com + urlbase + _1080x1920.jpg

例如,直接使用 cURL 下载 4K 原图:

curl -O "https://www.bing.com/th?id=OHR.AutumnCranes_EN-US9795571462_UHD.jpg"

2. Windows Spotlight API (V4)#

Windows 11 及更新版本中“Windows 聚焦”(桌面与锁屏壁纸)所依赖的 Iris 服务分发端点。该版本直接分发原生 3840×2160 (4K) 的超高清壁纸资产以及丰富的景点人文背景故事介绍。

2.1 接口端点与 cURL 请求 (Endpoint)#

curl -s "https://fd.api.iris.microsoft.com/v4/api/selection?placement=88000820&bcnt=4&country=US&locale=en-US&fmt=json"

2.2 请求参数说明 (Request Parameters)#

参数

类型

必填

默认/常用值

说明

placement

integer

是

88000820

Windows Iris 服务资产投放场景标识符。88000820 固定表示桌面与锁屏聚焦壁纸容器。

bcnt

integer

否

4

批次数量(Batch Count),指定单次请求返回的壁纸条目数(最大支持 4)。

country

string

是

US

ISO 3166-1 alpha-2 两位大写国家代码,用于定位不同地域的壁纸流。

locale

string

是

en-US

BCP 47 语言与区域格式标签,控制壁纸标题、详细描述及版权信息的本地化语言。

fmt

string

是

json

响应数据序列化格式,固定设为 json。


2.3 环球收割:全球常用区域与语言配置 (Global Configurations)#

Windows Spotlight 根据国家和语言区域分发差异化的壁纸内容与故事说明。常见 query 参数组合如下:

国家/地区

参数配置

中国 (China)

country=CN&locale=zh-CN

美国 (United States)

country=US&locale=en-US

日本 (Japan)

country=JP&locale=ja-JP

英国 (United Kingdom)

country=GB&locale=en-GB

德国 (Germany)

country=DE&locale=de-DE

法国 (France)

country=FR&locale=fr-FR

意大利 (Italy)

country=IT&locale=it-IT

韩国 (South Korea)

country=KR&locale=ko-KR

俄罗斯 (Russia)

country=RU&locale=ru-RU

澳大利亚 (Australia)

country=AU&locale=en-AU

加拿大 (Canada)

country=CA&locale=en-CA


2.4 响应数据示例 (Response Example)#

{
  "batchrsp": {
    "ver": "1.0",
    "items": [
      {
        "item": "{\"f\":\"raf\",\"v\":\"1.0\",\"rdr\":[{\"c\":\"CDMLite\",\"u\":\"DesktopSpotlightSurface\"}],\"ad\":{\"landscapeImage\":{\"asset\":\"https://res.public.onecdn.static.microsoft/creativeservice/8409803f-4105-4dea-4fbc-eac55cf5ba9a_desktop-b025_ds_hedinsfjorduriceland_shutterstock_1448551784_3840x2160.jpg\"},\"portraitImage\":{\"asset\":\"https://res.public.onecdn.static.microsoft/creativeservice/adf4bd2e-e236-f5af-e149-60f1e9de2a4f_desktop-b025_ds_hedinsfjorduriceland_shutterstock_1448551784_1080x1920.jpg\"},\"iconLabel\":\"Learn about this picture\",\"iconHoverText\":\"Héðinsfjörður, Iceland\\r\\n© Khairil Azhar Junos / Shutterstock\\r\\nRight-click to learn more\",\"title\":\"The fjord that got bored\",\"description\":\"It wasn't so long ago that the uninhabited valley of Héðinsfjörður was every bit as isolated as this shot makes it look...\",\"copyright\":\"© Khairil Azhar Junos / Shutterstock\",\"likeGlyph\":\"\",\"dislikeGlyph\":\"\",\"ctaText\":\"Learn more\",\"ctaUri\":\"microsoft-edge:https://www.bing.com/spotlight?spotlightid=DS_HedinsfjordurIceland...\",\"entityId\":\"128000000005952869\"},\"tracking\":{...},\"prm\":{...}}"
      }
    ]
  }
}

2.5 响应数据深度解析 (Response Breakdown)#

⚠️ 关键解析注意事项:序列化 JSON 字符串 (Serialized String)#

外层响应结构定义如下:

  • batchrsp.ver:协议版本,固定为 "1.0"。

  • batchrsp.items:壁纸条目数组。

  • 核心注意点:items[i].item 的值是经过转义的 JSON 字符串,并非内嵌的 JSON 对象!在代码处理时必须执行二次反序列化才能访问其内部字段:

// JavaScript 二次解析示例
const response = await fetch(url).then(r => r.json());
const wallpaperItem = JSON.parse(response.batchrsp.items[0].item);
console.log(wallpaperItem.ad.landscapeImage.asset); // 获取 4K 原图 URL
# Python 二次解析示例
import json, requests

data = requests.get(url).json()
wallpaper_item = json.loads(data["batchrsp"]["items"][0]["item"])
image_url = wallpaper_item["ad"]["landscapeImage"]["asset"]

内层反序列化对象字段说明#

反序列化后得到的对象包含三大模块:ad(壁纸核心内容)、tracking(上报接口)与 prm(投放追踪):

1. ad 对象(核心元数据与壁纸资源)#

字段名称

类型

说明

landscapeImage.asset

string

横屏 4K 超高清原图直接下载链接(分辨率为 3840x2160,由微软 OneCDN 托管)。

portraitImage.asset

string

竖屏高清原图直接下载链接(分辨率为 1080x1920,适合移动设备或竖屏锁屏)。

title

string

壁纸标题(如 "The fjord that got bored")。

description

string

壁纸所呈现景观、历史或生态故事的详细长文本解读(Windows 11 桌面聚焦图标中展示)。

copyright

string

图片拍摄者及图库机构版权标注(如 "© Khairil Azhar Junos / Shutterstock")。

iconLabel

string

界面按钮标签(如 "Learn about this picture")。

iconHoverText

string

鼠标悬浮在聚焦图标上时展示的卡片浮层文本(包含地理名称、版权声明与操作提示)。

ctaText / ctaUri

string

动作引导文案(如 "Learn more")及点击后调起浏览器的自定义协议链接(以 microsoft-edge:https://... 开头)。

entityId

string

当前壁纸创意实体的全网唯一识别 ID。

relatedContent

array

关联内容推荐列表,包含 Microsoft Copilot 针对该景点的提问引导、必应图库探索入口等。

relatedHotspots

array

画面热点探究浮层列表,提供更丰富的互动提示。

2. tracking 与 prm 对象(遥测与展示投放)#
  • tracking.baseUri:客户端用户交互(喜欢、不喜欢、点击详情)的行为遥测打点模板 URL。

  • prm._imp:曝光(Impression)上报链接,Windows 客户端在成功渲染壁纸后向 MSN/Iris 节点发送回执。

  • prm._id / prm.CID / prm.BID:微软广告投放系统与聚焦内容的分发批次识别号。


Reference#


  1. Bing 官方主页

  2. Dynamic Theme - Free download and install on Windows | Microsoft Store

  3. bing-desktop-wallpaper-changer/README.md at master · utkarshgpta/bing-desktop-wallpaper-changer

  4. Spotlight-Downloader/SpotlightAPI.md at master · ORelio/Spotlight-Downloader