# Bing Engines — SearXNG Documentation (2024.5.4+dbed8da28)

# Bing Engines

## Bing WEB

This is the implementation of the Bing-WEB engine. Some of this implementations are shared by other engines:

- Bing Images

- Bing News

- Bing Videos

On the preference page Bing offers a lot of languages an regions (see section LANGUAGE and COUNTRY/REGION). The Language is the language of the UI, we need in SearXNG to get the translations of data such as “published last week”.

There is a description of the offical search-APIs, unfortunately this is not the API we can use or that bing itself would use. You can look up some things in the API to get a better picture of bing, but the value specifications like the market codes are usually outdated or at least no longer used by bing itself.

The market codes have been harmonized and are identical for web, video and images. The news area has also been harmonized with the other categories. Only political adjustments still seem to be made – for example, there is no news category for the Chinese market.

searx.engines.bing.fetch_traits(engine_traits: EngineTraits )

  Fetch languages and regions from Bing-Web.

searx.engines.bing.request(query, params)

  Assemble a Bing-Web request.

searx.engines.bing.base_url = 'https://www.bing.com/search'

  Bing (Web) search URL

searx.engines.bing.max_page = 200

  200 pages maximum (`&first=1991`)

searx.engines.bing.safesearch = True

  Bing results are always SFW. To get NSFW links from bing some age verification by a cookie is needed / thats not possible in SearXNG.

## Bing Images

Bing-Images: description see `searx.engines.bing`.

searx.engines.bing_images.request(query, params)

  Assemble a Bing-Image request.

searx.engines.bing_images.response(resp)

  Get response from Bing-Images

searx.engines.bing_images.base_url = 'https://www.bing.com/images/async'

  Bing (Images) search URL

## Bing Videos

Bing-Videos: description see `searx.engines.bing`.

searx.engines.bing_videos.request(query, params)

  Assemble a Bing-Video request.

searx.engines.bing_videos.response(resp)

  Get response from Bing-Video

searx.engines.bing_videos.base_url = 'https://www.bing.com/videos/asyncv2'

  Bing (Videos) async search URL.

## Bing News

Bing-News: description see `searx.engines.bing`.

Hint

Bing News is different in some ways!

searx.engines.bing_news.fetch_traits(engine_traits: EngineTraits )

  Fetch languages and regions from Bing-News.

searx.engines.bing_news.request(query, params)

  Assemble a Bing-News request.

searx.engines.bing_news.response(resp)

  Get response from Bing-Video

searx.engines.bing_news.base_url = 'https://www.bing.com/news/infinitescrollajax'

  Bing (News) search URL

searx.engines.bing_news.paging = True

  If go through the pages and there are actually no new results for another page, then bing returns the results from the last page again.

searx.engines.bing_news.time_map = {'day': 'interval="4"', 'month': 'interval="9"', 'week': 'interval="7"'}

  A string ‘4’ means last hour. We use last hour for `day` here since the difference of last day and last week in the result list is just marginally. Bing does not have news range `year` / we use `month` instead.