Custom Search Site Restricted JSON API
本文档介绍了如何使用 Custom Search Site Restricted JSON API。
关于 Custom Search Site Restricted JSON API
如果您的可编程搜索引擎仅可用于搜索特定网站(10 个或更少),您可以使用 Custom Search Site Restricted JSON API。此 API 类似于 Custom Search JSON API,只不过该版本没有每日查询数上限。若要使用该版本,请确认您在可编程搜索引擎控制台的“要搜索的网站”部分看到的要搜索网站数量为 10 个或更少,没有任何全局顶级域名模式,并且“在整个网络中搜索”已设置为“关闭”。
使用 Custom Search Site Restricted JSON API 端点时,请注意,如果可编程搜索引擎配置发生更改,导致其不符合上述网站限制规则,则 Custom Search Site Restricted JSON API 可能无法返回预期结果。
发出请求
向 Custom Search Site Restricted JSON API 发出请求类似于向 Custom Search JSON API 发出请求;但是,URI 不同。Custom Search Site Restricted JSON API 的格式为
https://www.googleapis.com/customsearch/v1/siterestrict?[parameters]
[parameters]
与 Custom Search JSON API 参数相同
定价
Custom Search Site Restricted JSON API 请求每 1000 次查询的费用为 5 美元,并且没有每日查询数上限。您可以在 API 控制台中申请账单。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-18。
[null,null,["最后更新时间 (UTC):2024-12-18。"],[[["The Custom Search Site Restricted JSON API will be discontinued on January 8, 2025, and users should transition to Google Cloud's Vertex AI Search."],["This API allows searching within 10 or fewer specific sites without a daily query limit, unlike the standard Custom Search JSON API."],["To utilize this API, ensure your Programmable Search Engine is configured to search only specific sites with \"Search the entire web\" disabled."],["The API endpoint for the Site Restricted version differs slightly but uses the same parameters as the standard Custom Search JSON API."],["Each request to the Custom Search Site Restricted JSON API costs $5 per 1000 queries, and billing can be set up through the API Console."]]],[]]