[{"data":1,"prerenderedAt":516},["ShallowReactive",2],{"\u002Fblog\u002Fdeepseek-api-web-search\u002F:en":3,"\u002Fblog\u002Fdeepseek-api-web-search\u002F-surround:en":418,"blog-all-posts:en":419},{"id":4,"title":5,"author":6,"body":10,"date":401,"description":402,"extension":403,"image":404,"locale":405,"meta":406,"minRead":215,"navigation":407,"original":408,"path":409,"pinned":408,"seo":410,"source":411,"sourceUrl":23,"stem":412,"tags":413,"updated":404,"__hash__":417},"blog\u002Fblog\u002Fdeepseek-api-web-search.en.md","DeepSeek's API has built-in web search — freeload the official search via the Responses API",{"name":7,"avatar":8},"Chen Dahuang",{"src":9,"alt":7},"\u002Favatar.jpg",{"type":11,"value":12,"toc":394},"minimark",[13,28,31,36,53,56,60,67,70,322,325,329,332,335,341,345,361,365,380,383,390],[14,15,16],"blockquote",{},[17,18,19,20,27],"p",{},"Originally posted on ",[21,22,26],"a",{"href":23,"rel":24},"https:\u002F\u002Fx.com\u002Frealchendahuang\u002Fstatus\u002F2084826975102030013",[25],"nofollow","X",". This one blew up — 230k views, 1000+ likes. I'll expand on the details here.",[17,29,30],{},"Found something great: DeepSeek actually shipped web search directly inside its API.",[32,33,35],"h2",{"id":34},"in-one-sentence","In one sentence",[17,37,38,39,43,44,48,49,52],{},"Call the ",[40,41,42],"code",{},"deepseek-v4-flash"," model through the ",[45,46,47],"strong",{},"Responses"," interface. Just declare a ",[40,50,51],{},"web_search"," tool in the request parameters, and you get DeepSeek's server-side search capability.",[17,54,55],{},"No integrating a third-party search engine, no applying for a separate search API key — the entire search pipeline is hosted by DeepSeek.",[32,57,59],{"id":58},"how-to-use-it","How to use it",[17,61,62,63],{},"Official docs: ",[21,64,65],{"href":65,"rel":66},"https:\u002F\u002Fapi-docs.deepseek.com\u002Fzh-cn\u002Fguides\u002Fresponses_api",[25],[17,68,69],{},"The core is just declaring the tool:",[71,72,77],"pre",{"className":73,"code":74,"language":75,"meta":76,"style":76},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const response = await fetch('https:\u002F\u002Fapi.deepseek.com\u002Fresponses', {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'Authorization': `Bearer ${process.env.DEEPSEEK_API_KEY}`\n  },\n  body: JSON.stringify({\n    model: 'deepseek-v4-flash',\n    tools: [{ type: 'web_search' }],\n    input: 'What major things happened in the AI industry in August 2026?'\n  })\n})\n","js","",[40,78,79,122,143,153,175,213,219,240,256,289,305,314],{"__ignoreMap":76},[80,81,84,88,92,96,100,104,107,110,114,116,119],"span",{"class":82,"line":83},"line",1,[80,85,87],{"class":86},"spNyl","const",[80,89,91],{"class":90},"sTEyZ"," response ",[80,93,95],{"class":94},"sMK4o","=",[80,97,99],{"class":98},"s7zQu"," await",[80,101,103],{"class":102},"s2Zo4"," fetch",[80,105,106],{"class":90},"(",[80,108,109],{"class":94},"'",[80,111,113],{"class":112},"sfazB","https:\u002F\u002Fapi.deepseek.com\u002Fresponses",[80,115,109],{"class":94},[80,117,118],{"class":94},",",[80,120,121],{"class":94}," {\n",[80,123,125,129,132,135,138,140],{"class":82,"line":124},2,[80,126,128],{"class":127},"swJcz","  method",[80,130,131],{"class":94},":",[80,133,134],{"class":94}," '",[80,136,137],{"class":112},"POST",[80,139,109],{"class":94},[80,141,142],{"class":94},",\n",[80,144,146,149,151],{"class":82,"line":145},3,[80,147,148],{"class":127},"  headers",[80,150,131],{"class":94},[80,152,121],{"class":94},[80,154,156,159,162,164,166,168,171,173],{"class":82,"line":155},4,[80,157,158],{"class":94},"    '",[80,160,161],{"class":127},"Content-Type",[80,163,109],{"class":94},[80,165,131],{"class":94},[80,167,134],{"class":94},[80,169,170],{"class":112},"application\u002Fjson",[80,172,109],{"class":94},[80,174,142],{"class":94},[80,176,178,180,183,185,187,190,193,196,199,202,205,207,210],{"class":82,"line":177},5,[80,179,158],{"class":94},[80,181,182],{"class":127},"Authorization",[80,184,109],{"class":94},[80,186,131],{"class":94},[80,188,189],{"class":94}," `",[80,191,192],{"class":112},"Bearer ",[80,194,195],{"class":94},"${",[80,197,198],{"class":90},"process",[80,200,201],{"class":94},".",[80,203,204],{"class":90},"env",[80,206,201],{"class":94},[80,208,209],{"class":90},"DEEPSEEK_API_KEY",[80,211,212],{"class":94},"}`\n",[80,214,216],{"class":82,"line":215},6,[80,217,218],{"class":94},"  },\n",[80,220,222,225,227,230,232,235,237],{"class":82,"line":221},7,[80,223,224],{"class":127},"  body",[80,226,131],{"class":94},[80,228,229],{"class":90}," JSON",[80,231,201],{"class":94},[80,233,234],{"class":102},"stringify",[80,236,106],{"class":90},[80,238,239],{"class":94},"{\n",[80,241,243,246,248,250,252,254],{"class":82,"line":242},8,[80,244,245],{"class":127},"    model",[80,247,131],{"class":94},[80,249,134],{"class":94},[80,251,42],{"class":112},[80,253,109],{"class":94},[80,255,142],{"class":94},[80,257,259,262,264,267,270,273,275,277,279,281,284,287],{"class":82,"line":258},9,[80,260,261],{"class":127},"    tools",[80,263,131],{"class":94},[80,265,266],{"class":90}," [",[80,268,269],{"class":94},"{",[80,271,272],{"class":127}," type",[80,274,131],{"class":94},[80,276,134],{"class":94},[80,278,51],{"class":112},[80,280,109],{"class":94},[80,282,283],{"class":94}," }",[80,285,286],{"class":90},"]",[80,288,142],{"class":94},[80,290,292,295,297,299,302],{"class":82,"line":291},10,[80,293,294],{"class":127},"    input",[80,296,131],{"class":94},[80,298,134],{"class":94},[80,300,301],{"class":112},"What major things happened in the AI industry in August 2026?",[80,303,304],{"class":94},"'\n",[80,306,308,311],{"class":82,"line":307},11,[80,309,310],{"class":94},"  }",[80,312,313],{"class":90},")\n",[80,315,317,320],{"class":82,"line":316},12,[80,318,319],{"class":94},"}",[80,321,313],{"class":90},[17,323,324],{},"That's it. The searching, fetching, parsing, and citing are all done on DeepSeek's side.",[32,326,328],{"id":327},"why-this-matters","Why this matters",[17,330,331],{},"Previously, to give an AI real-time information, you had to build the whole pipeline yourself: pick a search engine (SerpAPI, Bing Search, whatever) → apply for an API key → write the fetch-and-parse code → stuff the results into context → keep an eye on the budget.",[17,333,334],{},"That's a day or two at minimum, maybe a week if you hit snags, and every step costs money: search APIs bill per request, and scraping means fighting anti-bot measures.",[17,336,337,338,340],{},"Now DeepSeek just built it in, using the absurdly cheap ",[40,339,42],{}," model. Search and generation in one pipeline, cheap enough to use like running water.",[32,342,344],{"id":343},"good-use-cases","Good use cases",[346,347,348,352,355,358],"ul",{},[349,350,351],"li",{},"Writing anything time-sensitive (industry news, product comparisons, policy explainers)",[349,353,354],{},"Building agents: steps that need to look things up before deciding",[349,356,357],{},"Customer support \u002F Q&A systems: search the latest info before answering",[349,359,360],{},"Any scenario where the model's knowledge cutoff holds you back",[32,362,364],{"id":363},"notes","Notes",[366,367,368,374,377],"ol",{},[349,369,370,373],{},[45,371,372],{},"Use the Responses interface",", not the old Chat Completions interface. The old one doesn't have this tool.",[349,375,376],{},"The granularity of web search and the citation format are in the official docs — worth running it once to see the response structure.",[349,378,379],{},"There's a cache discount mechanism — make use of it for long-context scenarios, it saves a lot.",[17,381,382],{},"This is a genuine freebie: the official team gave away the most painful part of search infrastructure. If you need it, just copy the homework.",[17,384,385,386],{},"Related: ",[21,387,389],{"href":388},"\u002Fblog\u002Fdeepseek-v4-flash-review","DeepSeek V4 Flash — hands-on review of the stable release",[391,392,393],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":76,"searchDepth":124,"depth":124,"links":395},[396,397,398,399,400],{"id":34,"depth":124,"text":35},{"id":58,"depth":124,"text":59},{"id":327,"depth":124,"text":328},{"id":343,"depth":124,"text":344},{"id":363,"depth":124,"text":364},"2026-08-05","DeepSeek built web search straight into the API: call deepseek-v4-flash through the Responses interface and declare the web_search tool. No third-party search engine integration, no search API key required.","md",null,"en",{},true,false,"\u002Fblog\u002Fdeepseek-api-web-search",{"title":5,"description":402},"x","blog\u002Fdeepseek-api-web-search.en",[414,415,416],"DeepSeek","API","AI tools","PKJnngtLZQ-CRciHjqt8luZoXhdo0nZNmxVoGFY8GD4",[404,404],[420,428,437,439,444,451,458,466,473,479,485,493,500,508],{"path":421,"title":422,"description":423,"date":424,"minRead":215,"tags":425},"\u002Fblog\u002Fagent-harness-selection","After tinkering with Pi Agent, OMP, Codex, and ZCode, why I finally chose OpenCode + OpenChamber","A retrospective on choosing an Agent Harness: three criteria — GUI experience, vendor lock-in, and freedom for secondary development — ruled out Pi Agent, OMP, Codex, and ZCode, and finally settled on the OpenCode core + OpenChamber interface.","2026-08-06",[426,427],"AI Agent","Tool selection",{"path":429,"title":430,"description":431,"date":432,"minRead":215,"tags":433},"\u002Fblog\u002Fcloudflare-broke-stack","2026 indie dev best practices: the Cloudflare \"broke-ass all-in-one\" stack","The zero-cost tech stack for indie developers: Codex for writing code, GitHub for version control, Stripe for payments, TanStack Start for frontend, Hono + Workers for backend, D1 for database, R2 for storage, KV for caching — all running on Cloudflare.","2026-06-15",[434,435,436],"Cloudflare","Indie development","Tech stack",{"path":409,"title":5,"description":402,"date":401,"minRead":215,"tags":438},[414,415,416],{"path":388,"title":440,"description":441,"date":401,"minRead":221,"tags":442},"DeepSeek V4 Flash stable release, hands-on: cheap, fast, 1M context, built-in search","A few days deep-diving the stable DeepSeek V4 Flash release: aggressively cheap, lightning fast, 1M context, official built-in web search, fully open source. The one weakness is multimodality — but you can patch it by combining other models.",[414,443,416],"Model review",{"path":445,"title":446,"description":447,"date":432,"minRead":242,"tags":448},"\u002Fblog\u002Ffree-cloudflare","How free users can squeeze Cloudflare dry — how far does the free tier actually get you?","Cloudflare's free tier can carry an entire personal internet infrastructure: DNS, CDN, Pages, Workers, KV, D1, R2, email, Tunnel, AI Gateway and more.",[434,449,450],"Free tier","Deployment",{"path":452,"title":453,"description":454,"date":455,"minRead":242,"tags":456},"\u002Fblog\u002Fmodel-harness-decoupling","The First-Party Harness Isn't Always the Best Answer: In the Open-Model Era, Pick Your Model and Harness Separately","Using Claude? Go Claude Code. In the open-model era that instinct deserves an upgrade. The first-party advantage is real, but training a good model and building a good harness are two different kinds of engineering — here's why models and harnesses are now separable choices, plus a positioning map of five harnesses.","2026-09-09",[426,457,427],"Harness",{"path":459,"title":460,"description":461,"date":455,"minRead":242,"tags":462},"\u002Fblog\u002Fopencode-productive-stack","Stable, Fast, Productive, Cheap: My AI Coding Stack, Documented","OpenCode + OpenChamber + two DeepSeek V4 Flash subscriptions: 15 projects running code simultaneously and the quota barely moved. The full configuration laid out — context pruning, layered memory, desktop automation, and the \"stick with the original pairing\" lesson.",[463,464,465],"OpenCode","AI Coding","Configuration",{"path":467,"title":468,"description":469,"date":470,"minRead":291,"tags":471},"\u002Fblog\u002Fproduct-faxin-principle","The founding-intention principle: why indie developers must learn to let go","Why do you set out? Who do you set out for? Which problem are you actually trying to solve? A product's sharpness comes from what you dare to cut.","2026-06-20",[472,435],"Product thinking",{"path":474,"title":475,"description":476,"date":470,"minRead":242,"tags":477},"\u002Fblog\u002Fproduct-pain-vs-itch","Don't get carried away when users say \"that's awesome\": pain points vs. itch points","Verbal approval is worth nothing. There's only one hard standard for judging demand: what the user is willing to pay.",[472,478],"Demand judgment",{"path":480,"title":481,"description":482,"date":424,"minRead":177,"tags":483},"\u002Fblog\u002Fqwen-vision-for-deepseek","Giving DeepSeek multimodality: the Qwen-3.7-Flash vision approach","DeepSeek V4 Flash has no multimodality — what do you do for image understanding? After surveying the market, the most cost-effective option right now is Qwen-3.7-Flash: recognizing an image costs almost nothing, and pairing it with V4 Flash patches the gap.",[414,484,443],"Multimodality",{"path":486,"title":487,"description":488,"date":489,"minRead":155,"tags":490},"\u002Fblog\u002Fsub-store-cloudflare","I moved my proxy subscription aggregation to Cloudflare","Merge multiple proxy services plus your own nodes into one single subscription, with routing rules configured server-side — clients just subscribe.","2026-06-28",[434,491,492],"Circumvention","Open-source project",{"path":494,"title":495,"description":496,"date":455,"minRead":221,"tags":497},"\u002Fblog\u002Ftui-cognitive-bandwidth","TUI Is Killing Your Cognitive Bandwidth: Time to Shatter the \"Geek Filter\" in AI Coding","A pile of AI coding agents are rushing to ship TUIs, stuffing interaction back into the 1980s terminal paradigm and calling it \"immersive\" and \"respectful of programmers.\" This piece breaks down the three mechanisms by which TUI systematically lowers your cognitive bandwidth — and why Web UI is the right answer.",[464,498,499],"Interaction design","Essay",{"path":501,"title":502,"description":503,"date":504,"minRead":215,"tags":505},"\u002Fblog\u002Fvalue-not-external","Debating whether something has value is itself worthless","Our value is not defined by anyone. In the age of AI, how should we understand ourselves?","2026-06-18",[506,507],"AI thinking","Humanistic essay",{"path":509,"title":510,"description":511,"date":512,"minRead":316,"tags":513},"\u002Fblog\u002Fx-growth-1000-followers","Gained 1000+ followers in a little over a day — here's what I did","In June I ran my X account seriously and gained 1000+ followers in a little over a day. This post records what I did and the feedback I got.","2026-06-16",[514,515],"X operations","Content growth",1789752312959]