cd /news/ai-tools/bing-search-api-replacement-scrape-s… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-19130] src=dev.to pub= topic=ai-tools verified=true sentiment=Β· neutral

Bing Search API Replacement: scrape SERP results for $1.05/1K

Microsoft retired the Bing Search API on August 11, 2025, leaving thousands of teams without an official endpoint for organic search results. A developer built an Apify Actor that scrapes Bing's public HTML SERP endpoint directly, decoding redirect wrappers and returning clean typed rows at a cost of roughly $1.05 per 1,000 queries. The scraper handles TLS fingerprint rotation, residential proxy routing, and pagination automatically, filling the gap left by Microsoft's retirement of the Bing Web Search API v7.

read8 min publishedMay 31, 2026

Quick answer:Microsoft retired the Bing Search API on August 11, 2025. There is no longer an official endpoint. ABing search scraperhits the samewww.bing.com/search

HTML endpoint any browser hits, decodes thebing.com/ck/a

redirect wrappers to canonical URLs, and returns clean typed rows β€” query, position, title, URL, snippet, country, language, timestamp. The Apify Actor below costs$0.001 per row(~$1.05 per 1,000), with TLS fingerprint rotation, residential proxy routing, and Bing's pagination handled for you.

Microsoft's retirement notice landed on August 11, 2025, and thousands of teams who had wired Bing SERP data into rank trackers, brand-monitoring dashboards, and RAG pipelines found themselves holding a dead api.bing.microsoft.com

call. The official replacement β€” "Grounding with Bing Search" inside Azure AI β€” is gated behind an Azure subscription and priced for LLM workflows, not raw SERP pulls. SerpApi and DataForSEO fill the gap at $75–225/month. DIY means debugging redirect wrappers at 11pm.

This post covers where a naive scraper breaks and how I packaged the fix as a cheap Apify Actor.

Bing is Microsoft's web search engine. For SEO practitioners it matters because its ranking signals diverge from Google's β€” it weights on-page keyword density and anchor text differently, surfaces more forum content, and runs its own crawler (bingbot

) with independent crawl frequency. For AI and RAG applications, Bing's index includes different long-tail pages than Google's; an LLM agent that only queries one engine has blind spots the other would fill.

The SERP itself β€” www.bing.com/search?q=<query>

β€” is a server-rendered HTML page. It returns 10 organic <li class="b_algo">

blocks per page, paginated via &first=0,10,20,...

. Everything the old API gave you (titles, URLs, snippets) is in that HTML.

No β€” as of August 11, 2025, Microsoft has no official API for Bing organic search results. The Bing Web Search API v7 was retired on that date. The Azure AI "Grounding with Bing Search" product is a different surface, gated to the Azure OpenAI workflow and not available as a standalone SERP endpoint for arbitrary queries.

The only programmatic path to Bing SERP data is the public HTML endpoint the browser hits β€” which is what this Actor uses.

Each organic result becomes one flat, Pydantic-validated row. Every field is verified against the ResultRow

model in src/models.py

before it reaches your dataset β€” no positional-array guessing, no silent null promotion:

{
  "query": "bing search api replacement",
  "position": 1,
  "title": "Bing Search Scraper β€” SERP organic results to JSON",
  "url": "https://apify.com/DevilScrapes/bing-search-scraper",
  "displayed_url": "https://apify.com β€Ί DevilScrapes β€Ί bing-search-scraper",
  "snippet": "Drop-in replacement for the retired Bing Search API. Returns title, URL, snippet, position for any query and locale.",
  "country": "US",
  "language": "en",
  "scraped_at": "2026-05-16T13:40:00.000Z"
}

Nine fields. The url

is always the canonical destination β€” never a bing.com/ck/a

redirect wrapper. The displayed_url

is the breadcrumb Bing renders on screen. position

is 1-indexed across all paginated pages, so position 11 is the first result on page 2 β€” no off-by-one math on your side.

The SERP is just HTML, so the obvious path looks like:

import requests
from parsel import Selector

resp = requests.get("https://www.bing.com/search", params={"q": "bing api replacement"})
sel = Selector(text=resp.text)
for li in sel.css("li.b_algo"):
    print(li.css("h2 a::text").get())

This will fail in production. Three reasons, and they are why a hosted Actor earns its keep:

1. TLS fingerprint inspection. Bing inspects the JA3/JA4 signature of your TLS handshake. Python's stdlib ssl

, requests

, and httpx

emit fingerprints no real browser produces β€” the server returns 403

before reading the query string. We route every request through curl-cffi's

AsyncSession

, impersonating Chrome 131, Chrome 124, or Firefox 147 TLS + HTTP/2 SETTINGS frames at the socket level, rotating profiles per page to reduce burst correlation.2. The bing.com/ck/a redirect wrapper. Every organic

href

is a click-tracking redirect of the form https://www.bing.com/ck/a?...&u=a1<base64url>...

. A naive parser hands you that wrapper, which joins to nothing downstream. We decode the u=a1<base64url>

on every href β€” the url

field in your dataset is always the canonical destination.3. Proxy continuity across pagination. Bing serves 10 results per page. Rotating proxies mid-query degrades results: fewer organic blocks, more ads, eventually empty pages. We thread Apify residential proxies with a stable session_id

per query's page-burst, then rotate on the next query. On 429

/503

