Query DuckDuckGo and get structured web results as JSON. DuckDuckGo does not personalize or track, so it returns a cleaner, more neutral result set - useful when you want ranking that is not shaped by a user profile or heavy localization. This page shows a DuckDuckGo search in the SDKs and with curl.
Examples run against OpenSERP Cloud at https://api.openserp.org. The same request works on a self-hosted open-source OpenSERP server - point the SDK at your own baseUrl instead of passing apiKey.
export OPENSERP_API_KEY="osk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Web search
JavaScript / TypeScript
npm install @openserp/sdk
import { OpenSERP } from "@openserp/sdk";
const client = new OpenSERP({ apiKey: process.env.OPENSERP_API_KEY });
const { results } = await client.search({
engine: "duckduckgo",
text: "privacy focused browsers",
limit: 10,
});
for (const r of results) {
console.log(r.rank, r.title, r.url);
}
The engine name duckduckgo also accepts the alias duck.
Python
pip install openserp
import os
from openserp import OpenSERP
with OpenSERP(api_key=os.environ["OPENSERP_API_KEY"]) as client:
response = client.search(engine="duckduckgo", text="privacy focused browsers", limit=10)
for r in response.results:
print(r.rank, r.title, r.url)
curl
curl "https://api.openserp.org/v1/duckduckgo/search?text=privacy+focused+browsers&limit=10" \
-H "Authorization: Bearer $OPENSERP_API_KEY"
Try a query first in the Search Playground and copy the generated request.
Notes for DuckDuckGo
- DuckDuckGo does not localize or personalize the way Google does, so
regionandlanghave less effect - the result set stays close to a neutral baseline. - That neutrality makes it a good control engine: query DuckDuckGo alongside Google and the difference highlights how much personalization and localization are shaping Google’s ranking.
When to reach for DuckDuckGo
- You want a neutral, un-personalized result set as a baseline.
- You are grounding an LLM or agent and prefer results that are not skewed by a user profile.
- You want a privacy-leaning engine in your megasearch mix.
To use it as a control alongside other engines, see megasearch & ranking diff.
Next steps
- Create an API key and run your first DuckDuckGo query.
- Google Search API example - the localized, personalized counterpart.
- Endpoints reference - every parameter and the full response envelope.