安全瀏覽清單
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本文件適用於下列方法:
關於清單
安全瀏覽清單 (也稱為「威脅清單」;
簡稱「清單」— 是 Google 持續更新的不安全網頁資源清單。
不安全的網頁資源包括社交工程網站 (網路釣魚和詐欺網站) 和
網站是否放置了惡意軟體或垃圾軟體。
名單名稱
每份安全瀏覽清單都會使用以下三種參數或類型組合來命名 (識別):
threatType
、platformType
和 threatEntryType
(請參閱
ThreatListDescriptor)。
將要求傳送至安全瀏覽伺服器之前,用戶端應先擷取
目前可用的安全瀏覽清單。這樣可確保參數或類型
要求中指定的組合有效。
如要擷取安全瀏覽清單的名稱,請使用
threatLists.list
方法和 HTTP GET
要求/回應
例如: ThreatLists.list
HTTP GET 要求
要求只包含標頭 (無要求主體)。
要求標頭包含要求網址和內容類型。請記得將
網址中 API_KEY
的 API 金鑰。
GET https://safebrowsing.googleapis.com/v4/threatLists?key=API_KEY HTTP/1.1
Content-Type: application/json
要求主體
這個方法沒有任何要求主體。
HTTP GET 回應
回應會傳回目前可供查詢或下載的安全瀏覽清單。在本
舉例來說,圖表中只會顯示兩份清單,但未來會提供兩份清單,系統會傳回這些清單。
回應標頭包含 HTTP 狀態碼
以及內容類型
HTTP/1.1 200 OK
Content-Type: application/json
回應主體
安全瀏覽清單會以一組威脅清單的形式傳回。如上所述
清單是由三個參數或類型組合所定義:threatType
、platformType
和
threatEntryType
。
{
threatLists: [{
"threatType": "MALWARE",
"platformType": "WINDOWS",
"threatEntryType": "URL",
}, {
"threatType": "MALWARE",
"platformType": "LINUX",
"threatEntryType": "URL",
}, {
... additional lists will be returned ...
}]
}
清單內容
目前,所有安全瀏覽清單包含長度介於 4 至 32 之間的 SHA 256 雜湊
一個位元組這些雜湊是根據與不安全相關網址的後置字元/前置字元運算式得出
網路資源。請注意,系統不會將網址本身儲存在「安全瀏覽」清單中。
(請參閱「網址和雜湊」一節)。
使用 Lookup API 檢查網址時,用戶端會在要求中傳送實際網址,
安全瀏覽伺服器會先將網址轉換為雜湊值,再執行檢查
(請參閱檢查網址以瞭解 Lookup API 的相關資訊)。
使用 Update API 檢查網址時,用戶端必須將網址轉換為雜湊值,然後
,以便執行網址檢查。
(請參閱檢查網址以瞭解 Update API)。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eGoogle Safe Browsing maintains constantly updated lists of unsafe web resources, including phishing sites and those hosting malware.\u003c/p\u003e\n"],["\u003cp\u003eEach list is identified by \u003ccode\u003ethreatType\u003c/code\u003e, \u003ccode\u003eplatformType\u003c/code\u003e, and \u003ccode\u003ethreatEntryType\u003c/code\u003e, which can be retrieved using the \u003ccode\u003ethreatLists.list\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eSafe Browsing lists contain SHA256 hashes derived from prefixes/suffixes of unsafe URLs, not the full URLs themselves.\u003c/p\u003e\n"],["\u003cp\u003eWhen using the Lookup API, you submit the URL directly, while the Update API requires you to pre-calculate and submit URL hashes.\u003c/p\u003e\n"]]],["The document outlines methods for interacting with Google's Safe Browsing lists, which contain unsafe web resource data. To access these lists, clients use `threatLists.list` via an HTTP GET request, including an API key in the URL. The response returns an array of available threat lists, each defined by `threatType`, `platformType`, and `threatEntryType`. These lists consist of SHA256 hashes. Lookup API sends URLs, Update API sends hashed URL prefixes. The lists are available via the Lookup and Update APIs.\n"],null,["# Safe Browsing Lists\n\nThis document applies to the following methods:\n\n- [Lookup API (v4)](/safe-browsing/v4/lookup-api): [threatMatches.find](/safe-browsing/v4/lookup-api#example-threatmatchesfind)\n- [Update API (v4)](/safe-browsing/v4/update-api): [fullHashes.find](/safe-browsing/v4/update-api#example-fullhashesfind)\n- [Update API (v4)](/safe-browsing/v4/update-api): [threatListUpdates.fetch](/safe-browsing/v4/update-api#example-threatlistupdatesfetch)\n\nAbout the lists\n---------------\n\nThe Safe Browsing lists---also referred to as **threat lists** or\nsimply **lists**---are Google's constantly updated lists of unsafe web resources.\nExamples of unsafe web resources are social engineering sites (phishing and deceptive sites) and\nsites that host malware or unwanted software.\n\nList names\n----------\n\nEach Safe Browsing list is named (identified) using three parameters or type combinations:\nthe `threatType`, `platformType`, and `threatEntryType` (see\n[ThreatListDescriptor](/safe-browsing/reference/rest/v4/threatLists/list#ThreatListDescriptor)).\n\nBefore sending a request to the Safe Browsing servers, the client should retrieve the names of the\n*currently available* Safe Browsing lists. This will help ensure that the parameters or type\ncombinations specified in the request are valid.\n\nTo retrieve the names of the Safe Browsing lists, use the\n[threatLists.list](/safe-browsing/reference/rest/v4/threatLists/list)\nmethod and HTTP `GET` request/response.\n\nExample: threatLists.list\n-------------------------\n\n### HTTP GET request\n\nThe request includes a header only (no request body).\n\n#### Request header\n\nThe request header includes the request URL and the content type. Remember to substitute your\nAPI key for `API_KEY` in the URL. \n\n```http\nGET https://safebrowsing.googleapis.com/v4/threatLists?key=API_KEY HTTP/1.1\nContent-Type: application/json\n```\n\n#### Request body\n\nThere is no request body for this method.\n\n### HTTP GET response\n\nThe response returns the Safe Browsing lists currently available for query or download. In this\nexample, only two lists are shown, but additional lists are available and will be returned.\n\n#### Response header\n\nThe response header includes the [HTTP status code](/safe-browsing/v4/status-codes)\nand the content type. \n\n```http\nHTTP/1.1 200 OK\nContent-Type: application/json\n```\n\n#### Response body\n\nThe Safe Browsing lists are returned as an array of threat lists. As noted, each\nlist is defined by three parameters or type combinations: the `threatType`, `platformType`, and\n`threatEntryType`. \n\n```text\n{\n threatLists: [{\n \"threatType\": \"MALWARE\",\n \"platformType\": \"WINDOWS\",\n \"threatEntryType\": \"URL\",\n }, {\n \"threatType\": \"MALWARE\",\n \"platformType\": \"LINUX\",\n \"threatEntryType\": \"URL\",\n }, {\n ... additional lists will be returned ...\n }]\n}\n```\n\nList contents\n-------------\n\nCurrently, all Safe Browsing lists consist of variable length SHA 256 hashes between 4 and 32\nbytes. These hashes are based on the suffix/prefix expressions of the URLs associated with unsafe\nweb resources. Note that the URLs themselves are not stored in the Safe Browsing lists\n(see [URLs and Hashes](/safe-browsing/v4/urls-hashing)).\n\nWhen using the Lookup API to check URLs, the client sends the actual URL in the request and\nSafe Browsing server converts the URL to a hash before performing the check\n(see [Checking URLs](/safe-browsing/v4/lookup-api#checking-urls) for the Lookup API).\n\nWhen using the Update API to check URLs, the client must convert the URL to a hash and then send\nthe hash prefix in the request in order to perform the URL check\n(see [Checking URLs](/safe-browsing/v4/update-api#checking-urls) for the Update API)."]]