# A self-hosted alternative to the Bing and Google search APIs

By Das Digitale Momentum, published 2026-11-04

Microsoft retired the Bing Search APIs on August 11, 2025, and Google has closed the Custom Search JSON API to new customers; existing customers have until January 1, 2027. This page shows how to replace both with a self-hosted SearXNG instance and searxNcrawl, and where that replacement falls short.

## What changed for Bing and Google

| API | Status | What the vendor names |
| --- | --- | --- |
| Bing Search APIs | Retired on August 11, 2025; existing instances decommissioned, no new sign-ups | Grounding with Bing Search as part of Azure AI Agents |
| Google Custom Search JSON API | Closed to new customers; discontinued on January 1, 2027 | No successor named on the overview page |

Dates as published by [Microsoft](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement) and [Google](https://developers.google.com/custom-search/v1/overview), fact-checked on 2026-11-04. Until the shutdown, Google keeps 100 free queries a day for existing customers and charges $5 per 1,000 more, up to 10,000 a day.

Both APIs returned what many tools were built around: a list of results with title, address and snippet for a query. The successor Microsoft names works differently. [Grounding with Bing Search](https://learn.microsoft.com/en-us/azure/ai-services/agents/how-to/tools/bing-grounding) is a tool inside Azure AI Agents that lets an agent draw on web results when it answers; according to its documentation, developers and end users have no access to the raw content it returns, and the answer carries citations instead. Teams whose code expects a result list need another source for it.

For existing code the consequences differ. Calls to the Bing Search APIs no longer get answers, since every instance has been decommissioned. Code on the Google Custom Search JSON API keeps working for existing customers until January 1, 2027 and stops then. That leaves time to migrate with care: run the queries your product depends on against the replacement, compare the results with what the old API returned, and switch once they are good enough for your users.

## What a self-hosted replacement looks like

[SearXNG](https://docs.searxng.org/) is an open-source metasearch engine. It forwards a query to many search engines, merges their answers and returns them as JSON once that format is enabled. Run your own instance and you get a search endpoint with no API key, no account and no fee per query; the [SearXNG JSON API guide](https://www.searxncrawl.io/searxng-json-api/) sets one up in three steps.

searxNcrawl sits on top of that instance. It is an MCP server and a CLI that searches through SearXNG and, opt-in, the You.com search API, and it crawls the result pages to Markdown. Code that called Bing or Google directly talks to SearXNG; agents that used a search tool talk to searxNcrawl.

The replacement is not one product for another. It moves the search endpoint onto your own hardware, and with it the responsibility for keeping the instance running, private and current.

## Map the request parameters

| Purpose | Bing Web Search v7 | Google Custom Search | SearXNG |
| --- | --- | --- | --- |
| Query | `q` | `q` | `q` |
| Paging | `count` and `offset` | `num` and `start` | `pageno` |
| Language or market | `mkt` | `lr` | `language` |
| Safe search | `safeSearch` | `safe` | `safesearch` |
| Age of results | `freshness` | `dateRestrict` | `time_range` |
| Result list | `webPages.value` | `items` | `results` |
| Title, address, snippet | `name`, `url`, `snippet` | `title`, `link`, `snippet` | `title`, `url`, `content` |

Parameter names as documented in the [Bing query parameters](https://learn.microsoft.com/en-us/previous-versions/bing/search-apis/bing-web-search/reference/query-parameters) and [response objects](https://learn.microsoft.com/en-us/previous-versions/bing/search-apis/bing-web-search/reference/response-objects), the [Google list method](https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list) and [result resource](https://developers.google.com/custom-search/v1/reference/rest/v1/Search), and the [SearXNG search API](https://docs.searxng.org/dev/search_api.html).

SearXNG has no parameter for the number of results: each page holds what the engines returned, in our test 26 results for the first page. Paging moves by whole pages, so code that asked Bing for `offset=20` asks SearXNG for the next `pageno`. `time_range` takes day, month or year, coarser than the date ranges Google accepted.

Bing also sold separate APIs for news, images and videos. SearXNG answers these from the same endpoint: `categories=news`, `images` or `videos` selects the engines of that category, and the results carry the same fields plus what the category adds, such as an image address. One instance therefore replaces several Bing endpoints, with one set of parameters for all of them.

## A small adapter

For code that expects the field names of Google, a few lines translate the answer. This example uses curl and jq against a local instance; the same mapping works in any language:

```
curl -s 'http://localhost:8888/search?q=model+context+protocol&format=json&pageno=1&language=en' \
  | jq '[.results[] | {title, link: .url, snippet: .content}]'
```

In our run this returned 26 objects with `title`, `link` and `snippet`, the first one the introduction of the Model Context Protocol. Keep the `engines` field of each SearXNG result if you want to know which engines found it, and read `unresponsive_engines` to see which ones failed for the query.

Handle the empty case on purpose. When every engine fails for a query, SearXNG still answers 200, with an empty `results` list and the reasons in `unresponsive_engines`. Treat that combination as a temporary error and retry later, instead of telling a user that the web has nothing on the topic. An empty list with no failed engines is a real empty answer.

## Where SearXNG falls short

- No service guarantee: SearXNG asks other search engines, and an engine can rate-limit or challenge your instance at any time. The other engines still answer, so results get thinner rather than stopping.
- No licensed index: results come from the engines your instance queries, and whether automated queries are allowed is set by the terms of each engine.
- Results differ: rankings merge several engines, so they will not match what Bing or Google returned for the same query.
- Operations are yours: updates of the image, the secret key, access control and the limiter.

For high volumes, contractual terms or a support line, a commercial search API fits better. The [comparison with Tavily, Exa and Brave Search](https://www.searxncrawl.io/tavily-exa-brave-alternative/) covers the hosted search APIs that agents use through MCP. SearXNG fits when a team wants search without accounts and accepts running one more container.

## Connect it to AI agents

Agents that used Bing or Google through a search tool get the same through searxNcrawl. Point `SEARXNG_URL` at your instance and run `uvx searxncrawl setup` to register it with Claude Code, Codex, Gemini CLI, Cursor, VS Code and Claude Desktop:

```
uvx searxncrawl setup
```

The `search` tool returns title, address, snippet and the providers that found each result, and with `include_content=true` it also crawls every result page to Markdown, which saves the agent a second round of requests. The [SearXNG MCP server page](https://www.searxncrawl.io/searxng-mcp-server/) lists every option and client.

## How we tested this page

We ran the adapter above on 2026-11-04 against SearXNG 2026.9.15 in Docker, set up as in the [JSON API guide](https://www.searxncrawl.io/searxng-json-api/), together with a query to one rate-limited engine, which answered 200 with no results and the reason in `unresponsive_engines`, and queries in the news and images categories. The dates and parameter names come from the pages of Microsoft and Google linked above. Bing, Microsoft and Google are trademarks of their owners; searxNcrawl is not affiliated with them.

We reviewed these facts on 2026-11-04 against the linked sources. Our [editorial and corrections policy](https://www.searxncrawl.io/about/#editorial) says how we keep them current and fix errors.

## Frequently asked questions

### When does the Google Custom Search JSON API shut down?

Google discontinues it on January 1, 2027, and it is no longer available to new customers. Until then, existing customers keep 100 free queries a day and pay $5 per 1,000 more, up to 10,000 a day, according to the overview page of Google.

### What replaced the Bing Search API?

Microsoft retired the Bing Search APIs on August 11, 2025 and points customers to Grounding with Bing Search in Azure AI Agents, which lets an agent use Bing results when it writes an answer. For a plain list of links and snippets, a self-hosted SearXNG instance is the closest replacement.

### Is SearXNG a drop-in replacement for the Bing or Google search API?

No. SearXNG has its own parameters and JSON format, so client code needs a small adapter, and it queries other search engines instead of offering a licensed index, which brings rate limits and no service guarantee.

### How do I move Bing or Google API calls to SearXNG?

Send the query as `q`, the page as `pageno` and the language as `language`, then read `title`, `url` and `content` from `results` instead of the `webPages.value` of Bing or the `items` of Google.

Updated: 2026-11-04

---

Source: <https://www.searxncrawl.io/bing-google-search-api-alternative/>
