Bing is famous for having some great pictures updated on a daily basis depending on the region where the search is performed. The official Bing (search) app for Windows Phone does exactly the same thing. I was wondering how it is possible to get those images. Initially, I thought about doing a request to http://bing.com and reading the resulting HTML, but then I found out that there is an official dedicated web service that allows downloading any Bing images up to 6 days back, from any supported region.
The service I am talking about was discovered when I was analyzing the outgoing traffic from the search app. The service URL is the following:
Let’s look at the useful parameters.
- dateOffset – here is where you specify what image to obtain, relative to the current date. If it is 0, the image returned will be the one assigned for today for the current region. This parameter accepts negative values up to –6 (6 days back).
- orientation – set the image resolution. The default is 480×800, but you can also set it to 1024×768 and 800×480 (landscape mode – thanks to Dejan Minic for mentioning this) .
- mkt – the region, for which the image should be obtained. Examples: en-GB, fr-FR.
That’s all you need to consider for now. Keep the OS identifiers in place, because some parameters are required, even if the value is not directly used.