# Bing Web Search v7

> Keep code written for the retired Bing Web Search API v7 working by pointing its endpoint at Search1API's Bing engine.

Canonical URL: https://s1.dev/docs/compatibility/bing

Microsoft retired the Bing Search APIs on August 11, 2025. Search1API answers the v7 web, news and image search endpoints, backed by its Bing engine:

| Bing v7 | Search1API |
| --- | --- |
| `https://api.bing.microsoft.com/v7.0/search` | `https://api.search1api.com/compat/bing/v7.0/search` |
| `https://api.bing.microsoft.com/v7.0/news/search` | `https://api.search1api.com/compat/bing/v7.0/news/search` |
| `https://api.bing.microsoft.com/v7.0/images/search` | `https://api.search1api.com/compat/bing/v7.0/images/search` |

Send your Search1API key in the `Ocp-Apim-Subscription-Key` header, as Bing clients do. `Authorization: Bearer` also works.

For the migration overview and configuration changes, see [Migrate from Bing v7](https://s1.dev/compatible-apis/bing).

## Configure your client

<Tabs items={['Open WebUI', 'LangChain', 'curl']}>

<Tab value="Open WebUI">

Choose **bing** as the web search engine and set:

```bash
BING_SEARCH_V7_ENDPOINT="https://api.search1api.com/compat/bing/v7.0/search"
BING_SEARCH_V7_SUBSCRIPTION_KEY="YOUR_API_KEY"
```

</Tab>

<Tab value="LangChain">

```python
from langchain_community.utilities import BingSearchAPIWrapper

search = BingSearchAPIWrapper(
    bing_subscription_key="YOUR_API_KEY",
    bing_search_url="https://api.search1api.com/compat/bing/v7.0/search",
    k=5,
)
results = search.results("hono cloudflare workers", 5)
```

</Tab>

<Tab value="curl">

```bash
curl "https://api.search1api.com/compat/bing/v7.0/search?q=hono+workers&count=5" \
  -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"
```

</Tab>

</Tabs>

Other clients that take a Bing endpoint, such as Semantic Kernel's Bing connector or Dify's Bing tool, take the same URL.

## Parameters

| Parameter | Behavior |
| --- | --- |
| `q` | Required. |
| `count` | Default `10` for web and news and `35` for images, up to `50`. |
| `offset` | Number of results to skip, as in Bing. |
| `mkt`, `setLang` | Primary language of the results, for example `en` from `en-US`. An empty value means no filter. |
| `freshness` | `Day`, `Week`, `Month`, or a `YYYY-MM-DD..YYYY-MM-DD` range, converted to the shortest of day, week, month or year that covers it. |

`safeSearch`, `responseFilter`, `textDecorations`, `textFormat`, `answerCount`, `promote` and `cc` are ignored. Snippets are plain text without hit highlighting, even when `textDecorations` is set.

## Response

- **Web search** returns `_type: "SearchResponse"`, `queryContext.originalQuery` and `webPages.value`, where each page has `id`, `name`, `url`, `displayUrl`, `snippet` and, when known, `datePublished`. Only `webPages` is returned; the `news`, `images`, `relatedSearches` and `rankingResponse` sections are not.
- **News search** returns `_type: "News"` and `value`, where each article has `name`, `url`, `description`, `datePublished` and `provider` (the site's host name).
- **Image search** returns `_type: "Images"` and `value`, where each image has `contentUrl` and `thumbnailUrl`. `hostPageUrl` is the image URL, because the page an image appears on is not known.

`totalEstimatedMatches` is `offset` plus the number of results returned, not an estimate of all matches. A client that pages until it reaches `totalEstimatedMatches` stops after the last full page.

News search requires `q`; requests without a query, which return top stories in Bing, return `400`.

## Credits

Each request costs 1 credit, the price of a native search.

## Errors

Errors return `{ "_type": "ErrorResponse", "errors": [{ "code": "…", "message": "…" }] }` with the status code. Codes are `InvalidRequest` (400), `InvalidAuthorization` (401), `InsufficientAuthorization` (402, 403), `RateLimitExceeded` (429) and `ServerError`.