Web Risk 是一种全新的企业安全产品,可让您的客户端应用根据 Google 不断更新的不安全网络资源列表来检查网址。不安全的网络资源示例包括社交工程学网站(如网上诱骗和欺骗性网站)以及托管恶意软件或垃圾软件的网站。在此列表中找到的任何网址都被视为不安全网址。Google 致力于提供不安全网络资源的最新和最准确信息。不过,Google 无法保证其信息全面无误:某些有风险的网站可能无有识别出来,而某些安全网站可能会被错误分类。
客户端可以使用 Lookup API 或 Update API 来确定某个网址是否在任何列表中。
Lookup API
借助 Lookup API,您的客户端应用可以将网址发送到T Web Risk 服务器以检查其状态。该 API 简单易用,因为它避免了 Update API 的复杂性。
优势
简单的网址检查:您可以发送带有实际网址的 HTTP GET 请求,然后服务器会以网址的状态响应(安全或不安全)。
通过 Update API,您的客户端应用可以下载不安全列表的哈希版本并存储在本地数据库中,然后在本地进行检查。只有在本地数据库中找到匹配项时,客户端才需要向 Web Risk 服务器发送请求,以验证网址是否包含在不安全列表中。比起 Lookup API,实现此 API 更为复杂,但在大多数情况下会启用本地查找,因此速度更快。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# Overview of Web Risk\n====================\n\nWeb Risk is a new enterprise security product that lets your client\napplications check URLs against Google's\nconstantly updated lists of unsafe web resources. Examples of unsafe web\nresources are social engineering sites, like phishing and deceptive sites, and\nsites that host malware or unwanted software. Any URL found on this list is\nconsidered unsafe. Google works to provide the most accurate and up-to-date\ninformation about unsafe web resources. However, Google cannot guarantee that\nits information is comprehensive and error-free: some risky sites may not be\nidentified, and some safe sites may be classified in error.\n\nTo determine if a URL is on any of the lists, clients\ncan use either the Lookup API or the Update API .\n| **Note:** The information returned by the Web Risk must not be redistributed.\n\nLookup API\n----------\n\nThe Lookup API lets your client applications send URLs to the\nWeb Risk server to check their status. This API is simple and easy\nto use, because it avoids the complexities of the Update API.\n\n### Advantages\n\n- **Simple URL checks**: You send an HTTP GET request with the actual URL, and the server responds with the state of the URL (safe or unsafe).\n\n### Drawbacks\n\n- **Privacy**: URLs aren't hashed, so the server knows which URLs you look up.\n- **Response time**: Every lookup request is processed by the server. We don't provide guarantees on lookup response time.\n\nIf you aren't too concerned about the privacy of the queried URLs, and you can\ntolerate the latency induced by a network request, consider using the Lookup API\nbecause it's easier to use.\n\nUpdate API\n----------\n\nThe Update API lets your client applications download and store hashed versions of the\nunsafe lists in a local database, and check them locally. Only if a\nmatch is found in the local database does the client need to send a request to\nthe Web Risk servers to verify whether the URL is included on the unsafe\nlists. This API is more complex to implement than the Lookup API, but enables local\nlookups in most cases so it's faster.\n\n### Advantages\n\n- **Privacy**: You exchange data with the server infrequently (only after a local hash prefix match) and using hashed URLs, so the server never knows the actual URLs queried by the clients.\n- **Response time**: You maintain a local database that contains copies of the Web Risk lists; they do not need to query the server every time they want to check a URL.\n\n### Drawbacks\n\n- **Implementation**: You need to set up a local database and then download, and periodically update, the local copies of the Web Risk lists (stored as variable-length SHA256 hashes).\n- **Complex URL checks**: You need to know how to canonicalize URLs, create suffix/prefix expressions, and compute SHA256 hashes for comparison with the local copies of the Web Risk lists and the Web Risk lists stored on the server.\n\nIf you are concerned about the privacy of the queried URLs or the latency\ninduced by a network request, use the Update API.\n\nWhat's next\n-----------\n\n- Learn how to [set up Web Risk](/web-risk/docs/quickstart)."]]