DuckDuckGo Reworked for LM Studio
Reliable DuckDuckGo web and image search tools for LM Studio with improved parsing and cleaner result quality.
What was broken before
The previous implementation had several practical issues in real usage:
- Web search sometimes returned only
https://duckduckgo.com/ instead of actual results.
- DDG redirect links were not decoded correctly, so target URLs were lost.
- Internal DuckDuckGo links polluted the final output and looked like "valid" search hits.
- Label extraction was noisy because HTML text was not normalized robustly.
What is fixed in this reworked version
Web Search quality improvements
- Uses
https://html.duckduckgo.com/html/ for more stable HTML result pages.
- Replaces fragile URL regex extraction with anchor-level parsing (
<a href=...>).
- Decodes DuckDuckGo redirect links via
uddg into real destination URLs.
- Filters out internal DuckDuckGo service/home links from results.
- Cleans HTML labels and normalizes whitespace for readable output.
Better result reliability
- Keeps deduplication of extracted links.
- Preserves pagination (
page, pageSize) behavior.
- Keeps existing
safeSearch behavior.
Installation
Install from LM Studio Hub:
Then click Run in LM Studio.
Configuration
- Search Results Per Page: max number of search results (
0 = auto).
- Safe Search:
off, moderate, strict (auto lets assistant decide).
Usage
With the plugin enabled, the assistant can:
- run web search (
Web Search)
- run image search (
Image Search)
- paginate results when needed
It works especially well together with the improved Visit Website plugin:
Changelog (reworked release)
- Fixed homepage-only result regression.
- Added DDG redirect target decoding.
- Added internal-link filtering.
- Improved title/label extraction cleanliness.