we retry with exponential backoff (2s β†’ 4s β†’ ... capped at 30s, max 5 attempts, honouring Retry-After

). A query that exhausts retries doesn't abort the run β€” partial success surfaces via status message.

The result is packaged as an Apify Actor: ** Bing Search Scraper**.

Run it from the Apify Console by pasting your queries into the input form, or call it programmatically:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("DevilScrapes/bing-search-scraper").call(
    run_input={
        "queries": [
            "bing search api replacement",
            "bing serp scraper",
            "scrape bing results python",
        ],
        "country": "US",
        "language": "en",
        "maxResultsPerQuery": 30,
        "useProxy": True,
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["position"], item["url"], item["snippet"])

Input parameters:

Field Type Default Notes
queries
string[] required One row emitted per (query Γ— result)
country
string US
ISO-3166-1 alpha-2, passed as cc=
language
string en
ISO-639-1, passed as setlang=
maxResultsPerQuery
int 1–100 30
Capped at 100; Bing quality degrades past ~page 5
useProxy
bool true
Apify residential proxy; strongly recommended

The output streams to the default dataset as the scrape progresses β€” you can read partial results before the run finishes.

Bing Search API migration. If you have any Python code calling api.bing.microsoft.com

, it is dead. The Actor's input and output map to the same logical shape: queries in, ranked organic results out. The migration work is replacing the client call, not re-architecting the downstream.

SEO rank tracking across locales. Run the same query list with country=US

, country=GB

, country=DE

on a weekly schedule and chart position drift over time. Locale-specific Bing rank tracking is hard to buy β€” most tools are Google-first.

Brand monitoring. Pull the top 30 results for branded queries and alert when a new domain enters the top 10. At 100 queries Γ— 30 results that is 3,000 rows per run β€” $3.05 total including the actor-start fee.

AI agent retrieval / RAG diversification. LangChain's BingSearchAPIWrapper

and LlamaIndex's BingToolSpec

both called the now-dead endpoint. An Apify Actor call is the drop-in. Bing's index skews toward forum content and long-tail pages where Google's top results are SEO-dominated β€” the diversification is real.

Pay-per-event. You pay only for rows that land in your dataset. No data, no charge (beyond the warm-up fee).

Event Rate (USD) When
actor-start
$0.05 Once per run
result-row
$0.001 Per organic SERP row pushed
Pull Cost
100 rows $0.15
300 rows (10 queries Γ— 30) $0.35
1,000 rows $1.05
3,000 rows (100 queries Γ— 30) $3.05
10,000 rows $10.05

Apify's free $5 trial credit covers roughly 4,950 rows β€” no credit card required. For comparison, SerpApi's entry plan runs $75/month, and DataForSEO requires a separate account plus API key management. This Actor undercuts on simplicity and price by going direct to Bing's HTML endpoint.

The redirect decoder is the technically non-obvious piece. Bing wraps every organic href

in bing.com/ck/a?!&&p=<hash>&u=a1<base64url>...

. The u=

parameter carries the destination URL prefixed with a1

and encoded as URL-safe base64:

import base64, re

def decode_bing_href(href: str) -> str:
    match = re.search(r"[?&]u=a1([A-Za-z0-9_-]+)", href)
    if not match:
        return href  # already canonical
    return base64.urlsafe_b64decode(match.group(1) + "==").decode("utf-8", errors="replace")

Bing has kept this format stable since at least 2023, but it's the detail that causes a naive scraper to silently fill your dataset with bing.com/ck/a

junk that joins to nothing. Every URL is decoded before it reaches the dataset.

is_featured

flag.b_algo

blocks appear as regular rows; v1 has no way to distinguish them.Is scraping Bing search results legal?

The Actor sends well-formed HTTP requests to the same public, unauthenticated page any browser accesses β€” no authentication bypass, no paywall, no personal data. Comply with Bing's Terms of Service and your jurisdiction's applicable law.

Can I export results to Google Sheets or a data warehouse?

Yes β€” download CSV, Excel, JSON, or XML from the Apify Console Export button, or use the ACTOR.RUN.SUCCEEDED

webhook to push the dataset into Make, Zapier, or n8n. Raw API access via the Apify Dataset API.

Is there still an official Bing search API?

No. The Bing Web Search API v7 was retired August 11, 2025. Azure AI "Grounding with Bing Search" is a different surface β€” an LLM-workflow integration, not a raw SERP endpoint for arbitrary queries.

Why are the redirect URLs always decoded?

The bing.com/ck/a?...&u=a1<base64url>

wrapper carries no information your workflow can use. Canonical URLs join cleanly with any URL-keyed dataset. The decode is always on; there is no option to keep the raw wrapper.

The Actor is live on the Apify Store: ** apify.com/DevilScrapes/bing-search-scraper**.

Free $5 trial credit, no credit card. Paste bing search api replacement

as your first query and you'll have 30 ranked results in your dataset in under a minute. Building something on top β€” a rank tracker, a brand-monitoring webhook, a RAG pipeline? Drop the use case in the comments. If there's a feature the README doesn't cover (PAA boxes, news vertical, location targeting), that's how v2 gets scoped.

Built by Devil Scrapes β€” Apify Actors with attitude. Pay-per-event, transparent pricing, no junk fields. 😈

── more in #ai-tools 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/bing-search-api-repl…] indexed:0 read:8min 2026-05-31 Β· β€”