Tony Wang5 min readHow to Scrape DuckDuckGo in 2026 (API & Python)
Scrape DuckDuckGo in 2026 — web, image, news, shopping, and video results as structured JSON with decoded URLs — DIY, no-code, or a structured API.
The fastest way to scrape DuckDuckGo in 2026 is to call a structured API that returns normalized JSON across five verticals — web, images, news, shopping, and video — instead of parsing DuckDuckGo's server-rendered results pages yourself. There's no official way to get organic web results programmatically: DuckDuckGo's own Instant Answer API only returns instant-answer topic summaries, not the ranked result list. This guide covers all three approaches, what each returns, where DIY breaks, and the legal basics.
Why scrape DuckDuckGo?
DuckDuckGo's results power:
- Privacy-focused SERP tracking — DuckDuckGo runs its own blended results (not a pure Google or Bing mirror), so it adds coverage distinct from either.
- Search research on a non-personalized engine — DuckDuckGo doesn't build user profiles, so its results are a cleaner baseline for studying organic ranking without personalization noise.
- Cross-vertical monitoring — track a query or brand across web, image, news, shopping, and video results in one pass.
- Competitive and market comparison — the
regionfilter lets you see how the same query ranks differently across markets. - Recency-filtered news and web tracking — the
time_rangefilter narrows web results to the last day, week, month, or year for freshness-sensitive monitoring.
Is it legal to scrape DuckDuckGo?
Option 1: DIY in Python (and why it breaks)
A naive approach fetches the results page and parses the HTML:
import requests
from bs4 import BeautifulSoup
resp = requests.get(
"https://html.duckduckgo.com/html/",
params={"q": "ai agents"},
headers={"User-Agent": "Mozilla/5.0"},
)
soup = BeautifulSoup(resp.text, "html.parser")
# Result links are wrapped in DuckDuckGo's own redirect
# (duckduckgo.com/l/?uddg=...) and have to be decoded before use
It works once, then breaks. The recurring costs:
- No official web-results API. DuckDuckGo publishes an Instant Answer API, but it returns instant answers and topic summaries — not the organic result list — so there's nothing sanctioned to call instead of the HTML page.
- Rate limiting and challenge pages. Beyond low hobby volume, DuckDuckGo returns 202/403 responses or a CAPTCHA wall to automated traffic, and naive
requestscalls hit this quickly. - Wrapped result links. Every result URL is a click-tracking redirect (
duckduckgo.com/l/?uddg=...), so you have to decode it yourself to get the actual destination URL and hostname. - Five separate verticals. Web, image, news, shopping, and video results each render with their own markup, so a single parser doesn't cover all of them — you need one per vertical, and each drifts independently.
Most of the cost is not the first scrape — it is keeping five parsers alive against layout changes and rate limits at once.
Option 2: No-code tools
Browser extensions and point-and-click scrapers can pull a one-off DuckDuckGo results page, but they don't decode the click-tracking redirect for you, don't cover all five verticals in one workflow, and still break when DuckDuckGo's markup or rate limits change. For recurring collection that feeds a pipeline, an API is the better fit.
Option 3: A structured DuckDuckGo API
Crawlora's DuckDuckGo Search API wraps request handling, region/recency/safe-search filters, redirect decoding, and normalization behind one documented endpoint per vertical. Search the web results:
curl -G "https://api.crawlora.net/api/v1/duckduckgo/search" \
-H "x-api-key: $CRAWLORA_API_KEY" \
--data-urlencode "q=ai agents" \
--data-urlencode "region=us-en" \
--data-urlencode "time_range=w" \
--data-urlencode "safe_search=moderate"
import requests
resp = requests.get(
"https://api.crawlora.net/api/v1/duckduckgo/search",
headers={"x-api-key": "YOUR_API_KEY"},
params={"q": "ai agents", "region": "us-en", "time_range": "w", "safe_search": "moderate"},
)
for row in resp.json()["data"]["results"]:
print(row["title"], row["url"], row["hostname"])
A response is normalized JSON with the redirect already decoded (fields shown are illustrative — check the docs for the current schema):
{
"code": 200,
"msg": "OK",
"data": {
"query": "ai agents",
"results": [
{
"title": "Example result title",
"url": "https://example.com/",
"hostname": "example.com",
"description": "Snippet text shown under the result."
}
]
}
}
Same key, four more verticals — swap the path and keep the same q and region parameters:
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1/duckduckgo"
images = requests.get(f"{base}/images", headers=h, params={"q": "ai agents", "region": "us-en"}).json()["data"]
news = requests.get(f"{base}/news", headers=h, params={"q": "ai agents", "region": "us-en"}).json()["data"]
shopping = requests.get(f"{base}/shopping", headers=h, params={"q": "ai agents", "region": "us-en"}).json()["data"]
video = requests.get(f"{base}/video", headers=h, params={"q": "ai agents", "region": "us-en"}).json()["data"]
One Crawlora API key covers all five verticals — no separate credential per result type.
What you can collect
- Web results: title, destination URL (decoded from DuckDuckGo's redirect), hostname, and description snippet — filterable by
time_range(d/w/m/y) andsafe_search(strict/moderate/off) - Image results via the dedicated images endpoint
- News results via the dedicated news endpoint
- Shopping results via the dedicated shopping endpoint
- Video results via the dedicated video endpoint
- Regional variants of any vertical via the
regionparameter, for market-by-market comparison
Limitations and common challenges
- No official web-results API to fall back on. DuckDuckGo's Instant Answer API returns topic summaries, not the organic result list, so there's no sanctioned alternative if a structured endpoint is unavailable.
- Rate limiting and challenge pages for DIY. Automated traffic beyond low hobby volume gets 202/403 responses or CAPTCHA walls; a structured API handles this behind one key instead of you managing it per request.
- Wrapped result links. DuckDuckGo's redirect wrapper means raw HTML scraping returns tracking URLs, not destinations, unless you decode them yourself.
- Five verticals, five shapes. Web, image, news, shopping, and video results don't share one schema — use the dedicated endpoint for the vertical you need rather than one generic parser.
- Terms of Service restrict automated use. DuckDuckGo's ToS don't allow automated, non-personal use of the site — factor that into how you use any data collected.
Where this gets used
- Privacy-focused SERP tracking — snapshot web rankings on a non-personalized engine alongside Google and Bing.
- Cross-vertical brand monitoring — check the same query across web, image, news, shopping, and video results in one pass.
- Freshness-sensitive news tracking — use
time_range=dorwto catch what's ranking in the last day or week.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
DuckDuckGo is most useful as a privacy-focused second or third engine alongside Google and Bing — the response shapes are consistent enough to snapshot all three with the same code. Pair it with how to scrape Brave Search for another independent index, or how to scrape Bing for the largest non-Google alternative. For a broader tool comparison, see the best SERP APIs in 2026.
Get started by testing the endpoint in the Playground, reading the request and response schema in the API docs, and reviewing credit costs on the pricing page. See also is web scraping legal.
Part of our how-to-scrape guide series — every platform we cover, in one index.
Frequently asked questions
Is there an official DuckDuckGo search API?
Not for web results. DuckDuckGo publishes an Instant Answer API, but it returns instant answers and topic summaries rather than the organic result list. Crawlora's endpoints read DuckDuckGo's own server-rendered search pages and return those results as JSON.
Which verticals are supported?
Web, images, news, shopping, and video — each its own endpoint taking the same q parameter plus a region.
Can I limit results to the last week or month?
Yes, on web search. time_range accepts d, w, m, or y for the past day, week, month, or year, and safe_search accepts strict, moderate, or off.
Do I get the real destination URL?
Yes. DuckDuckGo wraps every result link in a click-tracking redirect; this endpoint decodes it and returns the destination URL along with the hostname.
How do I search DuckDuckGo with an API?
Send a keyword as q to Crawlora's /duckduckgo/search endpoint and get normalized organic results as structured JSON — no DuckDuckGo account required.