Quick answer: There is no official DuckDuckGo web search API. The thing people find when they search for one, the free Instant Answer API at api.duckduckgo.com, does not return web search results at all. Everything else calling itself a "DuckDuckGo API" is an unofficial scraper, and those come with rate limits, breakage, and terms-of-service problems. If you need search results in your code, you want a real search API: Brave if you want an independent index with an official key, or a SERP API like link.sc if you want Google-quality results as structured JSON.
That answer surprises a lot of people, so let's walk through what actually exists.
The Instant Answer API Is Not a Search API
DuckDuckGo does publish one official, free, no-key-required endpoint. Here it is:
curl "https://api.duckduckgo.com/?q=python+programming+language&format=json"
For that query you get back a tidy JSON object with an Abstract (a Wikipedia summary), an AbstractURL, an Image, and some RelatedTopics. Looks promising.
Now try a query that isn't an encyclopedia topic:
curl "https://api.duckduckgo.com/?q=best+web+scraping+tools+2026&format=json"
You get back mostly empty strings. No organic results, no titles, no URLs ranked by relevance. That's by design: this endpoint serves instant answers, the boxed summaries DuckDuckGo shows above its results, sourced from Wikipedia and a handful of other reference sites. DuckDuckGo's own documentation is upfront that it is not a full search results API and that the vast majority of queries return nothing useful.
So the official API is real, free, and fine for one narrow job: enriching known entities with a Wikipedia-style summary. If your query mix is "things with an encyclopedia page," use it happily. For actual search, it's a dead end.
Why Everyone Thinks There's an API Anyway
Search "duckduckgo search api" on GitHub or PyPI and you'll find popular libraries that appear to prove me wrong. The best known is the Python package that spent years as duckduckgo-search and now lives on as ddgs:
from ddgs import DDGS
results = DDGS().text("best web scraping tools", max_results=10)
for r in results:
print(r["title"], "-", r["href"])
Four lines, real results, no API key. I understand the appeal.
But look at what the library actually does: it sends requests to DuckDuckGo's HTML endpoints, the same pages a browser loads, and parses the markup. It is a scraper wearing an API costume. That distinction matters for three practical reasons.
Rate limits arrive fast. The library's issue tracker is a long history of Ratelimit exceptions. DuckDuckGo actively throttles automated traffic, and in my experience anything beyond low-volume hobby use starts eating 202s and captcha walls within minutes. People respond by rotating proxies, which turns your "free API" into a paid proxy bill plus maintenance.
It breaks when the HTML changes. Every markup change on DuckDuckGo's side is a potential outage on yours, patched on the library maintainer's schedule, not your uptime requirements.
It's against the terms. DuckDuckGo's terms of service prohibit scraping. For a weekend project, you may not care. For anything commercial, building on explicitly prohibited access is a real business risk, and there is no paid tier you can upgrade to when you outgrow it. That last part is the killer: with no official commercial offering, there is no legitimate scaling path at all.
The Upstream Problem Nobody Mentions
Here's the piece most "DuckDuckGo API" tutorials skip. DuckDuckGo is not primarily its own index. Its traditional web results have long been powered largely by Bing, blended with its own crawler and hundreds of other sources.
That mattered a lot in 2025, when Microsoft retired the public Bing Search APIs and pushed developers toward Azure AI agent products. The era of "just get Bing results through a cheap official key" ended, and it pushed even more developers toward DuckDuckGo scrapers as a workaround.
But it also means that when you scrape DuckDuckGo, you're going through a rate-limited, ToS-prohibited side door to reach an index you could evaluate more honestly elsewhere. You are not getting unique results worth the fragility. You're getting a blend you can't control, through an access method that can vanish any day.
What to Actually Use
Here's how I'd frame the real options, depending on what you're building:
| Option | Official? | Cost to start | What you get | Best for |
|---|---|---|---|---|
| DDG Instant Answer API | Yes | Free, no key | Wikipedia-style abstracts only | Entity summaries |
ddgs and similar scrapers |
No | Free until rate-limited | Parsed DDG results | Throwaway scripts |
| Brave Search API | Yes | Free tier, 2,000 queries/mo | Independent index, JSON | Privacy-focused apps |
| SERP API (link.sc) | Yes | Free tier, 500 requests/mo | Google results as structured JSON | Rank tracking, agents, RAG |
If DuckDuckGo appealed to you because it's privacy-respecting and independent, Brave is the closest official equivalent: its own index, a real key, a real paid tier when you grow. I've written a full setup guide for the Brave Search API including the header gotcha that causes most first-request failures.
If DuckDuckGo appealed to you because it was a free way to get search results into code, what you actually wanted was a SERP API. link.sc's Search API returns live Google results as structured JSON in one call:
curl -X POST https://api.link.sc/v1/search \
-H "x-api-key: YOUR_LINKSC_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "best web scraping tools"}'
You get organic results, People Also Ask, and other SERP features, without proxy rotation, HTML parsing, or a 429 whack-a-mole game. And if you're feeding an LLM, the results can include full page content as markdown, which matters more than which engine you query. I've covered why snippets alone fail LLM apps in the real-time web search guide.
The Bottom Line
DuckDuckGo makes a great default browser search engine and a poor API strategy. The official Instant Answer endpoint answers a question you probably weren't asking, the unofficial scrapers are living on borrowed time, and there is no paid tier waiting for you when your project gets serious.
Pick a search API that wants your traffic. Brave if you want an independent index with official access. A SERP API if you need Google's view of the web in structured form. Either way you'll spend your time building your product instead of dodging rate limits.
Need real search results as clean, structured JSON? Get a free link.sc API key: 500 requests a month included.