Safe Browsing API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
让客户端应用能够根据 Google 生成的不安全网络资源列表检查网络资源(最常见的是网址)。Safe Browsing API 仅供非商业用途。如果您需要出于商业目的(即“出于销售或创收目的”)使用 API 检测恶意网址,请参阅 Web Risk API。
服务:safebrowsing.googleapis.com
服务端点
服务端点是指定 API 服务的网络地址的基本网址。一项服务可能有多个服务端点。此服务具有以下服务端点,下面的所有 URI 都与此服务端点相关:
https://safebrowsing.googleapis.com
方法 |
get |
GET /v5alpha1/hashList/{name}
获取哈希列表的最新内容。 |
方法 |
batchGet |
GET /v5alpha1/hashLists:batchGet
一次获取多个哈希列表。 |
list |
GET /v5alpha1/hashLists
列出哈希列表。 |
方法 |
search |
GET /v5alpha1/hashes:search
搜索与指定前缀匹配的全哈希。 |
方法 |
get |
GET /v5/hashList/{name}
获取哈希列表的最新内容。 |
方法 |
batchGet |
GET /v5/hashLists:batchGet
一次获取多个哈希列表。 |
list |
GET /v5/hashLists
列出哈希列表。 |
方法 |
search |
GET /v5/hashes:search
搜索与指定前缀匹配的全哈希。 |
方法 |
find |
POST /v4/fullHashes:find
查找与请求的哈希前缀匹配的全长哈希。 |
方法 |
fetch |
POST /v4/threatListUpdates:fetch
提取最新的威胁列表更新。 |
方法 |
list |
GET /v4/threatLists
列出可供下载的安全浏览威胁列表。 |
方法 |
find |
POST /v4/threatMatches:find
查找与安全浏览列表匹配的威胁条目。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe Safe Browsing APIs enable client applications to cross-reference web resources, primarily URLs, with Google's lists of unsafe web resources for non-commercial use only.\u003c/p\u003e\n"],["\u003cp\u003eCommercial users seeking malicious URL detection should utilize the Web Risk API instead of the Safe Browsing APIs.\u003c/p\u003e\n"],["\u003cp\u003eThe APIs offer various functionalities, including retrieving hash lists, searching for full hashes based on prefixes, and fetching recent threat list updates.\u003c/p\u003e\n"],["\u003cp\u003eThe service endpoint for accessing these APIs is \u003ccode\u003ehttps://safebrowsing.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMultiple REST resources, such as \u003ccode\u003ev5alpha1.hashList\u003c/code\u003e, \u003ccode\u003ev5alpha1.hashLists\u003c/code\u003e, and \u003ccode\u003ev5alpha1.hashes\u003c/code\u003e, are available for interacting with the service.\u003c/p\u003e\n"]]],["The Safe Browsing APIs enable non-commercial client applications to verify web resources against Google's unsafe web resource lists; commercial use requires the Web Risk API. Key actions include: fetching threat list updates, searching for matching hash prefixes, retrieving full hashes, and listing available threat lists. Using the REST resource you can get individual hash lists, or get them in batches. The service endpoint is `https://safebrowsing.googleapis.com`.\n"],null,["# Safe Browsing API\n\nEnables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes -- meaning \"for sale or revenue-generating purposes\" -- please refer to the Web Risk API.\n\n- [REST Resource: v5alpha1.hashList](#v5alpha1.hashList)\n- [REST Resource: v5alpha1.hashLists](#v5alpha1.hashLists)\n- [REST Resource: v5alpha1.hashes](#v5alpha1.hashes)\n- [REST Resource: v5.hashList](#v5.hashList)\n- [REST Resource: v5.hashLists](#v5.hashLists)\n- [REST Resource: v5.hashes](#v5.hashes)\n- [REST Resource: v4.fullHashes](#v4.fullHashes)\n- [REST Resource: v4.threatListUpdates](#v4.threatListUpdates)\n- [REST Resource: v4.threatLists](#v4.threatLists)\n- [REST Resource: v4.threatMatches](#v4.threatMatches)\n\nService: safebrowsing.googleapis.com\n------------------------------------\n\n### Service endpoint\n\nA [service endpoint](https://cloud.google.com/apis/design/glossary#api_service_endpoint) is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:\n\n- `https://safebrowsing.googleapis.com`\n\nREST Resource: [v5alpha1.hashList](/safe-browsing/reference/rest/v5alpha1/hashList)\n-----------------------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------------|-------------------------------------------------------------------------|\n| [get](/safe-browsing/reference/rest/v5alpha1/hashList/get) | `GET /v5alpha1/hashList/{name}` Get the latest contents of a hash list. |\n\nREST Resource: [v5alpha1.hashLists](/safe-browsing/reference/rest/v5alpha1/hashLists)\n-------------------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------------|---------------------------------------------------------------------|\n| [batchGet](/safe-browsing/reference/rest/v5alpha1/hashLists/batchGet) | `GET /v5alpha1/hashLists:batchGet` Get multiple hash lists at once. |\n| [list](/safe-browsing/reference/rest/v5alpha1/hashLists/list) | `GET /v5alpha1/hashLists` List hash lists. |\n\nREST Resource: [v5alpha1.hashes](/safe-browsing/reference/rest/v5alpha1/hashes)\n-------------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [search](/safe-browsing/reference/rest/v5alpha1/hashes/search) | `GET /v5alpha1/hashes:search` Search for full hashes matching the specified prefixes. |\n\nREST Resource: [v5.hashList](/safe-browsing/reference/rest/v5/hashList)\n-----------------------------------------------------------------------\n\n| Methods ||\n|------------------------------------------------------|-------------------------------------------------------------------|\n| [get](/safe-browsing/reference/rest/v5/hashList/get) | `GET /v5/hashList/{name}` Get the latest contents of a hash list. |\n\nREST Resource: [v5.hashLists](/safe-browsing/reference/rest/v5/hashLists)\n-------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------------|---------------------------------------------------------------|\n| [batchGet](/safe-browsing/reference/rest/v5/hashLists/batchGet) | `GET /v5/hashLists:batchGet` Get multiple hash lists at once. |\n| [list](/safe-browsing/reference/rest/v5/hashLists/list) | `GET /v5/hashLists` List hash lists. |\n\nREST Resource: [v5.hashes](/safe-browsing/reference/rest/v5/hashes)\n-------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------|---------------------------------------------------------------------------------|\n| [search](/safe-browsing/reference/rest/v5/hashes/search) | `GET /v5/hashes:search` Search for full hashes matching the specified prefixes. |\n\nREST Resource: [v4.fullHashes](/safe-browsing/reference/rest/v4/fullHashes)\n---------------------------------------------------------------------------\n\n| Methods ||\n|----------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [find](/safe-browsing/reference/rest/v4/fullHashes/find) | `POST /v4/fullHashes:find` Finds the full hashes that match the requested hash prefixes. |\n\nREST Resource: [v4.threatListUpdates](/safe-browsing/reference/rest/v4/threatListUpdates)\n-----------------------------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [fetch](/safe-browsing/reference/rest/v4/threatListUpdates/fetch) | `POST /v4/threatListUpdates:fetch` Fetches the most recent threat list updates. |\n\nREST Resource: [v4.threatLists](/safe-browsing/reference/rest/v4/threatLists)\n-----------------------------------------------------------------------------\n\n| Methods ||\n|-----------------------------------------------------------|------------------------------------------------------------------------------------|\n| [list](/safe-browsing/reference/rest/v4/threatLists/list) | `GET /v4/threatLists` Lists the Safe Browsing threat lists available for download. |\n\nREST Resource: [v4.threatMatches](/safe-browsing/reference/rest/v4/threatMatches)\n---------------------------------------------------------------------------------\n\n| Methods ||\n|-------------------------------------------------------------|--------------------------------------------------------------------------------------------|\n| [find](/safe-browsing/reference/rest/v4/threatMatches/find) | `POST /v4/threatMatches:find` Finds the threat entries that match the Safe Browsing lists. |"]]