版本说明
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
4.0 版
Safe Browsing API (v4) 中包含以下更新和新功能。
Lookup API(版本 4)
相同之处:
- 该 API 仍让客户端直接查询 Google 安全浏览服务器和安全浏览列表。
不同之处:
- 不再支持 HTTP
GET
方法。请改用 HTTP POST
方法。
- 现在,
key
参数是 HTTP POST
请求网址中所需的唯一参数。
- HTTP
POST
请求和响应格式已更改。不再支持纯文本。
请改用 JSON。
Update API (v4)
相同之处:
- 此 API 仍让客户端定期更新本地数据库列表中的 SHA256 哈希前缀。
- 该 API 还有一个类似的请求,会在客户端遇到哈希前缀冲突时检索 SHA256 完整长度哈希。
不同之处:
- 现在,
key
参数是 HTTP POST
请求网址中所需的唯一参数。
- HTTP
POST
请求和响应格式已更改。不再支持纯文本。
请改用 JSON。
- 更新的编码方式已更改。现在,该 API 使用简单的版本控制协议提供差异比较,而不是提供添加分块和子分块。客户端会将其当前状态连同请求的更新一起发送到服务器。服务器会返回新的客户端状态和差异信息,以使客户端完全更新。
- 为了确保在考虑客户端限制时最大限度地减少对保护的影响,该 API 会提供优先威胁列表。系统会使用设备资源、带宽、地理定位和其他信号向每个客户端传送优先级最高的威胁数据。
threatLists.list 方法
新方法 threatLists.list
可返回当前可供查询或下载的安全浏览列表的列表。
状态代码
服务器为响应 HTTP POST
请求而生成的 HTTP 状态代码已更改。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eSafe Browsing APIs v4 transitions to using HTTP \u003ccode\u003ePOST\u003c/code\u003e requests with JSON format, replacing the previous \u003ccode\u003eGET\u003c/code\u003e method and plain text format.\u003c/p\u003e\n"],["\u003cp\u003eThe Update API v4 introduces a new diff-based update system for efficient threat list management and prioritizes threat lists based on client context.\u003c/p\u003e\n"],["\u003cp\u003eA new \u003ccode\u003ethreatLists.list\u003c/code\u003e method enables retrieval of available Safe Browsing lists.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekey\u003c/code\u003e parameter is now the sole requirement in HTTP \u003ccode\u003ePOST\u003c/code\u003e request URLs for both Lookup and Update APIs.\u003c/p\u003e\n"],["\u003cp\u003eUpdated HTTP status codes reflect the changes in request and response handling within the v4 APIs.\u003c/p\u003e\n"]]],["Safe Browsing API (v4) updates include changes to both the Lookup and Update APIs. The `GET` method is replaced by `POST`, and plain text is replaced by JSON for requests and responses. The `key` parameter is now the sole required URL parameter. Updates are now encoded as diffs using a versioning protocol. The API serves prioritized threat lists based on client constraints. A new `threatLists.list` method lists available Safe Browsing lists, and HTTP status codes have been revised.\n"],null,["# Release Notes\n\nVersion 4.0\n-----------\n\nThe following updates and new features are included in the Safe Browsing APIs (v4).\n\nLookup API (v4)\n---------------\n\nWhat's the same:\n\n- The API still has clients directly query the Google Safe Browsing server and Safe Browsing lists.\n\nWhat's different:\n\n- The HTTP `GET` method is no longer supported. Use the HTTP `POST` method instead.\n- The `key` parameter is now the only parameter required in the HTTP `POST` request URL.\n- The HTTP `POST` request and response format have changed. Plain text is no longer supported. Use JSON instead.\n\nUpdate API (v4)\n---------------\n\nWhat's the same:\n\n- The API still has clients periodically update the SHA256 hash prefixes in the local database's lists.\n- The API also has a similar request to retrieve the SHA256 full-length hashes when a client encounters a hash prefix collision.\n\nWhat's different:\n\n- The `key` parameter is now the only parameter required in the HTTP `POST` request URL.\n- The HTTP `POST` request and response format have changed. Plain text is no longer supported. Use JSON instead.\n- The way updates are encoded has changed. Instead of serving add and sub chunks, the API now serves diffs using a simple versioning protocol. The client sends its current state to the server along with the requested updates. The server responds with a new client state and a diff to get the client fully updated.\n- To ensure minimal sacrifice of protection when accommodating client constraints, the API serves prioritized threat lists. Device resources, bandwidth, geolocation, and other signals are used to serve the highest priority threat data to each client.\n\nthreatLists.list Method\n-----------------------\n\nA new method, `threatLists.list`, returns a list of the Safe Browsing lists currently\navailable for lookup or download.\n\nStatus Codes\n------------\n\nThe HTTP status codes generated by the server in response to an HTTP `POST` request have changed."]]