Safe Browsing API
Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for…
Developer tools#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes – meaning “for sale or revenue-generating purposes” – please refer to the Web Risk API.
Endpoints 5
hashList
- GETGets the latest contents of a hash list
/v5/hashList/:name?sizeConstraints.maxDatabaseEntries=0&sizeConstraints.maxUpdateEntries=0&version=stringGets the latest contents of a hash list. A hash list may either by a threat list or a non-threat list such as the Global Cache. This is a standard Get method…
hashLists
- GETGets multiple hash lists at once
/v5/hashLists:batchGet?names=string&sizeConstraints.maxDatabaseEntries=0&sizeConstraints.maxUpdateEntries=0&version=stringGets multiple hash lists at once. It is very common for a client to need to get multiple hash lists. Using this method is preferred over using the regular Get… - GETLists hash lists
/v5/hashLists?pageSize=0&pageToken=stringLists hash lists. In the V5 API, Google will never remove a hash list that has ever been returned by this method. This enables clients to skip using this…
hashes
- GETSearches for full hashes matching the specified prefixes
/v5/hashes:search?hashPrefixes=stringSearches for full hashes matching the specified prefixes. This is a custom method as defined by https://google.aip.dev/136 (the custom method refers to this…
urls
- GETSearches for URLs matching known threats
/v5/urls:search?urls=stringSearches for URLs matching known threats. Each URL and it's host-suffix and path-prefix expressions (up to a limited depth) are checked. This means that the…
API details
- Base URL
https://safebrowsing.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow)
An API key in the key query parameter - Operations
- 5 operations on 5 pathsGET 5
- Main resources
- hashLists 2hashList 1hashes 1urls 1
- Response formats
application/json- Description format
- Google API Discovery, API version
v5 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Safe Browsing API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Safe Browsing API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Gets the latest contents of a hash list” (GET /v5/hashList/:name?sizeConstraints.maxDatabaseEntries=0&sizeConstraints.maxUpdateEntries=0&version=string), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Safe Browsing API?
Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for… It is listed under Developer tools and has 5 endpoints.
Who publishes the Safe Browsing API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Safe Browsing API?
Requests go to https://safebrowsing.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Safe Browsing API?
It accepts 2 methods: OAuth 2.0 (authorization code flow); an API key in the key query parameter.
How many endpoints does the Safe Browsing API have?
5 operations on 5 paths (5 GET). The largest groups are hashLists, hashList, hashes, urls.
Is forking the Safe Browsing API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.