WebSearch
APIs
Submit an API

Blog/Myth-busting

Is there a DuckDuckGo search API? (No. Here's what to use)

DuckDuckGo has no official web search API. What the Instant Answer API really returns (we tested it), why the ddgs Python package isn't one, and the real alternatives.

TL;DR

  • No. DuckDuckGo has no official API for web search results.
  • The Instant Answer API returns zero-click summaries (mostly Wikipedia), never a list of web results. We tested it.
  • The ddgs Python package (formerly duckduckgo-search) scrapes search pages and says it's "for educational purposes only".
  • For a real API: Brave (independent index), Serper (Google), Exa/Parallel/Tavily (for LLMs), Keirolabs (cheapest).
0Web results in the Instant Answer API's response
0Official DuckDuckGo search API keys
9Engines the ddgs package scrapes
$5Brave per 1,000, the closest real swap

It’s one of the most-searched questions in this corner of the internet, and the answer fits in a tweet: no, DuckDuckGo doesn’t have a web search API.

But the question keeps coming up for good reasons. There is something at api.duckduckgo.com. There is a hugely popular Python package with DuckDuckGo in its name. And plenty of agent tutorials have a DuckDuckGoSearchRun tool that seems to work fine on the author’s laptop.

So let’s look at what each of those really is, and what to use instead when you need search you can build a product on.

What the Instant Answer API actually returns

I tested it on November 2, 2026. Ask it about an entity and you get a nice summary:

curl "https://api.duckduckgo.com/?q=python+programming+language&format=json&no_html=1"

That returns a Heading (“Python (programming language)”), an AbstractText from Wikipedia, an Infobox, the official website and some RelatedTopics. Perfectly good for a knowledge card.

Now ask it a normal search query:

curl "https://api.duckduckgo.com/?q=best+web+search+api&format=json"

In that test, Results was an empty list, AbstractText was empty, and RelatedTopics had 0 items. No links, no snippets, no anything.

That’s not a bug, it’s the design. The Instant Answer API powers DuckDuckGo’s “zero-click” boxes: the summary you see above the results. It was never meant to return the results themselves. If your agent tool returns an empty list for most real questions, this is why.

What about the ddgs Python package?

The library half the tutorials use, duckduckgo-search, now shows this on PyPI:

“This package (duckduckgo_search) has been renamed to ddgs! Use pip install ddgs instead.”

ddgs (“Dux Distributed Global Search”) is a metasearch library. Its text() function pulls results from Bing, Brave, DuckDuckGo, Google, Mojeek, Startpage, Yandex, Yahoo and Wikipedia by scraping their pages. And its own disclaimer is refreshingly honest:

“This library is for educational purposes only.”

Why it falls over in production

After fifteen years of scraping search engines, I can tell you how this pattern goes. It works on your laptop. It works in the demo. Then real traffic arrives, and:

  • Rate limits and blocks start, because nine search engines are each deciding your server looks like a bot (it is one).
  • Results change shape whenever any of those engines changes its page layout, and nobody tells you.
  • There’s no one to call. No SLA, no status page, no support email.

For a weekend project, a notebook or a class assignment, ddgs is fine. For anything with users, a paying customer or an on-call rotation, it’s a liability waiting for a quiet Sunday.

Why doesn’t DuckDuckGo have a search API?

DuckDuckGo builds its results from many sources, including its own crawler and partners, under licensing terms. Reselling those results through a public API isn’t part of its business. Its revenue comes from search ads on its own pages.

You can’t buy what a company doesn’t sell. You can buy something better.

The real alternatives

If you wanted DuckDuckGo for privacy or independence from Google, these are the closest matches:

If you wantUsePrice per 1,000Why
Independent index, privacy-mindedBrave Search API$5 ($5 free credits/mo)Own crawler, no Google/Bing fallback
Small independent indexMojeekTrialUK crawler with its own index
Google’s results, cheapSerper$0.30–1.002,500 free queries
Results for an LLMExa, Parallel, Tavily$1–8Page text or excerpts included
Lowest cost per searchKeirolabs lite$0.10Own index
Free to try, no cardTavily1,000 credits/mo freeNo credit card required

Closest in spirit

Brave Search API

Privacy-focused company, its own index, no Google or Bing underneath. Get a key in five minutes.

Replacing a ddgs agent tool

Tavily, Exa or Parallel

Built for LLMs, with ready-made agent tools. Tavily needs no card to start.

Serper

Google’s results as JSON for $1.00 per 1,000. The usual swap for link-only tools.

Cheapest real API

Keirolabs lite

$0.10 per 1,000 from its own index, with 750 free credits to try.

FAQ

Does DuckDuckGo have an API key?

No. The Instant Answer API needs no key, and there’s no paid tier that unlocks web results.

Is it allowed to scrape DuckDuckGo?

Check DuckDuckGo’s terms. In practice, heavy automated traffic gets rate-limited or blocked, and ddgs itself only claims educational use.

What’s the cheapest DuckDuckGo-like search API?

For an independent index, Brave at $5 per 1,000 with $5 of free credits a month. For the lowest price overall, Keirolabs lite at $0.10 per 1,000. Compare them all in the price calculator.

Keep reading