Google Custom Search API 停用:7 個替代方案價格比較

Google 已停止受理 Custom Search JSON API 的新客戶,並將於 2027 年 1 月 1 日對所有使用者關閉。本文整理它原本的價格、可以改用哪些服務、少了 cx 之後如何繼續做指定網站搜尋,以及一個回傳原有回應格式的相容函式。
一句話總結
- •根據 2026-11-19 查看的 Google API 頁面,Custom Search JSON API 已不再受理新客戶,既有客戶必須在 2027 年 1 月 1 日前完成移轉。
- •如果只是在 50 個以內的自有網域中搜尋,Google 建議改用 Vertex AI Search;若要搜尋整個網路,就需要第三方搜尋 API。
- •2026-11-19 的每千次查詢牌價:Serper $1、Exa $4 起、Brave $5、You.com $5、Tavily $8、API Pick $15、SerpApi 入門方案 $25。Custom Search 原價為 $5。
- •在我們的測試中,透過 API Pick 送出的 20 筆 site: 查詢,全部只回傳指定網域的頁面(100 筆結果中 100 筆),因此 cx 的網站限制可以改用查詢運算子取代。
- •API Pick 的價格是 Custom Search 的三倍,每次呼叫回傳 5 筆結果而非 10 筆。它適合 AI Agent 與用量不大的工具,不適合用來大量取代 SERP。
Google Custom Search JSON API 什麼時候停止服務?
Google 已停止受理 Custom Search JSON API 的新客戶,既有客戶必須在 2027 年 1 月 1 日前改用其他方案。 這兩點都寫在該 API 的總覽頁面上,我們在 2026-11-19 查看過。價格說明的段落也補充,目前的價格「僅適用於既有 Custom Search JSON API 客戶,直到該服務於 2027 年 1 月 1 日停止為止」。
實際上代表的是:
| 2026-11-19 時的狀態 | |
|---|---|
| 新的 API 金鑰或專案 | 不再受理 |
| 既有客戶 | 可使用到 2027 年 1 月 1 日 |
| 免費額度 | 每天 100 次查詢 |
| 付費使用 | 每千次查詢 $5,每天最多 10,000 次 |
| Google 建議的替代方案 | Vertex AI Search,可搜尋最多 50 個網域 |
| Google 的全網搜尋 | 沒有自助申請管道;Google 要求透過表單登記意願 |
資料來源:Custom Search JSON API overview,Google for Developers,2026-11-19 查看。
API Pick 是我們開發的產品,也是下面列出的替代方案之一。本文的價格全部取自各廠商當天的官方頁面,文中也有一節專門說明哪些情況不適合用 API Pick。
應該移轉到哪裡?
依照你的可程式化搜尋引擎(Programmable Search Engine)實際負責的工作來選:搜尋自家網站、讓使用者搜尋整個網路,還是提供資料給 AI Agent。 這三種情況需要不同的替代方案。
| 原本用 Custom Search 做什麼 | 改用 | 原因 |
|---|---|---|
| 為自家網站或最多 50 個網域提供搜尋框 | Vertex AI Search(Google Cloud) | Google 官方建議;只索引並排序你的網站 |
| 大量取得與 Google 一致的全網結果 | SERP API(Serper、SerpApi) | 以 JSON 回傳 Google 搜尋結果頁,包括每頁 10 筆結果 |
| 作為 LLM 或 Agent 的搜尋工具 | AI 搜尋 API(Brave、Exa、Tavily、You.com、API Pick) | 回傳整理過的摘要或頁面內文,長度適合放進模型的 context |
如果你用 cx 把全網結果限定在少數幾個網站,後兩列的任何一個 API 都可能可以用 site: 運算子做到。在依賴這個做法之前,請先看下方的測試。
各替代方案每千次查詢要多少錢?
以牌價來看,Serper 最便宜,每千次查詢 $1;Exa 起價 $4;Brave 和 You.com 收 $5(與 Custom Search 相同);Tavily $8;API Pick $15;SerpApi 入門方案約 $25。 下表每個數字都是 2026-11-19 在廠商官方頁面上讀取的。
| 每千次查詢價格 | 免費額度 | 每次呼叫結果數 | 備註 | |
|---|---|---|---|---|
| Google Custom Search(即將停止) | $5 | 每天 100 次查詢 | 最多 10 筆 | 每天上限 10,000 次查詢 |
| Serper | $1($50 購買 50,000 點) | 一次性 2,500 次查詢 | 未說明 | Google 結果;點數 6 個月內有效;大包更便宜 |
| Exa | $4 起(Lite);$7(Auto) | 每月 $10 額度 | 基本價最多 10 筆 | 自有索引;額外結果每千筆 $1 |
| Brave Search API | $5 | 每月 $5 額度 | 未說明 | 自有索引;預付點數 |
| You.com | $5 | 一次性 $10 額度 | 未說明 | 回傳 1 筆或 100 筆結果價格相同 |
| Tavily | 隨用隨付 $8 | 每月 1,000 點 | 未說明 | 基本搜尋 = 1 點;月付方案更便宜 |
| API Pick | $15 | 一次性 100 點(6 次搜尋) | 最多 5 筆 | 只對 HTTP 200 回應計費;點數永不過期 |
| SerpApi | 約 $25(Starter:每月 $25 含 1,000 次) | 每月 250 次搜尋 | 未說明 | Google 結果;只計算成功的搜尋 |
資料來源(皆於 2026-11-19 查看):Google Custom Search JSON API、Serper、Exa pricing、Brave Search API、You.com pricing、Tavily credits、SerpApi pricing、API Pick pricing。Vertex AI Search 依查詢次數與已索引資料的 GB 數計費,請見 Google Cloud 定價頁面;2026-11-19 我們無法從該頁面讀到目前的數字,因此沒有列入表格。
表格裡看不出來的兩件事:
- 結果筆數會影響實際價格。 Custom Search 每次呼叫最多回傳 10 筆結果。如果你的程式用
start=11換頁,那麼每次只回傳 5 筆的 API,要取得同樣深度的結果就需要兩倍的呼叫次數。 - 每日上限消失了。 Custom Search 每天到 10,000 次查詢就會停止。上面這些定價頁面我們都沒看到每日上限;有寫限制的,通常是以每秒計算,例如 Serper 入門方案允許每秒 50 次查詢。
沒有 cx 還能做指定網站搜尋嗎?
可以,用 site: 運算子就行,前提是 API 有支援:我們透過 API Pick 送出 20 筆限定網站的查詢,回傳的 100 筆結果全部來自指定網域。 cx 可以把搜尋引擎綁定在一組網站上。大多數替代 API 沒有 cx,所以這個限制只能寫進查詢裡。
我們在 2026-11-18(UTC)對 API Pick 的 POST /api/search/web 送出 20 筆 site:<domain> <query> 格式的查詢,涵蓋技術文件、新聞、政府、研究與論壇類網站:
| 網域 | 查詢 | 結果數 | 屬於指定網域 |
|---|---|---|---|
| docs.python.org | asyncio timeout | 5 | 5 |
| developer.mozilla.org | fetch abort controller | 5 | 5 |
| kubernetes.io | pod disruption budget | 5 | 5 |
| postgresql.org | jsonb index | 5 | 5 |
| react.dev | useEffect cleanup | 5 | 5 |
| nextjs.org | server actions revalidate | 5 | 5 |
| docs.github.com | fine-grained personal access token | 5 | 5 |
| stripe.com | idempotency keys | 5 | 5 |
| learn.microsoft.com | azure functions timeout | 5 | 5 |
| cloud.google.com | vertex ai search pricing | 5 | 5 |
| nih.gov | long covid fatigue | 5 | 5 |
| who.int | measles outbreak 2026 | 5 | 5 |
| bbc.co.uk | bank of england interest rate | 5 | 5 |
| sec.gov | form 8-k item 2.02 | 5 | 5 |
| arxiv.org | speculative decoding | 5 | 5 |
| wikipedia.org | model context protocol | 5 | 5 |
| reddit.com | custom search json api shutting down | 5 | 5 |
| stackoverflow.com | google custom search api 403 | 5 | 5 |
| europa.eu | ai act general purpose ai obligations | 5 | 5 |
| nasa.gov | artemis ii launch date | 5 | 5 |
20 次呼叫全部回傳 HTTP 200。呼叫耗時的中位數是 3.5 秒,最慢一次 12.7 秒。子網域也算作站內結果(例如 nih.gov 底下的 www.ncbi.nlm.nih.gov)。
如果要同時限定多個網站,可以每個網站各查一次再合併結果,或改用有網域篩選參數的 API(Exa 和 Tavily 的文件都有說明)。
程式碼要怎麼移轉?
對應三個欄位,呼叫端的程式碼維持不變:Custom Search 的 items[].title、link 和 snippet,在多數搜尋 API(包括 API Pick)中對應到 title、url 和 snippet。
1找出所有呼叫 Custom Search 的地方
在程式碼庫中搜尋 customsearch/v1、cse().list 或 build("customsearch"。記下哪些呼叫用 cx 限定網站,哪些用 num 或 start 換頁。
2對應回應欄位
| Custom Search JSON API | API Pick /api/search/web |
|---|---|
items[].title | results[].title |
items[].link | results[].url |
items[].snippet | results[].snippet(更長:是整理過的頁面內文,而不是 160 字元的節錄) |
items[].displayLink | results[].url 的主機名稱 |
items[].pagemap | 不回傳 |
searchInformation.totalResults | 不回傳(即 results 的筆數) |
queries.nextPage / start | 不支援換頁;每次呼叫最多 5 筆結果 |
3用相容函式替換原本的呼叫
這個函式回傳與 cse.list(...).execute() 相同的結構,讀取 items 的程式碼可以照常運作。site 參數用來取代只限定單一網站的 cx。
import os, requests
APIPICK_KEY = os.environ["APIPICK_API_KEY"]
def cse_list(q, site=None, **_ignored):
"""Drop-in for cse.list(q=..., cx=...).execute(): returns the CSE response shape."""
query = f"site:{site} {q}" if site else q
r = requests.post(
"https://www.apipick.com/api/search/web",
headers={"x-api-key": APIPICK_KEY},
json={"query": query},
timeout=30,
)
r.raise_for_status()
results = r.json().get("results", [])
return {
"searchInformation": {"totalResults": str(len(results))},
"items": [
{"title": x["title"], "link": x["url"], "snippet": x["snippet"],
"displayLink": x["url"].split("/")[2]}
for x in results
],
}
res = cse_list("rate limits", site="docs.github.com")
for item in res["items"]:
print(item["displayLink"], "|", item["title"])2026-11-19 的輸出:
docs.github.com | Text: rate-limits-for-the-rest-api.md
docs.github.com | Rate limits for the REST API - GitHub Docs
docs.github.com | Rate limits for the REST API - GitHub Enterprise Cloud Docs
docs.github.com | Configuring rate limits - GitHub Enterprise Server 3.20 Docs
docs.github.com | Rate limits and query limits for the GraphQL API - GitHub Docs4用命令列確認
curl -s -X POST https://www.apipick.com/api/search/web \
-H "x-api-key: $APIPICK_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"site:docs.python.org asyncio timeout"}'5在 2027 年 1 月 1 日前新舊並行比對
趁 Custom Search 金鑰還能用,把你最常用的 20 筆查詢同時送給新舊兩邊,比對排名前面的結果。差異在可接受範圍內再切換,之後刪除舊金鑰。
什麼情況下不該選 API Pick?
如果你需要便宜、大量、與 Google 完全一致的結果,API Pick 不是合適的替代方案。 請先想清楚這些取捨:
- 價格是原本的三倍。 一次網頁搜尋消耗 15 點,$1 可買 1,000 點,所以 1,000 次搜尋要 $15;Custom Search 是 $5,Serper 是 $1。
- 每次呼叫只回傳 5 筆結果,而且不支援換頁。原本顯示 10 筆結果,或讓使用者點到第 2 頁的頁面,需要改用其他 API。
- 排序不是 Google 的排序。 如果你的使用者預期看到 Google 的結果順序,SERP API 會更接近。
- 沒有圖片搜尋。 網頁搜尋端點沒有對應 Custom Search
searchType=image的功能。
想更全面比較以 Agent 為主的搜尋 API,可以參考 AI Agent 最佳網頁搜尋 API 以及我們的 Tavily 替代方案價格比較。如果你在考慮用 Gemini 內建的搜尋取代 API,請看 Google 搜尋 Grounding 與搜尋 API 比較。端點本身的文件請見 網頁搜尋 API 頁面。
常見問題
Google Custom Search JSON API 要停止服務了嗎?
是的。Google 的 API 頁面寫明,Custom Search JSON API 已不再受理新客戶,既有客戶必須在 2027 年 1 月 1 日前改用替代方案。其價格僅適用於既有客戶,直到該服務於當天停止為止。
Google Custom Search API 最好的替代方案是什麼?
要看你原本拿它做什麼。如果是搜尋 50 個以內的自有網站,Google 建議使用 Vertex AI Search。如果想用最低價格繼續取得 Google 風格的原始結果,Serper 這類 SERP API 最接近(入門方案每千次 $1)。如果是要提供乾淨摘要給 AI Agent,Brave、Exa、Tavily、You.com 或 API Pick 會更合適。
Google Custom Search API 原本怎麼計費?
每天 100 次查詢免費,超過的部分每千次 $5,每天最多 10,000 次。這個價格現在只適用於既有客戶,有效到 2027 年 1 月 1 日。
有免費的 Google Custom Search API 替代方案嗎?
有幾家提供免費額度,但用量一大就都得付費。2026-11-19 時,Serper 一次性贈送 2,500 次查詢,Tavily 每月 1,000 點,Brave 每月 $5 額度,Exa 每月 $10 額度,You.com 一次性 $10 額度。API Pick 一次性贈送 100 點,可做 6 次網頁搜尋。
沒有 cx 還能限定只搜尋特定網站嗎?
可以,只要新的 API 支援在查詢中使用 site: 運算子。我們在 2026-11-18 對 API Pick 的網頁搜尋送出 20 筆限定網站的查詢,100 筆結果全部來自指定網域。切換前請先用你自己的網域測試,小型網站尤其需要。
Sarah Choy 是 apipick 的 CEO,專注於為 AI Agent 與 LLM 工作流打造可用於正式環境的 API。