Programmable Search Element 付費 API
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Programmable Search Element 現在提供無廣告的付費版本。啟用 Programmable Search Element Payment API 之後,Programmable Search Element 繼續運作時會與無廣告版網頁一模一樣,只是不是廣告隨搜尋結果一起顯示,而是針對每次搜尋收取一筆小額費用。
請注意,只要按照這些操作說明操作,我們的非營利、教育和政府機關使用者都能享有無廣告的體驗。
必要條件
搜尋引擎設定
您需要先建立並設定程式化搜尋引擎,才能使用 Programmable Search Element paid API。如果您尚未建立程式化搜尋引擎,可以先造訪程式化搜尋引擎控制台。
請參閱教學課程,進一步瞭解不同的設定選項。
API 金鑰
Programmable Search Element API 需要使用 API 金鑰。取得金鑰
取得 Programmable Search Element API 金鑰後,您可以使用程式化搜尋引擎控制台將這組金鑰新增至您的搜尋引擎。前往搜尋引擎「總覽」頁面的「廣告」部分,然後將金鑰貼到「付費元素 API 金鑰」欄位中。恭喜,這個搜尋引擎現已啟用 Programmable Search Element API!
如果您想要返回支援廣告的免費搜尋元素,只要在控制台的這個欄位中刪除鍵即可。
定價
Programmable Search Element API 每 1,000 個無廣告搜尋元素查詢收取 $5 美元的費用。您必須在 API 控制台中設定帳單。您可以在 Cloud Platform 主控台中設定配額,藉此限制每日支出上限。
請注意,新的消費者專案會預設為每日無限配額;我們強烈建議您設定足以應付流量的每日配額。一旦達到每日配額限制,凡是使用引擎的搜尋元素查詢,在當天剩餘時間內將遭到拒絕。另請注意,您也可以使用每分鐘和每位使用者每分鐘的配額控管機制 (同時透過 IP 位址來區分使用者)。
Monitoring
有兩種方法可監控 Programmable Search Element API 的使用情形。首先,Cloud Platform 控制台的 API 資訊主頁提供多種預先建構的圖表,用於監控常見指標,例如錯誤率和每秒查詢數。第二,Google Cloud 作業套件提供強大的工具,可用於建立自訂圖表,以及設定快訊。詳情請參閱「API 監控」一文。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThe Programmable Search Element now offers a paid ads-free version, charging a small fee per search instead of displaying ads.\u003c/p\u003e\n"],["\u003cp\u003eNonprofits, educational institutions, and government users can access an ads-free experience through a separate process.\u003c/p\u003e\n"],["\u003cp\u003eTo use the paid version, you need to configure a Programmable Search Engine, obtain an API key, and add it to your search engine settings.\u003c/p\u003e\n"],["\u003cp\u003eThe pricing is $5 per 1000 ad-free searches, with billing and quota management handled through the Google Cloud Platform.\u003c/p\u003e\n"],["\u003cp\u003eYou can monitor usage and set up alerts using tools provided in the Cloud Platform Console and Google Cloud Operations console.\u003c/p\u003e\n"]]],[],null,["# Programmable Search Element Paid API\n\nThe [Programmable Search\nElement](/custom-search/docs/tutorial/implementingsearchbox) now offers a paid\nads-free version. By enabling the Programmable Search Element Paid API your\nProgrammable Search Element will continue to function exactly the same as the\nfree ad-supported version, except that instead of ads being displayed along with\nsearch results you'll instead be charged a small fee for each search.\n\nNote that our nonprofit, education, and government users can get an ads-free\nexperience by following [these\ninstructions](https://support.google.com/programmable-search/answer/12423873).\n\nPrerequisites\n-------------\n\n### Search engine configuration\n\nBefore using the Programmable Search Element Paid API you first need to create\nand configure your Programmable Search Engine. If you have not already created a Programmable Search Engine, you\ncan start by visiting the [Programmable Search Engine control panel](https://programmablesearchengine.google.com/controlpanel/all).\n\nFollow the [tutorial](/custom-search/docs/tutorial/creatingcse) to learn more\nabout different configuration options.\n\n### API key\n\nThe Programmable Search Element API requires the use of an API key. Get a Key\n\nOnce you have a Programmable Search Element API key, you can add this key to\nyour search engine using the [Programmable Search Engine control panel](https://programmablesearchengine.google.com/controlpanel/all). Navigate to the Ads section of your search engine's\nOverview page and paste your key in the \"Paid Element API key\" field.\nCongratulations, the Programmable Search Element API is now active for this\nsearch engine!\n\nIf at any point you wish to return to the free ad-supported search element, just\ndelete the key from this field in the control panel.\n\nPricing\n-------\n\nThe Programmable Search Element API charges $5 per 1000 ad-free search element\nqueries. [Billing](https://cloud.google.com/billing/docs/how-to/manage-billing-account) needs to be configured in the\nAPI Console. Quotas can be configured in the [Cloud Platform\nConsole](https://console.cloud.google.com/apis/dashboard) to help limit maximum\ndaily expenditures.\n\nNote that new consumer projects will default to unlimited daily quota; we\n*strongly* recommend setting a [daily quota](https://console.cloud.google.com/apis/api/programmablesearchelement.googleapis.com/quotas) that is sufficient for\nyour traffic volume. Once the daily quota limit is reached all search element\nqueries using the engine will be denied for the remainder of the day. Note also\nthat per-minute and per-user per-minute quota controls are also available (with\nIP address being used to distinguish between users).\n\nMonitoring\n----------\n\nTwo options are available for monitoring usage of the Programmable Search\nElement API. First, [Cloud Platform Console's API\nDashboard](https://console.cloud.google.com/apis/dashboard) provides a variety\nof pre-built graphs for monitoring common metrics such as error rates and\nqueries-per-second. Second, the Google Cloud Operations console provides\npowerful tools for building custom graphs and also for setting up alerting. See\n[API Monitoring](/custom-search/v1/overview#monitoring) for more information."]]