gsb-node
v1.0.2
Published
A streamlined NodeJS wrapper for Google's Safe Browsing API v4, designed to efficiently determine the malicious nature of a given URL.
Downloads
4
Maintainers
Readme
🌐 Google Safe Browsing NodeJS Wrapper
The Google Safe Browsing NodeJS Wrapper is a concise and efficient tool for interacting with Google's Safe Browsing API v4 using Node.js. This wrapper simplifies the process of checking whether a given URL is associated with malicious content.
🛠️ Usage
⬇️ Installation
Install the package via npm:
npm install gsb-node
📍 Initialization
const GSBNode = require('gsb-node');
// Initialize with your Google Safe Browsing API key
const gsb = new GSBNode({ apiKey: 'your-api-key' });
📃 API Documentation
For comprehensive information on the Google Safe Browsing API v4, refer to the official documentation.
ℹ️ Example
const gsb = new GSBNode({ apiKey: 'your-api-key' });
const maliciousURLs = await gsb.lookup(['https://example.com/malicious']);
console.log('Malicious URLs:', maliciousURLs);
or check this testing example here.
🔐 API Key Setup
To create a Google Safe Browsing API key, follow these steps:
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the "Safe Browsing API" for your project.
- Create credentials and generate an API key.
For more details, refer to the official guide.
🫂 Contributing
Feel free to contribute to this project by submitting issues or pull requests on the GitHub repository.
This wrapper aims to provide a seamless integration with the Google Safe Browsing API v4, making it easier for Node.js developers to enhance the security of their applications.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.