Check URL Safety with Google Safe Browsing API
Pipedream makes it easy to connect APIs for Google Safe Browsing and 3,000+ other apps remarkably fast.
Trigger workflow on
- HTTP requests, schedules and app events
Next, do this
- Check URL Safety with the Google Safe Browsing API
No credit card required
▶
Watch us build a workflow
8 min
Trusted by 1,000,000+ developers from startups to Fortune 500 companies
Developers ♥ Pipedream
Getting Started
Create a workflow to Check URL Safety with the Google Safe Browsing API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.
- Configure the Check URL Safety action
- Connect your
Google Safe Browsingaccount - Select one or more
Threat Types - Select one or more
Platform Types - Select one or more
Threat Entry Types - Configure
Threat Entries - Select a trigger to run your workflow on HTTP requests, schedules or app events
- Deploy the workflow
- Send a test event to validate your setup
- Turn on the trigger
Details
This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.
Check URL Safety on Google Safe Browsing
- Description: Scan a given URL or URLs for potential security threats. See the documentation
- Version: 0.0.2
- Key: google_safebrowsing-check-url-safety
Code
import safebrowsing from "../../google_safebrowsing.app.mjs";
export default {
key: "google_safebrowsing-check-url-safety",
name: "Check URL Safety",
description: "Scan a given URL or URLs for potential security threats. [See the documentation](https://developers.google.com/safe-browsing/v4/reference/rest/v4/threatMatches/find)",
version: "0.0.2",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
type: "action",
props: {
safebrowsing,
threatTypes: {
propDefinition: [
safebrowsing,
"threatTypes",
],
},
platformTypes: {
propDefinition: [
safebrowsing,
"platformTypes",
(c) => ({
threatTypes: c.threatTypes,
}),
],
},
threatEntryTypes: {
propDefinition: [
safebrowsing,
"threatEntryTypes",
(c) => ({
threatTypes: c.threatTypes,
platformTypes: c.platformTypes,
}),
],
},
threatEntries: {
type: "string[]",
label: "Threat Entries",
description: "An array of URLs to be checked",
},
},
async run({ $ }) {
const threatEntries = this.threatEntries.map((entry) => ({
url: entry,
}));
const data = {
threatInfo: {
threatTypes: this.threatTypes,
platformTypes: this.platformTypes,
threatEntryTypes: this.threatEntryTypes,
threatEntries,
},
};
const response = await this.safebrowsing.findThreatMatches({
data,
$,
});
if (response) {
$.export("$summary", `Successfully scanned ${threatEntries.length} URL${threatEntries.length === 1
? ""
: "s"}`);
}
return response;
},
};
Configuration
This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
| Label | Prop | Type | Description |
|---|---|---|---|
| Google Safe Browsing | safebrowsing |
app |
This component uses the Google Safe Browsing app. |
| Threat Types | threatTypes |
string[] |
Select a value from the drop down menu. |
| Platform Types | platformTypes |
string[] |
Select a value from the drop down menu. |
| Threat Entry Types | threatEntryTypes |
string[] |
Select a value from the drop down menu. |
| Threat Entries | threatEntries |
string[] |
An array of URLs to be checked |
Authentication
Google Safe Browsing uses API keys for authentication. When you connect your Google Safe Browsing account, Pipedream securely stores the keys so you can easily authenticate to Google Safe Browsing APIs in both code and no-code steps.
To use the Google Safebrowsing API, you must Create a Project on Google Developer Console, then Setup an API Key, and activate Google Safebrowsing APIs (see Activate and Deactivate APIs).
About Google Safe Browsing
Safe Browsing is a Google service that lets client applications check URLs against Google's constantly updated lists of unsafe web resources.
More Ways to Use Google Safe Browsing
Triggers
New Threat List Updated from the Google Safe Browsing API
Emit new event when a threat list is updated. See the documentation
Actions
Get the latest threat list update information from Google Safe Browsing API. See the documentation