Skip to content


Repository files navigation

Bing Wallpaper API

A RESTful API to fetch daily wallpaper from




  • resolution The resolution of wallpaper image. 1920 is the default value, you can also use 1366 and 3840(4K resolution).
  • format The response format, can be json or image. If response format is set as image, you will be redirected to the wallpaper image directly.
  • image_format The format of the wallpaper image, available values are jpg or webp. The default value is jpg.
  • index The index of wallpaper, starts from 0. By default, 0 means to get today's image, 1 means to get the image of yesterday, and so on. Or you can specify it as random to choose a random index between 0 and 7.
  • mkt The region parameter, the default value is zh-CN, you can also use en-US, ja-JP, en-AU, en-GB, de-DE, en-NZ, en-CA. You can also set it as random to choose the region randomly.


  • Request
  • Response
  "start_date": "20181118",
  "end_date": "20181119",
  "url": "",
  "copyright": "锡安国家公园内的维尔京河,美国犹他州 (© Justinreznick/Getty Images)",
  "copyright_link": "\\u0026form=hpcapt\\u0026mkt=zh-cn"

CSS background image

You can also use this API to set CSS background image:

background-image: url(;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;


Run with docker

Get the latest version of docker image:

docker pull timothyye/bing:latest

Start the container with the image name & tag (YYYYMMDD or latest), for example:

docker run -d --name=bing-wallpaper --restart=always -p 9000:9000 timothyye/bing:latest

For development

Build it

git clone
make build

Run it

bw/bw run