GoogleSafeBrowsingAPI

FREE
By dimashirokov
Updated 5 months ago
Machine Learning
1.7/10
Popularity Score
275ms
Latency
100%
Success Rate

GoogleSafeBrowsingAPI API Documentation

Google Safe Browsing API

View API Details
POSTcheckSafetyByHashs
POSTcheckSingleUrlSafety
POSTcheckUrlsSafety
POSTgetThreatListUpdates
POSTgetThreatLists
POSTcheckSafetyByHashs

This endpoint allows to check if a URL is on a Safe Browsing list, the client must first compute the hash and hash prefix of the URL

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
clientStatesLIST
REQUIREDJson array. The current client states for each of the client's local threat lists. See README for more details.
threatTypesLIST
REQUIREDList of the threats. See README for more details.
platformTypesLIST
REQUIREDList of the platforms types. See README for more details.
threatEntryTypesLIST
REQUIREDJson array of the threat entries types. See README for more details.
clientIdSTRING
REQUIREDA client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
clientVersionSTRING
REQUIREDThe version of the client implementation.
apiKeyCREDENTIALS
REQUIREDAPI key obtained from Google.
threatEntriesJSON
REQUIREDJson array of objects. The threat entries to be checked. See README for more details.
Code Snippet
unirest.post("https://GoogleSafeBrowsingAPIdimashirokovV1.p.rapidapi.com/checkSafetyByHashs")
.header("X-RapidAPI-Host", "GoogleSafeBrowsingAPIdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://GoogleSafeBrowsingAPIdimashirokovV1.p.rapidapi.com/checkSafetyByHashs
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://GoogleSafeBrowsingAPIdimashirokovV1.p.rapidapi.com/checkSafetyByHashs")
.header("X-RapidAPI-Host", "GoogleSafeBrowsingAPIdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication