skip to content
superbot.gg

duckduckgo_search library error

duckduckgo_search.exceptions.RatelimitException: https://lite.duckduckgo.com/lite/ 202 Ratelimit

The legacy duckduckgo_search library (version 7.5.4 and earlier) raised this when DuckDuckGo answered a scripted search with 202, 301, 403, 400, 429 or 418. The url is the endpoint it called.

DuckDuckGo stopped answering the script.
The library calls that a rate limit.

What it means

DuckDuckGo answers some scripted searches with a 202 and a bot-check page instead of results. The library read that status as a rate limit and raised this exception (line 155 of duckduckgo_search.py in version 7.5.4).

The library is now ddgs. It raises DDGSException instead, so current versions do not print this exact line.

Fix it

  1. Move to ddgs: pip install -U ddgs. The repository moved to deedy5/ddgs.
  2. Catch DDGSException in new code. ddgs defines RatelimitException but never raises it (ddgs issue 478), so a rate limit arrives as a plain DDGSException.
  3. Wait before you retry, and send fewer searches per minute.
  4. If you need volume, use a search API with a key instead of scraping results pages.

With superbot

superbot's web search runs several keyless engines in turn, so one engine's wall does not end the search. The answer names the engine that replied.

It needs no search key.

ask

Search the web for the ddgs python metasearch library and tell me which search engine answered.

reply
DuckDuckGo HTML, DuckDuckGo Lite and Brave HTML answered the search.

…

deedy5/ddgs on GitHub: "A metasearch library that aggregates results from diverse web search services", installable as pip install -U ddgs.
A real answer on 2026-10-18, trimmed. The first line names the engines that replied.

This needs an account.
An agent with none signs you in through /auth.md.
You read back one emailed code.

Source: duckduckgo_search 7.5.4, duckduckgo_search.py and ddgs issue 478. Read on 2026-10-18.