Multiple search engines, one API: Merge results
Need multiple search engines with one API? Send one POST with an engines list to query Google, Bing and DuckDuckGo, then merge results. Get working code.
- search api
- serp api
- bing
- duckduckgo
On this page
- What multiple search engines, one API actually does
- The alternatives put the work on you
- Why one engine isn’t enough
- What fields does each row in a merged search response have?
- How do you tell a blocked engine from zero results?
- Search controls that work the same across multiple search engines in one API
- How to merge multiple search engines in one API response
- Build or buy: which access layer fits multi-engine search?
- Frequently asked questions
- Can one API query Google, Bing and DuckDuckGo at once?
- Does a multi-engine call cost more than a single-engine call?
- What happens if one engine fails?
- Can an AI agent call multi-engine search?
- What to do next with multiple search engines in one API
- Sources
To get multiple search engines, one API is enough: send a single POST to https://api.wayfern.com/api/search/v1 with a search-scoped wf_ token and an engines list. Coverage is limited to those three engines.
You’re building an agent, a rank tracker or a research pipeline that needs more than one engine. Per-engine clients each return a different format, a browser loop gets blocked, and a merged list can hide a failed engine as zero results.
You’ll be able to send a working request, check rows against a schema, handle a failed engine, merge results across engines and decide whether to build or buy.
Key Takeaways
- On Wayfern’s SERP page,
rankcounts organic rows only;absolute_rankcounts every row, ads included.- Each provider results page costs 2 credits, cache hits included, so three engines cost three pages. Rates live on /pricing.
- For academic or developer sources, an open-source aggregator that queries 30+ engines fits better.
What multiple search engines, one API actually does
One API for multiple search engines takes a single request that lists the engines you want and returns a single response.
The call is a POST to https://api.wayfern.com/api/search/v1 with a search-scoped wf_ token. The text field takes up to 512 characters, and engines defaults to ["google"]. This request lists three:
curl -X POST https://api.wayfern.com/api/search/v1 \
-H "Authorization: Bearer $WF_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "anti-detect browser api",
"engines": ["google", "bing", "duckduckgo"]
}' The response is one merged list. A URL that Google and Bing both returned appears once, and its row carries the engine tag. You don’t call three endpoints or join three payloads.
The alternatives put the work on you
A client-side loop calls each engine in turn, or in parallel threads you write. One engine per request gives you the same shape with more round trips.
In both cases you own the concurrency, the retries when one call fails, and the code that decides whether two URLs are the same page. With an engines list, the fan-out happens on the provider’s side, so your code makes one call and handles one response.
Why one engine isn’t enough
Each engine ranks pages by its own rules. Serpent’s tutorial on multi-engine aggregation says “A page that ranks first on Google might not even appear in DuckDuckGo’s top 20.”
A single engine is also a single point of failure. If it blocks a request, you have no data at all. With three engines in the list, the other two can still return rows, and you can check which engine failed before you trust the merged result.
The full request and response fields are on the Wayfern SERP API use case page.
What fields does each row in a merged search response have?
The Search API reference defines them, and they form the contract your code reads.
Wayfern’s SERP page puts the two position fields this way: “rank counts organic results only; absolute_rank counts every row, ads included, in page order.”
On a Google page with one ad above the first organic link, that link has rank 1 and absolute_rank 2, because the ad took slot 1 in page order. A rank tracker reads rank, so an ad appearing or vanishing doesn’t change the position it reports. A layout study reads absolute_rank to see how far down the page the link sat.
{
"results": [
{ "absolute_rank": 1, "rank": null, "type": "ad", "ad": true,
"url": "https://ads.example.com/offer", "engine": "google" },
{ "absolute_rank": 2, "rank": 1, "type": "organic", "ad": false,
"url": "https://example.com/guide", "engine": "google" }
],
"pagination": { "next_start": 50, "has_more": true }
} The other fields do one job each:
typesays what kind of row it is, so you can branch on it.adis a flag you filter on to drop paid rows.urlandengineappear on every row, so you can group by link or credit an engine.
Two request options add detail. features returns people-also-search blocks in serp_features, and filter removes near-duplicates.
A single relevance score wouldn’t tell you whether a row was an ad or which position a searcher saw. Without both fields, you can’t track rank or strip ads.
How do you tell a blocked engine from zero results?
Read meta.engines_failed before you trust the merged list.
The rows alone can’t tell you. Search pages are built for people, so when an engine blocks or fails a request, nothing parseable comes back, and an empty list is what a query with no matches also produces.
- Send the request and check the field first. Don’t branch on
len(results). An emptyengines_failedmeans every engine you asked for answered. - Retry once, for the failed engines only. Resend the request with
enginesset to the failed names, after a short pause. Resending all three engines would bill again for the two that worked. - Degrade if it fails again. Return the rows you have, flagged with the missing engines, since a retry can fail too.
import os, time, requests
URL = "https://api.wayfern.com/api/search/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['WF_TOKEN']}"}
def call(text, engines):
r = requests.post(URL, headers=HEADERS, timeout=60,
json={"text": text, "engines": engines})
r.raise_for_status()
return r.json()
def search(text, engines):
data = call(text, engines)
rows = data.get("results", [])
failed = data["meta"].get("engines_failed", [])
if failed:
time.sleep(5)
retry = call(text, failed)
rows += retry.get("results", [])
failed = retry["meta"].get("engines_failed", [])
return {"rows": rows, "partial": bool(failed), "missing": failed} Each retry costs credits and counts against a limit.
The search rate limit on Wayfern’s /docs/limits page is 30 requests a minute, so space retries out instead of looping.
A rank-tracking job sends engines as ["google", "bing", "duckduckgo"]. The response lists bing in meta.engines_failed, so the job re-queries ["bing"] once.
If Bing fails again, the job stores the Google and DuckDuckGo rows marked partial, with bing in missing. It never records Bing as having no results, so a blocked engine doesn’t show up as a ranking drop.
Send one query with three engines from the SERP API use case and see what meta.engines_failed returns. Estimate retry cost on /pricing first.
Search controls that work the same across multiple search engines in one API
You set seven request fields once per Wayfern Search API call, and each engine still applies them by its own rules for operators, dates, language codes and local ranking.
| Control | Request field | Documented behavior | Stays engine-specific |
|---|---|---|---|
| Site | site | Request field | Operator rules per engine |
| File type | filetype | Request field | Operator rules per engine |
| Date range | date | YYYYMMDD..YYYYMMDD | How each engine applies dates |
| Language | lang | Request field | Codes each engine accepts |
| Region | region | Request field | Local ranking per engine |
| Result limit | limit | 1 to 200 per engine, default 50 | Results per page per engine |
| Offset | start | Next offset in pagination.next_start | Depth each engine serves |
The API reference lists site, filetype, date, lang, region, limit and start as Search API request fields.
The date field takes a range written as YYYYMMDD..YYYYMMDD, for example 20260101..20260331. The limit field accepts 1 to 200 results per engine and defaults to 50. Ask for limit 100 across three engines and you’re asking each engine for up to 100.
To page through results, send pagination.next_start back as start while has_more is true.
Operators typed inside text belong to each engine. Google’s search operator help documents site:.
Each engine defines its own list, so a quoted phrase, an exclusion or intitle: may behave differently on each.
Test any advanced operator against one engine at a time before you merge. Compare the rows per engine, then check meta.engines_failed so a blocked engine isn’t read as an operator that matched nothing. For the full call shape, see the SERP API use case.
How to merge multiple search engines in one API response
You merge, dedupe and score results with three separate passes over the unified response: normalize each URL, collapse variants into one entry, then rank by cross-engine agreement. The provider already merges duplicate URLs and tags each row with its engine. Your code handles variants that still differ as strings, such as tracking parameters and fragments.
- Fetch and check failures. Call the endpoint with your
WF_TOKEN, then readmeta.engines_failedbefore you trust the merged list. - Normalize URLs. RFC 3986 section 6 says “The scheme and host are case-insensitive and therefore should be normalized to lowercase.” The code then drops the fragment, deletes denylisted parameters and sorts the rest.
- Dedupe. Group rows by normalized key and keep the best organic
rankper engine. Skip ads, becauserankcounts organic rows only. - Score. Rank by how many engines returned the URL, then by summed reciprocal rank. The Serpent API tutorial builds the same kind of “consensus-scored ranking that reflects cross-engine agreement.”
const DENY = new Set(["gclid", "fbclid", "msclkid", "mc_cid", "mc_eid"]);
export function normalizeUrl(raw) {
const u = new URL(raw); // lowercases scheme and host, drops default ports, resolves dot segments
u.hash = "";
for (const k of [...u.searchParams.keys()]) {
if (DENY.has(k) || k.startsWith("utm_")) u.searchParams.delete(k);
}
u.searchParams.sort();
return u.toString();
}
export function dedupe(rows) {
const groups = new Map();
for (const row of rows) {
if (row.ad || row.rank == null) continue;
const key = normalizeUrl(row.url);
const g = groups.get(key) ?? { key, url: row.url, ranks: {} };
for (const engine of [].concat(row.engine)) {
g.ranks[engine] = Math.min(g.ranks[engine] ?? Infinity, row.rank);
}
groups.set(key, g);
}
return [...groups.values()];
}
export function score(groups) {
return groups
.map((g) => {
const ranks = Object.values(g.ranks);
return { ...g, engines: ranks.length, score: ranks.reduce((s, r) => s + 1 / r, 0) };
})
.sort((a, b) => b.engines - a.engines || b.score - a.score);
}
const res = await fetch("https://api.wayfern.com/api/search/v1", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.WF_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({ text: "multiple search engines one api", engines: ["google", "bing", "duckduckgo"], limit: 20 }),
});
const body = await res.json();
if (body.meta?.engines_failed?.length) console.warn("failed:", body.meta.engines_failed);
console.log(score(dedupe(body.results)).slice(0, 10)); Run this and https://Example.com/post?utm_source=news#intro and https://example.com/post collapse into one key, https://example.com/post. A row for https://example.com/post?id=42 keeps its parameter and stays a separate entry, because id and page change the page.
The denylist is your own policy, so add the tracking parameters you see in your results. The Search API reference documents the row fields this code reads.
Build or buy: which access layer fits multi-engine search?
Buy a hosted API when you need Google, Bing and DuckDuckGo in one schema, and build only when you need engines or sources outside those three.
| Criterion | Browser you run | HTML fetcher | Hosted API |
|---|---|---|---|
| Blocking | You handle it | You handle it | Provider handles it, failures named |
| Markup drift | You fix selectors | You fix parsers | Provider fixes it |
| Cost shape | Servers and proxies | Bandwidth and proxies | Credits per provider page |
| Engines | Any you script | Any you parse | Google, Bing, DuckDuckGo |
Read each engine’s terms before you automate it, and collect only public data for lawful purposes.
The official APIs are narrowing. Google’s Programmable Search Engine documentation says the Custom Search JSON API is “closed to new customers”.
Microsoft Learn announced that the Bing Search APIs would be “retired on August 11, 2025”, and it names “Grounding with Bing Search” as the replacement.
A browser you run survives layout changes better than a fetcher, but you own the pool, the proxies and the selectors. A fetcher is cheapest per request and breaks first when markup shifts or an engine blocks it. Both return an empty page when blocked, which looks like zero results unless you check for it.
Wayfern bills 2 credits per provider results page, cache hits included, so a three-engine request fetches three pages. Multiply pages by your query volume, then price the credits on /pricing. The per-minute search cap is on /docs/limits.
For academic, developer or regional sources, open-source aggregators fit better. multi-search-aggregator advertises “30+ search engines in parallel”, and multisearch-api runs headless Chrome through Selenium and returns raw HTML.
With either aggregator, you own the blocking and parsing work from the browser and fetcher columns.
After search, scraping each result uses the same credit balance, and the Wayfern MCP server exposes search_web to agents.
- A browser you run fits engines no API covers, if you can maintain the pool.
- An HTML fetcher fits low-volume jobs on a single engine with stable markup.
- A hosted API fits merged, tagged results from three engines without maintaining parsers.
Frequently asked questions
Can one API query Google, Bing and DuckDuckGo at once?
Wayfern’s Search API takes an engines list covering Google, Bing and DuckDuckGo in one POST to /api/search/v1. URLs returned by more than one engine are merged, and each row carries its engine.
Does a multi-engine call cost more than a single-engine call?
A three-engine call costs more, because billing is per provider results page: 2 credits each, cache hits included. Three engines bill three pages. Check your expected volume against the rates on /pricing before you build.
What happens if one engine fails?
The response still returns rows from the engines that worked and names each failed engine in meta.engines_failed. If that field is non-empty, re-send the query with engines set to only the failed engine, or accept the narrower list.
Can an AI agent call multi-engine search?
An agent can call it through the MCP server at https://api.wayfern.com/mcp, covered in the guide to live web data for AI agents. Its search_web tool runs the search, and the agent authenticates with a Bearer wf_ token that has the mcp scope.
What to do next with multiple search engines in one API
Start with one three-engine request today, add failure handling this week and price your real volume this month.
Today, create a search-scoped wf_ token, with an expiry if you want one, as the API reference describes. Send one POST to /api/search/v1 with engines set to ["google", "bing", "duckduckgo"].
This week, add a meta.engines_failed check that retries the named engines or degrades to the engines that answered. Then wire the URL normalization and consensus scoring into your pipeline.
This month, estimate credits from your real query volume: Wayfern’s pricing bills each provider results page, and three engines mean three pages.
Then decide whether the Web Data API or the MCP server at https://api.wayfern.com/mcp handles the follow-up scrape. The server exposes search_web and needs a token with the mcp scope.
Get a search-scoped token and run your first multiple search engines, one API test. Credit packs work without a plan, so you can start before choosing one.
Sources
API Reference - CDP, Web Data & Search | Wayfern · SERP API - Google, Bing & DuckDuckGo | Wayfern · Pricing - Credits for Browsers & the Web Data API | Wayfern · Multi-Search Aggregator - GitHub · Serpent: multi-engine search aggregator · Limits | Wayfern · MCP server | Wayfern · Live Web Data for AI Agents | Wayfern. Every other source is linked where the article cites it.
See us more often in Google
One click marks Wayfern as a preferred source in Google, so our posts can show up more often in your Top Stories, AI Mode and AI Overviews.