[{"data":1,"prerenderedAt":512},["ShallowReactive",2],{"\u002Fblog\u002Fdeepseek-api-web-search\u002F:zh-Hant":3,"\u002Fblog\u002Fdeepseek-api-web-search\u002F-surround:zh-Hant":413,"blog-all-posts:zh-Hant":414},{"id":4,"title":5,"author":6,"body":10,"date":396,"description":397,"extension":398,"image":399,"locale":400,"meta":401,"minRead":213,"navigation":402,"original":403,"path":404,"pinned":403,"seo":405,"source":406,"sourceUrl":23,"stem":407,"tags":408,"updated":399,"__hash__":412},"blog\u002Fblog\u002Fdeepseek-api-web-search.zh-Hant.md","DeepSeek API 內建聯網搜尋，Responses API 白拿官方搜尋能力",{"name":7,"avatar":8},"陳大黃",{"src":9,"alt":7},"\u002Favatar.jpg",{"type":11,"value":12,"toc":389},"minimark",[13,28,31,35,52,55,58,65,68,320,323,326,329,332,338,341,357,360,375,378,385],[14,15,16],"blockquote",{},[17,18,19,20,27],"p",{},"原文發表於 ",[21,22,26],"a",{"href":23,"rel":24},"https:\u002F\u002Fx.com\u002Frealchendahuang\u002Fstatus\u002F2084826975102030013",[25],"nofollow","X","，這篇爆了，23 萬瀏覽次數、1000+ 讚。這裡把細節展開講清楚。",[17,29,30],{},"發現個好東西：DeepSeek 官方居然在 API 裡內建了聯網搜尋。",[32,33,34],"h2",{"id":34},"一句話說清楚",[17,36,37,38,42,43,47,48,51],{},"用 ",[39,40,41],"strong",{},"Responses 格式","的介面呼叫 ",[44,45,46],"code",{},"deepseek-v4-flash"," 模型，只要在請求參數裡宣告 ",[44,49,50],{},"web_search"," 工具，就能直接用上 DeepSeek 伺服器端執行的搜尋能力。",[17,53,54],{},"不用自己接第三方搜尋引擎，不用額外申請搜尋介面金鑰，整套搜尋流程官方直接託管了。",[32,56,57],{"id":57},"怎麼用",[17,59,60,61],{},"官方文件：",[21,62,63],{"href":63,"rel":64},"https:\u002F\u002Fapi-docs.deepseek.com\u002Fzh-cn\u002Fguides\u002Fresponses_api",[25],[17,66,67],{},"核心就是把工具宣告出來：",[69,70,75],"pre",{"className":71,"code":72,"language":73,"meta":74,"style":74},"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: '2026 年 8 月 AI 行業發生了什麼大事？'\n  })\n})\n","js","",[44,76,77,120,141,151,173,211,217,238,254,287,303,312],{"__ignoreMap":74},[78,79,82,86,90,94,98,102,105,108,112,114,117],"span",{"class":80,"line":81},"line",1,[78,83,85],{"class":84},"spNyl","const",[78,87,89],{"class":88},"sTEyZ"," response ",[78,91,93],{"class":92},"sMK4o","=",[78,95,97],{"class":96},"s7zQu"," await",[78,99,101],{"class":100},"s2Zo4"," fetch",[78,103,104],{"class":88},"(",[78,106,107],{"class":92},"'",[78,109,111],{"class":110},"sfazB","https:\u002F\u002Fapi.deepseek.com\u002Fresponses",[78,113,107],{"class":92},[78,115,116],{"class":92},",",[78,118,119],{"class":92}," {\n",[78,121,123,127,130,133,136,138],{"class":80,"line":122},2,[78,124,126],{"class":125},"swJcz","  method",[78,128,129],{"class":92},":",[78,131,132],{"class":92}," '",[78,134,135],{"class":110},"POST",[78,137,107],{"class":92},[78,139,140],{"class":92},",\n",[78,142,144,147,149],{"class":80,"line":143},3,[78,145,146],{"class":125},"  headers",[78,148,129],{"class":92},[78,150,119],{"class":92},[78,152,154,157,160,162,164,166,169,171],{"class":80,"line":153},4,[78,155,156],{"class":92},"    '",[78,158,159],{"class":125},"Content-Type",[78,161,107],{"class":92},[78,163,129],{"class":92},[78,165,132],{"class":92},[78,167,168],{"class":110},"application\u002Fjson",[78,170,107],{"class":92},[78,172,140],{"class":92},[78,174,176,178,181,183,185,188,191,194,197,200,203,205,208],{"class":80,"line":175},5,[78,177,156],{"class":92},[78,179,180],{"class":125},"Authorization",[78,182,107],{"class":92},[78,184,129],{"class":92},[78,186,187],{"class":92}," `",[78,189,190],{"class":110},"Bearer ",[78,192,193],{"class":92},"${",[78,195,196],{"class":88},"process",[78,198,199],{"class":92},".",[78,201,202],{"class":88},"env",[78,204,199],{"class":92},[78,206,207],{"class":88},"DEEPSEEK_API_KEY",[78,209,210],{"class":92},"}`\n",[78,212,214],{"class":80,"line":213},6,[78,215,216],{"class":92},"  },\n",[78,218,220,223,225,228,230,233,235],{"class":80,"line":219},7,[78,221,222],{"class":125},"  body",[78,224,129],{"class":92},[78,226,227],{"class":88}," JSON",[78,229,199],{"class":92},[78,231,232],{"class":100},"stringify",[78,234,104],{"class":88},[78,236,237],{"class":92},"{\n",[78,239,241,244,246,248,250,252],{"class":80,"line":240},8,[78,242,243],{"class":125},"    model",[78,245,129],{"class":92},[78,247,132],{"class":92},[78,249,46],{"class":110},[78,251,107],{"class":92},[78,253,140],{"class":92},[78,255,257,260,262,265,268,271,273,275,277,279,282,285],{"class":80,"line":256},9,[78,258,259],{"class":125},"    tools",[78,261,129],{"class":92},[78,263,264],{"class":88}," [",[78,266,267],{"class":92},"{",[78,269,270],{"class":125}," type",[78,272,129],{"class":92},[78,274,132],{"class":92},[78,276,50],{"class":110},[78,278,107],{"class":92},[78,280,281],{"class":92}," }",[78,283,284],{"class":88},"]",[78,286,140],{"class":92},[78,288,290,293,295,297,300],{"class":80,"line":289},10,[78,291,292],{"class":125},"    input",[78,294,129],{"class":92},[78,296,132],{"class":92},[78,298,299],{"class":110},"2026 年 8 月 AI 行業發生了什麼大事？",[78,301,302],{"class":92},"'\n",[78,304,306,309],{"class":80,"line":305},11,[78,307,308],{"class":92},"  }",[78,310,311],{"class":88},")\n",[78,313,315,318],{"class":80,"line":314},12,[78,316,317],{"class":92},"}",[78,319,311],{"class":88},[17,321,322],{},"就只是這樣。剩下的搜尋、抓取、解析、引用，全是 DeepSeek 伺服器端的活。",[32,324,325],{"id":325},"為什麼這件事很關鍵",[17,327,328],{},"以前要讓 AI 有即時資訊，你得自己搭一條鏈路：選搜尋引擎（SerpAPI、Bing Search 之類）→ 申請 API Key → 寫抓取和解析的程式碼 → 把搜尋結果塞進上下文 → 還要控制預算。",[17,330,331],{},"這一套弄下來，少說一兩天，多了搞不好一個禮拜，而且每個環節都是錢：搜尋 API 按次計費，抓取還要處理反爬。",[17,333,334,335,337],{},"現在 DeepSeek 直接內建了，而且用的是 ",[44,336,46],{}," 這個便宜到離譜的模型。搜尋和生成一條鏈路，成本低到可以當自來水用。",[32,339,340],{"id":340},"適合什麼場景",[342,343,344,348,351,354],"ul",{},[345,346,347],"li",{},"寫需要時效性的內容（產業動態、產品比較、政策解讀）",[345,349,350],{},"做 Agent：需要先查資料再決策的環節",[345,352,353],{},"客服／問答系統：回答前先搜一下最新資訊",[345,355,356],{},"任何「模型知識截止日期」扯後腿的場景",[32,358,359],{"id":359},"注意事項",[361,362,363,369,372],"ol",{},[345,364,365,368],{},[39,366,367],{},"用 Responses 介面","，不是舊的 Chat Completions 介面。舊介面沒有這個工具。",[345,370,371],{},"聯網搜尋的粒度、引用格式，官方文件裡都有，建議實際跑一次看回傳結構。",[345,373,374],{},"有快取打折機制，長上下文場景記得利用起來，能省不少。",[17,376,377],{},"這條是真的白拿，官方把最麻煩的搜尋基礎設施免費送給你了。有需要的直接抄作業。",[17,379,380,381],{},"相關閱讀：",[21,382,384],{"href":383},"\u002Fblog\u002Fdeepseek-v4-flash-review","DeepSeek V4 Flash 正式版深度體驗",[386,387,388],"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":74,"searchDepth":122,"depth":122,"links":390},[391,392,393,394,395],{"id":34,"depth":122,"text":34},{"id":57,"depth":122,"text":57},{"id":325,"depth":122,"text":325},{"id":340,"depth":122,"text":340},{"id":359,"depth":122,"text":359},"2026-08-05","DeepSeek 官方在 API 裡內建了聯網搜尋：用 Responses 介面呼叫 deepseek-v4-flash，宣告 web_search 工具即可，不用自己接第三方搜尋引擎，也不用申請搜尋金鑰。","md",null,"zh-Hant",{},true,false,"\u002Fblog\u002Fdeepseek-api-web-search",{"title":5,"description":397},"x","blog\u002Fdeepseek-api-web-search.zh-Hant",[409,410,411],"DeepSeek","API","AI 工具","KoCLVLn-_fCjUWbZJM7j8Zlxj1r6lSvV9Cj8nOz0N5k",[399,399],[415,423,432,434,439,446,454,462,469,475,481,489,496,504],{"path":416,"title":417,"description":418,"date":419,"minRead":213,"tags":420},"\u002Fblog\u002Fagent-harness-selection","試遍了 Pi Agent、OMP、Codex、ZCode，我最後為什麼選了 OpenCode + OpenChamber","試過一輪 Agent Harness 後的選型復盤：以 GUI 體驗、供應商綁定、二次開發自由度三個標準，排除了 Pi Agent、OMP、Codex、ZCode，最後選了 OpenCode 核心 + OpenChamber 介面。","2026-08-06",[421,422],"AI Agent","工具選型",{"path":424,"title":425,"description":426,"date":427,"minRead":213,"tags":428},"\u002Fblog\u002Fcloudflare-broke-stack","2026 獨立開發最佳實踐：Cloudflare 窮鬼全家餐","獨立開發者的零成本技術棧：Codex 寫程式、GitHub 管版本、Stripe 收款，前端 TanStack Start、後端 Hono + Workers、資料庫 D1、儲存 R2、快取 KV，全部跑在 Cloudflare 上。","2026-06-15",[429,430,431],"Cloudflare","獨立開發","技術棧",{"path":404,"title":5,"description":397,"date":396,"minRead":213,"tags":433},[409,410,411],{"path":383,"title":435,"description":436,"date":396,"minRead":219,"tags":437},"DeepSeek V4 Flash 正式版深度體驗：便宜、快、1M 上下文、內建搜尋","深度體驗了幾天 DeepSeek V4 Flash 正式版：極致的便宜、快如閃電、1M 上下文、官方內建聯網搜尋、完全開源。唯一的短板是多模態，但可以組合其他模型補上。",[409,438,411],"模型評測",{"path":440,"title":441,"description":442,"date":427,"minRead":240,"tags":443},"\u002Fblog\u002Ffree-cloudflare","免費使用者如何榨乾 Cloudflare，免費版到底能白嫖到什麼程度？","Cloudflare 免費版能撐起一整套個人網路基礎設施：DNS、CDN、Pages、Workers、KV、D1、R2、信箱、Tunnel、AI 閘道等。",[429,444,445],"免費額度","部署",{"path":447,"title":448,"description":449,"date":450,"minRead":240,"tags":451},"\u002Fblog\u002Fmodel-harness-decoupling","原廠 Harness 未必是版本答案：開放模型時代，模型和 Harness 要分開選","用 Claude 就上 Claude Code？開放模型時代這個直覺該升級了。原廠的優勢是真的，但訓練好模型和做好 Harness 是兩門工程——這篇文章講清楚為什麼模型與 Harness 已經可以分開選，以及五家 Harness 的定位地圖。","2026-09-09",[421,452,453],"Harness","選型",{"path":455,"title":456,"description":457,"date":450,"minRead":240,"tags":458},"\u002Fblog\u002Fopencode-productive-stack","穩定、快速、高產、便宜：我的 AI Coding 全家桶實錄","OpenCode + OpenChamber + 兩份 DeepSeek V4 Flash 訂閱，15 個項目同時跑代碼，額度只掉一點點。這篇文章攤開我的完整配置：上下文剪枝、分層記憶、桌面自動化，以及「原湯化原食」的選型教訓。",[459,460,461],"OpenCode","AI 程式設計","配置",{"path":463,"title":464,"description":465,"date":466,"minRead":289,"tags":467},"\u002Fblog\u002Fproduct-faxin-principle","發心原理：獨立開發者為什麼要學會捨棄","你為什麼出發？你為誰出發？你到底想解決哪一個問題？產品的鋒利感來自捨得和放棄。","2026-06-20",[468,430],"產品思維",{"path":470,"title":471,"description":472,"date":466,"minRead":240,"tags":473},"\u002Fblog\u002Fproduct-pain-vs-itch","使用者說「很屌」別上頭：痛點與癢點","口頭喜歡一文不值。判斷需求只有一個硬標準：看使用者願意付出什麼。",[468,474],"需求判斷",{"path":476,"title":477,"description":478,"date":419,"minRead":175,"tags":479},"\u002Fblog\u002Fqwen-vision-for-deepseek","給 DeepSeek 補上多模態：Qwen-3.7-Flash 識圖方案","DeepSeek V4 Flash 沒有多模態，識圖怎麼辦？研究後目前 CP 值最高的方案是 Qwen-3.7-Flash：辨識一張圖片成本極低，和 V4 Flash 組合使用補齊短板。",[409,480,438],"多模態",{"path":482,"title":483,"description":484,"date":485,"minRead":153,"tags":486},"\u002Fblog\u002Fsub-store-cloudflare","我把機場訂閱聚合搬到了 Cloudflare 上","多個機場加自建節點合成一條訂閱，分流規則在伺服器端配好，用戶端只管訂閱。","2026-06-28",[429,487,488],"翻牆","開源專案",{"path":490,"title":491,"description":492,"date":450,"minRead":219,"tags":493},"\u002Fblog\u002Ftui-cognitive-bandwidth","TUI 正在殺死你的認知頻寬：AI Coding 的「極客濾鏡」該碎了","一堆 AI Coding Agent 搶著上 TUI，把互動塞回 80 年代的終端範式，還美其名曰「沉浸式」「尊重程式設計師」。這篇文章拆解 TUI 系統性降低認知頻寬的三個機制，以及 Web UI 為什麼才是正解。",[460,494,495],"互動設計","隨筆",{"path":497,"title":498,"description":499,"date":500,"minRead":213,"tags":501},"\u002Fblog\u002Fvalue-not-external","討論有沒有價值，這件事本身就沒有價值","我們的價值不由任何人定義。人在 AI 時代，到底應該如何理解自己。","2026-06-18",[502,503],"AI 思考","人文隨筆",{"path":505,"title":506,"description":507,"date":508,"minRead":314,"tags":509},"\u002Fblog\u002Fx-growth-1000-followers","一天多漲粉 1000+，我做了什麼","6 月認真經營 X，一天多漲粉 1000+。這篇記錄我當時做過的事和得到的回饋。","2026-06-16",[510,511],"X 經營","內容增長",1789752317714]