Google Link/Domain Flagging
Access APIs to identify and flag unsafe web resources, links, and domains using Google Safe Browsing lists.
import requests
api_key = 'YOUR_API_KEY'
url = 'https://safebrowsing.googleapis.com/v4/threatMatches:find?key=' + api_key
headers = {'Content-Type': 'application/json'}
data = {
'client': {
'clientId': 'YOUR_CLIENT_ID',
'clientVersion': '1.5.2'
},
'threatInfo': {
'threatTypes': ['MALWARE', 'SOCIAL_ENGINEERING'],
'platformTypes': ['ANY_PLATFORM'],
'threatEntryTypes': ['URL'],
'threatEntries': [
{'url': 'http://badurl.com/'},
{'url': 'http://anotherbadurl.org/'}
]
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())Last 50 checks (10 min intervals)