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。"],[[["\u003cp\u003eThe Custom Search Site Restricted JSON API will be discontinued on January 8, 2025, and users should transition to Google Cloud's Vertex AI Search.\u003c/p\u003e\n"],["\u003cp\u003eThis API allows searching within 10 or fewer specific sites without a daily query limit, unlike the standard Custom Search JSON API.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize this API, ensure your Programmable Search Engine is configured to search only specific sites with "Search the entire web" disabled.\u003c/p\u003e\n"],["\u003cp\u003eThe API endpoint for the Site Restricted version differs slightly but uses the same parameters as the standard Custom Search JSON API.\u003c/p\u003e\n"],["\u003cp\u003eEach request to the Custom Search Site Restricted JSON API costs $5 per 1000 queries, and billing can be set up through the API Console.\u003c/p\u003e\n"]]],[],null,["# Custom Search Site Restricted JSON API\n\n| **Note:** The Custom Search Site Restricted JSON API endpoints will cease to serve traffic on January 8, 2025.\n|\n| All Custom Search Site Restricted JSON API\n| customers must begin their transition to\n| [Google Cloud's Vertex AI Search](https://cloud.google.com/enterprise-search).\n| Detailed transition guidance can be found\n| [here](https://cloud.google.com/generative-ai-app-builder/docs/migrate-from-cse).\n| If you experience issues, contact\n| us [here](https://cloud.google.com/generative-ai-app-builder/docs/support).\n\nThis document describes how to use the Custom Search Site Restricted JSON API.\n\nAbout the Custom Search Site Restricted JSON API\n------------------------------------------------\n\nIf your Programmable Search Engine is restricted to only searching specific sites (10 or fewer),\nyou can use the Custom Search Site Restricted JSON API. This API is similar to the\nCustom Search JSON API except this version has no daily query limit. To use this\nversion, confirm that you see 10 or fewer sites to search in the \"Sites to\nSearch\" section of your Programmable Search Engine control panel, there are no global top level\ndomain patterns, and that \"Search the entire web\" is set to OFF.\n\nWhen using the Custom Search Site Restricted JSON API endpoint, be mindful that if your\nProgrammable Search Engine configuration is changed so that it does not conform with the site\nrestriction rules above, the Custom Search Site Restricted JSON API may not return the\nexpected results.\n\nMaking a request\n----------------\n\nMaking a request to Custom Search Site Restricted JSON API is similar to making a request to\nCustom Search JSON API; however, the URI is different. The format for the\nCustom Search Site Restricted JSON API is\n\nhttps://www.googleapis.com/customsearch/v1/siterestrict?\\[parameters\\]\n\nThe `[parameters]` are the same as the [Custom Search JSON API](/custom-search/v1/using_rest) parameters\n\nPricing\n-------\n\nCustom Search Site Restricted JSON API requests cost $5 per 1000 queries and there is no\ndaily query limit. You may sign up for [billing](https://cloud.google.com/billing/docs/how-to/manage-billing-account) in the\nAPI Console."]]