Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can build a Node.js link checker that validates one submitted URL, queries Google Safe Browsing, submits it to VirusTotal, and returns provider-specific findings. The requested “three API calls” are two provider integrations: one Safe Browsing lookup, followed—if you want VirusTotal results—by its scan submission and analysis retrieval. The title does not identify a third provider, and the documentation covered here supports only these two, so this tutorial does not invent a third.

What this checker can and cannot tell you

The checker below asks Google Safe Browsing whether the submitted URL appears on its maintained unsafe-resource lists, which include social-engineering and phishing resources. It can also submit the URL to VirusTotal and retrieve the resulting analysis. A provider match is useful evidence to treat the URL cautiously. No match means only that the provider did not return a known match; it is not proof that a link is safe.

The example uses three HTTP API calls in the VirusTotal-enabled path: one Google lookup, one VirusTotal scan submission, and one VirusTotal analysis retrieval. VirusTotal’s submission returns an analysis ID; results come from a separate Analysis endpoint request.

Check provider terms and URL privacy first

Google Safe Browsing is for non-commercial use

Google states, “The Safe Browsing APIs are for non-commercial use only,” and directs commercial malicious-URL detection to Web Risk. Review Google’s Safe Browsing overview and, if your use is commercial, assess Web Risk’s current terms and configuration before implementing this design.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Submitted URLs may be shared

A direct Safe Browsing URL lookup sends the raw URL to Google. Its v5 API also documents a hash-prefix approach that sends four-byte hash prefixes instead, but that option requires URL canonicalization, suffix/prefix expansion, hashing, and comparison logic; it is not a drop-in privacy switch.

VirusTotal warns that indicators submitted or queried through its API are scanned and added to its dataset, which is accessible to the community. Do not send sensitive, confidential, or personally identifiable URLs. Check current API-key and data-use terms before production use.

Set up the Node.js service

This example uses Node.js 18 or later for the built-in fetch API and Express for a small HTTP route. It does not fetch the submitted destination: fetching arbitrary user-provided URLs introduces separate server-side request forgery and redirect risks.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  1. Create a project and install Express: npm init -y, then npm install express.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  2. Set server-side credentials in the environment: GOOGLE_SAFE_BROWSING_API_KEY and VIRUSTOTAL_API_KEY. Obtain credentials and verify current access requirements in the providers’ official documentation. Never put these keys in browser JavaScript.

  3. Save the following as server.js. Run it with node server.js.

    Rank #3
    Sale
    Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
    • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
    • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
    • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
    • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
    • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
const express = require("express");

const app = express();
app.use(express.json({ limit: "8kb" }));

const googleKey = process.env.GOOGLE_SAFE_BROWSING_API_KEY;
const virusTotalKey = process.env.VIRUSTOTAL_API_KEY;

function parseHttpUrl(input) {
  if (typeof input !== "string" || input.length > 2048) {
    throw new Error("URL must be a string no longer than 2048 characters.");
  }

  let url;
  try {
    url = new URL(input);
  } catch {
    throw new Error("Enter a valid absolute URL.");
  }

  if (!["http:", "https:"].includes(url.protocol)) {
    throw new Error("Only HTTP and HTTPS URLs are accepted.");
  }
  return url.href;
}

async function fetchJson(url, options = {}) {
  const response = await fetch(url, {
    ...options,
    signal: AbortSignal.timeout(8000),
  });
  const body = await response.json().catch(() => ({}));
  if (!response.ok) {
    throw new Error(`Provider returned HTTP ${response.status}`);
  }
  return body;
}

async function checkGoogle(url) {
  const endpoint = new URL("https://safebrowsing.googleapis.com/v5/urls:search");
  endpoint.searchParams.set("key", googleKey);
  const data = await fetchJson(endpoint, {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({
      urls: [url],
      threatTypes: ["SOCIAL_ENGINEERING"],
      client: { clientId: "example-link-checker", version: "1.0" },
    }),
  });

  return {
    provider: "Google Safe Browsing",
    status: data.threats?.length ? "match" : "no_known_match",
    threats: data.threats ?? [],
    cacheDuration: data.cacheDuration ?? null,
  };
}

