canonical: https://jentic.com/apis/googleapis.com/safebrowsing

# Google Safe Browsing API

The Google Safe Browsing API v5 lets client applications check whether URLs and other web resources match Google-curated lists of malware, phishing, and other unsafe content. The v5 surface focuses on a hash-prefix search endpoint that preserves user privacy by sending only a hash prefix to the server. Safe Browsing is licensed for non-commercial use; Web Risk is the commercial equivalent for products that sell or generate revenue from the threat data.

## For AI agents

Check whether URLs are flagged by Google Safe Browsing using the v5 hash-prefix lookup endpoint, with privacy-preserving partial-hash lookups.

## Scope

Does not block traffic, render warning interstitials, or scan attachments - use for hash-prefix URL reputation lookups against Google threat lists only.

## Capabilities

- Check a URL hash prefix against Google's malware and phishing threat lists
- Identify Safe Browsing threat types associated with returned full hashes
- Operate the lookup with API key authentication suitable for backend services
- Use partial hash lookups to avoid sending full URLs to the server
- Validate URLs in user-generated content before publishing or following them
- Build crawler-side allow and deny logic against the Safe Browsing threat list

## Use cases

### Pre-delivery URL scanning for messaging platforms

A messaging service hashes every URL inside an inbound message and checks the prefix against Safe Browsing v5 before delivery. If the hash returns a matching threat, the service quarantines the message and notifies the sender. Hash-prefix lookups keep the full URL out of Google's view, supporting privacy-sensitive deployments.

Example prompt: Compute SHA-256 over each URL, take the 4-byte prefix, GET /v5/hashes:search with the prefix, and quarantine messages whose URLs return a matching threat.

### User-generated content moderation

A content platform feeds every newly posted URL into Safe Browsing and removes posts whose URLs match malware or phishing lists. The hash-prefix model lets the platform check millions of URLs daily without revealing the underlying content to Google, and the v5 lookup is fast enough for inline use during post submission.

Example prompt: On each new post, compute the hash prefix for embedded URLs and call GET /v5/hashes:search; remove the post if any threat type is returned.

### Crawler safety gate

A web crawler checks every fetch target against Safe Browsing before issuing the request, preventing the crawler from following links into known malware. The lookup happens once per host and is cached, so the crawl rate stays high while exposure to drive-by downloads is reduced.

Example prompt: Before each fetch, GET /v5/hashes:search with the URL hash prefix; skip the URL if the response includes any threatType.

### Agent-driven URL safety checks through Jentic

An AI agent built on Jentic exposes URL safety as a tool: when asked to summarise a webpage, it first calls Safe Browsing through Jentic, refuses to fetch flagged URLs, and explains why. Jentic stores the API key in the vault and returns the matching operation by intent.

Example prompt: Search Jentic for 'check url with safe browsing', execute GET /v5/hashes:search with the URL hash prefix, refuse to summarise the page if any threat is returned.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v5/hashes:search | Search hash prefixes against Safe Browsing threat lists |

## Key resources

- **Hashes** — Search hash prefixes against Google's threat lists with privacy-preserving partial hash lookups.

## Why Jentic

- **Setup:** Wiring the Safe Browsing API by hand means provisioning a Google API key, appending it to every request, and formatting hash-prefix lookups against the single v5 endpoint on safebrowsing.googleapis.com. Through Jentic you install once, import the Safe Browsing API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** This API exposes a single read-only lookup operation (GET /v5/hashes:search), so a rule limits the agent to that one operation: it can check URL reputation against Google's threat lists and nothing else. There are no state-changing operations to add, so the scope stays read-only by construction.
- **Credential handling:** Your Safe Browsing API key is stored once, encrypted, by your own Jentic One instance and appended to the request at execution time. The key never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'check a URL with Safe Browsing', and Jentic returns the GET /v5/hashes:search operation with its input schema so the agent calls the right endpoint without reading the developer guide.

## Related APIs

- **Web Risk API** — Commercial equivalent of Safe Browsing for products that sell or generate revenue.
- **reCAPTCHA Enterprise API** — Adds bot and abuse detection alongside URL threat checks.
- **Web Security Scanner API** — Scans your own apps for vulnerabilities rather than checking external URLs.
- **Security Command Center API** — Aggregates security findings across Google Cloud, including URL threat signals.

## FAQ

### What authentication does the Safe Browsing API use?

The v5 spec exposes a single GET /v5/hashes:search endpoint accessed with a Google API key passed via the standard key query parameter. Through Jentic, the API key is stored encrypted in the vault and injected into requests at execution time, so the agent never holds the raw key.

### Can I check a URL for phishing with the Safe Browsing API?

Yes. Compute SHA-256 over the canonicalized URL, send a hash prefix on GET /v5/hashes:search, and inspect the response for matching full hashes and their threat types. SOCIAL_ENGINEERING in the threat type indicates phishing; MALWARE indicates a malicious binary or script.

### What are the rate limits for the Safe Browsing API?

Google publishes a default quota of 10,000 queries per day per project for Safe Browsing v5, with a per-second cap of approximately 10 requests per second. Higher quotas are not generally granted because Safe Browsing is restricted to non-commercial use; commercial deployments should use the Web Risk API instead.

### How do I check a URL through Jentic?

Search Jentic for 'check url with safe browsing', load the schema for GET /v5/hashes:search, compute the SHA-256 hash prefix client-side, and execute the call. Jentic returns the parsed response so the agent can inspect threatType values for each match.

### Is the Safe Browsing API free?

Yes, but only for non-commercial use as defined in Google's terms. If you sell or generate revenue from the threat data, use Google's Web Risk API instead, which is the paid commercial equivalent and is also covered in this catalogue.

### Why does Safe Browsing only send hash prefixes to the server?

The hash-prefix model preserves user privacy: the client sends a 4-byte prefix of the SHA-256 hash of the URL rather than the URL itself. The server returns matching full hashes for that prefix, and the client compares locally to determine whether the original URL is on the list - so Google never sees the full URLs being checked.

### Can I limit what my agent is allowed to do with the Safe Browsing API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use. The Safe Browsing API exposes a single read-only lookup, GET /v5/hashes:search, so you can scope the agent to that one operation and nothing else. It can check URL hash prefixes against Google's malware and phishing threat lists, and since there are no state-changing operations to enable, the access stays read-only.
