Skip to main content

Client library for Google Safe Browsing API

Project description

Python 3 client library for the Google Safe Browsing API (v3) The source code for this library can be found here on

Please note that this Program only supports Python 3.

While the code was developed according to official Developers Guide, this is not a reference implementation and is not connected with google in any way. You also may want to check Acceptable Use Policy for Safe Browsing API.

Quick start

First, get your Google API from here and then download then download this library (when not installing with pip)


python install

Alternatively, you can also install this library with pip by running:

pip install gglsbl3

Syncing the local hash cache

from gglsbl3 import SafeBrowsingList

Please note that a first run it may take up to several hours to complete the sync, you may also have to run it several times to fully sync the database

URL lookup

from gglsbl3 import SafeBrowsingList
sbl = SafeBrowsingList('API KEY GOES HERE')

This will return a list of matched Safe Browsing lists, e.g.


CLI Tool

scripts/ can be used for quick testing and as a code example. To sync local cache with Safe Browsing API omitting Acceptable Use Policy delays (which is not recommended!) --api-key 'API KEY GOES HERE' --onetime

To look up an URL --api-key 'API KEY GOES HERE' --check-url

Fore more options please see --help

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gglsbl3-0.1.4.tar.gz (19.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page