Programmable Search Element 付费搜索
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Programmable Search Element 现在提供无广告的付费版本。启用 Programmable Search Element paid API 后,您的 Programmable Search Element 的运作方式将继续与含广告的免费版本完全相同,但对于每次搜索,系统会收取少量费用,而不是随搜索结果一起显示广告。
请注意,我们的公益组织、教育机构和政府用户可以按照这些说明获得无广告体验。
前提条件
搜索引擎配置
在使用 Programmable Search Element 付费 API 之前,您需要先创建并配置可编程搜索引擎。如果您尚未创建可编程搜索引擎,可以先访问可编程搜索引擎控制台。
按照教程中的说明详细了解不同的配置选项。
API 密钥
Programmable Search Element API 需要使用 API 密钥。获取密钥
拥有 Programmable Search Element API 密钥后,您可以使用 Programmable Search Engine 控制台将此密钥添加到搜索引擎。转到搜索引擎“概览”页的“广告”部分,然后将密钥粘贴到“付费元素 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 Operations 控制台提供了用于构建自定义图表以及设置提醒的强大工具。如需了解详情,请参阅 API 监控。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):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."]]