Skip to the page

Bing Search API in Python

The v7 call that still answers.

Microsoft retired the Bing Search APIs on August 11, 2025, so the Python samples that call api.bing.microsoft.com no longer get an answer. Its replacement, Grounding with Bing Search, gives developers no raw results.

SpecStream answers the same GET /v7.0/search in Bing's JSON. In Python, set the address to https://api.specstream.ai/v7.0/search and put a SpecStream key in Ocp-Apim-Subscription-Key.

It scores 97.9 F-score on all 1,000 SimpleQA Verified questions, on the benchmarks page. Searches cost $5 per 1,000.

New accounts get $10 of credit, no card. It covers 2,000 searches.

The v7 call from Python: SpecStream, Bing and Grounding with Bing Search

SpecStreamBing Web Search API v7Grounding with Bing Search
The callGET https://api.specstream.ai/v7.0/search with the key in Ocp-Apim-Subscription-KeyGET https://api.bing.microsoft.com/v7.0/search with the key in Ocp-Apim-Subscription-KeyA tool an agent calls in Azure AI Agents, while a model writes its response
Status on Nov 10, 2026Live. New accounts start with $10 of credit, no cardRetired on August 11, 2025. Every existing instance was decommissioned and new customer signup endedMicrosoft's named replacement for the Bing Search APIs
What Python readswebPages.value[] with id, name, url, displayUrl, snippet and datePublished when known, webPages.totalEstimatedMatches, queryContext and rankingResponsewebPages.value with name, url and snippet for each resultA model's response with citations. Developers and end users have no access to the raw content it returns
Results a callcount from 1 to 50, 10 by defaultcount defaulted to 10, with a maximum of 50count defaults to 5, with a maximum of 50
Paging and datesoffset from 0 to 10,000. freshness takes Day, Week, Month, a date range or one dateoffset was the zero-based number of results to skip. freshness filtered by ageThe model might not use every result
Price$5 per 1,000 searches of up to 10 results. count=50 costs $0.029 a callRetired. The product is no longer available for new customer signup$14 per 1,000 transactions, counted by the number of tool calls per run
VolumeNo daily limit. Up to 8,800 searches a minute on one account; a call over that gets a 429 with Retry-After and is not chargedNo calls since August 11, 2025150 transactions per second and 1 million transactions a day

Why Python code that called Bing moves to SpecStream

Other options for Bing Search in Python

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to run the Python example

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Put it in the environment and install requests.

export SPECSTREAM_API_KEY="your key"
pip install requests

3. Run the example above. In code that called Bing, change https://api.bing.microsoft.com/v7.0/search to https://api.specstream.ai/v7.0/search and the key. The parser stays.

When your product needs every match in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

Frequently asked questions

Something we didn't answer? Talk to a human

How do I use the Bing Search API in Python?
Send GET /v7.0/search with q and count and the key in Ocp-Apim-Subscription-Key, then read webPages.value[]. Microsoft retired its endpoint on August 11, 2025, and the same call answers at https://api.specstream.ai/v7.0/search with a SpecStream key.
Does the Microsoft Python sample still work?
Not against api.bing.microsoft.com, which was decommissioned on August 11, 2025. Change search_url to https://api.specstream.ai/v7.0/search and the key, and the rest of the sample runs as written.
Do I need an Azure SDK?
No. The call is one HTTP GET, so requests is enough. Each call of up to 10 results costs $0.005.
How do I get more than 10 results?
Set count up to 50 for one call, which costs $0.029, and page with offset. On the same key, GET https://api.specstream.ai/v1/web-search returns up to 100 results in one search.
Why does my code get a KeyError on webPages?
A search with 0 results has no webPages key, as on Bing. Read it with data.get("webPages", {}).get("value", []), as the examples here do.
What does it cost compared with Grounding with Bing Search?
$5 per 1,000 searches at SpecStream against $14 per 1,000 transactions for Grounding with Bing Search. Every SpecStream rate is on the pricing page.

Sources

SpecStream wrote this page. Each figure about Bing comes from Microsoft's own pages, and each other figure from that company's own page.

  1. Microsoft: Bing Search APIs retiring on August 11, 2025learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement, read Nov 9, 2026
  2. Microsoft: Bing Web Search API Python quickstartlearn.microsoft.com/en-us/bing/search-apis/bing-web-search/quickstarts/rest/python, read Nov 9, 2026
  3. Microsoft: Bing Web Search API query parameterslearn.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/query-parameters, read Nov 9, 2026
  4. Microsoft: Bing Web Search API response objects (archived)learn.microsoft.com/en-us/previous-versions/bing/search-apis/bing-web-search/reference/response-objects, read Nov 9, 2026
  5. Microsoft: Grounding with Bing pricingmicrosoft.com/en-us/bing/apis/grounding-pricing, read Nov 9, 2026
  6. Microsoft: Grounding with Bing Search toolslearn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/bing-tools, read Nov 9, 2026
  7. Brave Search APIbrave.com/search/api/, read Nov 9, 2026
  8. SerpApi pricingserpapi.com/pricing, read Nov 9, 2026
  9. Tavily pricingtavily.com/pricing, read Nov 9, 2026
  10. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  11. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  12. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026