Registry / networking / google-safebrowsing

google-safebrowsing

JSON →
library0.0.0-20190624211811-bbf0d20d26b3gogounverified

Implements a client for the Safe Browsing API v4 to check URLs against Google's threat lists.

go get github.com/google/safebrowsing
INSTALL
IMPORT
SIG · GOOGLE-SAFEBROWSIN
G
google-safebrowsing
networkinggov0.0.0-20190624211811-bbf0d20d26b3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

safebrowsing
github.com/google/safebrowsing

Look up URLs for threats using the Safe Browsing API.

package main import ( "fmt" "github.com/google/safebrowsing" ) func main() { sb, err := safebrowsing.NewSafeBrowsing(safebrowsing.Config{APIKey: "your-api-key"}) if err != nil { panic(err) } threats, err := sb.LookupURLs([]string{"http://example.com"}) if err != nil { panic(err) } fmt.Println(threats) }
Debug
Known issues
gotchaRequires a valid Google API key; without it, LookupURLs will fail.
fix
Obtain an API key from the Google Cloud Console and pass it in Config.
affects: all
Upgrade
Version history
0.0.0-20190624211811-bbf0d20d26b3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
google-safebrowsing — go get google-safebrowsing · libregistry