🔍 Overview

The GoogleSafeBrowsing class provides an interface to Google’s Safe Browsing API (v4) for checking domains/URLs against known threat lists.

It is used to monitor:


📑 Class Attributes

AttributeTypeDescription
URLstrEndpoint URL constructed from settings.GOOGLE_SAFEBROWSING_BASE_URL
API_KEYstrAPI key loaded from settings.GOOGLE_SAFEBROWSING_API_KEY

🧩 Methods

MethodDescription
_build_payload(links)Constructs the API request payload from a list of links.
_send_request(links)Sends the request to the Google Safe Browsing API and returns the response.
check_links(links)Public method to check a list of links/domains against the Google Safe Browsing API.

📍 Where Using