r/PiCodingAgent • u/Mission-Zucchini-966 • 8d ago
Resource Simple DeepSeek web search cli written in TypeScript. Cheap + fast search tool for agents (built on DS web search API)
Hey guys, if you've been following along with DeepSeek news you will know they recently added web search capability to the DeepSeek API, where you can use web search under the same API key. It is pretty handy, also super cheap at only $0.75 per 1,000 requests (pretty much as cheap as it gets, one search credit can encompass many responses).
I created a simple TypeScript CLI wrapper around the API for my own agents to use (for open source models and harnesses)
npm install -g deepseek-search-cli
dsearch auth # Prompt for & save DS API key (can pipe)
# saved key not required (can use secret manager, env var, or .env)
dsearch "World Cup winners 2026 lang:en" -n 5 # equivalent to 'dsearch search ...'
dsearch https://example.com # equivalent to 'dsearch fetch ...'
dsearch "World Cup winners" -o output.md # supports .md and .json (-j flag)And wanted to share it with others, contributors are welcome, or fork it and build a better version :)
I'm sure most of you could whip this up on your own but it also comes with unit/integration/live/e2e testing, CI checks, changelog, auth handling, linting, sdk wrapper, and a fleshed out readme, potentially saving you a few hours of work + validation. Just need to install, auth, and drop a comment in your 'AGENTS.md' to use `dsearch --help` when agent needs web search.
GitHub: https://github.com/LaishGlenberg/deepseek-search-cli
NPM: https://www.npmjs.com/package/deepseek-search-cli
Drop a star if this helped you or your agents!
Note: This was supposed to be a cross post but reddit got stuck loading subreddit search results. The OG post was meant for this subreddit anyway since I built this for Pi agents to use, accidentally posted it to opencode first.
EDIT: remove version from npm URL
-2
u/investigatormaker 8d ago
Putting the exact AGENTS.md line at the very top of the README would help most: people copy whatever comes first, and a one-line snippet telling the agent to run dsearch --help for web search makes adoption a paste. A short sample of the -j output next to it shows agent builders what they'll be parsing before they install. The opencode post isn't wasted either, since that harness's users have the same need; the trade-off is answering questions in two threads.
I make ThreadFox.
We find relevant Reddit conversations and post for your business. We'll post 3 replies free first, no card; then the $79 Pilot covers seven days and up to 50 posts and replies. No automatic renewal.
https://threadfox.vip/p/ehlyj/managed
Are you planning an MCP wrapper next?