deepseek-web-search
Web search and page fetching for AI agents, on top of DeepSeek's Search and Fetch APIs. An agent skill, plus a Cloudflare Worker you host yourself.
What you get
| Skill | A SKILL.md that teaches an agent the search operators, result scores, error handling, rate limits and cost, with a zero-dependency CLI. |
|---|---|
| Worker | Access tokens, optional KV cache, batch extract, Tavily-shaped /search and /extract, and an MCP endpoint. |
| Licence | MIT. Bring your own DeepSeek key. |
Deploy your own
git clone https://github.com/CreateSun/deepseek-web-search
cd deepseek-web-search/worker
npm install
npx wrangler login
npx wrangler secret put DEEPSEEK_API_KEY
npx wrangler secret put ACCESS_TOKENS
npx wrangler deploy
Callers send Authorization: Bearer <token> and your key stays on the server. Callers may instead send their own key in X-DeepSeek-Key; set ALLOW_BYOK = "false" to turn that off.
Try the demo instance
The demo Worker holds no DeepSeek key. It only forwards a key you send, and it does not store or log it. Because of that you are trusting me with the key, so use a throwaway one, or deploy your own.
curl https://deepseek-web-search.1819840437.workers.dev/v1/search \
-H "X-DeepSeek-Key: $DEEPSEEK_API_KEY" -H "Content-Type: application/json" \
-d '{"query":"DeepSeek V4 site:github.com","count":5}'
Endpoints
POST /v1/search | DeepSeek's native search body |
|---|---|
POST /v1/fetch | {"url"} returns Markdown |
POST /search | Tavily-shaped: domains, time_range, lang, optional cited answer |
POST /extract | Up to 20 URLs, partial failures reported |
POST /mcp | Tools web_search and web_fetch |
Cost and honesty
DeepSeek charges 5 CNY per 1,000 successful Search or Fetch requests, with a 5 QPS limit per account. This project adds a thin layer on that and does not resell it. It is a utility, not a product; the feasibility notes explain why.