async function submitVirusTotal(url) {
  const form = new URLSearchParams({ url });
  return fetchJson("https://www.virustotal.com/api/v3/urls", {
    method: "POST",
    headers: {
      "x-apikey": virusTotalKey,
      "content-type": "application/x-www-form-urlencoded",
    },
    body: form,
  });
}

async function getVirusTotalAnalysis(analysisId) {
  return fetchJson(
    `https://www.virustotal.com/api/v3/analyses/${encodeURIComponent(analysisId)}`,
    { headers: { "x-apikey": virusTotalKey } },
  );
}

app.post("/api/check-url", async (req, res) => {
  let url;
  try {
    url = parseHttpUrl(req.body?.url);
  } catch (error) {
    return res.status(400).json({ error: error.message });
  }

  const results = await Promise.allSettled([
    checkGoogle(url),
    (async () => {
      const submitted = await submitVirusTotal(url);
      const analysisId = submitted.data?.id;
      if (!analysisId) throw new Error("VirusTotal did not return an analysis ID.");
      const analysis = await getVirusTotalAnalysis(analysisId);
      return { analysisId, analysis: analysis.data ?? null };
    })(),
  ]);

  const providers = results.map((result, index) => {
    const provider = index === 0 ? "Google Safe Browsing" : "VirusTotal";
    return result.status === "fulfilled"
      ? { provider, status: "retrieved", result: result.value }
      : { provider, status: "error", error: result.reason.message };
  });

  res.json({ url, providers });
});

app.listen(3000, () => console.log("Listening on http://localhost:3000"));

Google’s v5 REST reference documents urls.search and hashes.search. The specific URL search reference documents the request and response fields. This example asks for SOCIAL_ENGINEERING results and sends one URL; the method allows up to 50 URLs per request.

The example treats any returned Google threat entry as a match and retains the response entries rather than inventing a combined risk score. Verify enum values and response shape against the current method reference when deploying; provider APIs can change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Call the route and interpret its response

Send a JSON request to POST /api/check-url:

curl -X POST http://localhost:3000/api/check-url 
  -H 'content-type: application/json' 
  -d '{"url":"https://example.com/"}'

The route rejects malformed input, non-HTTP(S) schemes, and URLs longer than 2,048 characters. A successful route response contains a separate entry for each provider. Google’s successful no-match response is HTTP 200 with an empty threats list; in the example that becomes no_known_match. The response can include cacheDuration; honor that provider-specified duration if caching lookup results.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

VirusTotal’s submission response provides an analysis ID. The code immediately requests that analysis and records the returned data. If the analysis is not ready or either service fails, this simple implementation records an error for that provider instead of pretending the URL passed. A production interface should communicate a provider error or pending analysis distinctly from a clean result.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Production safeguards and design choices

Keep credentials and timeouts server-side

The keys stay in environment variables and provider calls have an eight-second timeout. In a deployed service, add secret management, request-rate limits, authentication or abuse controls as appropriate, structured logging that does not expose submitted URLs, and error handling tailored to each provider’s documented status codes and rate limits.

Do not collapse disagreement into a made-up score

Preserve each provider’s retrieval state and its own categories. If one provider reports a threat while another returns no known match, show both results and advise caution. The documentation cited here does not establish a validated weighting formula, false-positive rate, or accuracy percentage, so this implementation does not create one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Choose URL lookup or hash-prefix lookup deliberately

Google’s urls.search is the simpler integration, but it sends the actual URL. The hashes.search option can reduce disclosure by sending four-byte hash prefixes, at the cost of implementing Google’s canonicalization and matching procedure correctly. Consult the overview and API reference before switching; hashing the original string alone is not equivalent to the documented flow.

As of the official documentation reviewed on 2026-10-05, no relevant named statistic establishes a general phishing detection rate for this integration. Treat results as reputation signals from these providers, not as a guarantee about any link.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.