Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Safe Browsing URLs API
version: v5
description: Generated from Google's published Discovery document for Safe Browsing API (safebrowsing v5, revision 20261107). 1 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://safebrowsing.googleapis.com
tags:
- name: URLs
paths:
/v5/urls:search:
get:
operationId: safebrowsing.urls.search
summary: Search urls
description: Searches 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 response may contain URLs that were not included in the request, but are expressions of the requested URLs.
parameters:
- name: urls
in: query
required: false
description: Required. The URLs to be looked up. Clients MUST NOT send more than 50 URLs.
schema:
type: array
items:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleSecuritySafebrowsingV5SearchUrlsResponse'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- apiKey: []
tags:
- URLs
components:
schemas:
GoogleSecuritySafebrowsingV5ThreatUrl:
type: object
description: A URL matching one or more threats.
properties:
threatTypes:
items:
type: string
enum:
- THREAT_TYPE_UNSPECIFIED
- MALWARE
- SOCIAL_ENGINEERING
- UNWANTED_SOFTWARE
- POTENTIALLY_HARMFUL_APPLICATION
type: array
description: Unordered list. The unordered list of threat that the URL is classified as.
url:
description: The requested URL that was matched by one or more threats.
type: string
GoogleSecuritySafebrowsingV5SearchUrlsResponse:
properties:
threats:
type: array
items:
$ref: '#/components/schemas/GoogleSecuritySafebrowsingV5ThreatUrl'
description: Unordered list. The unordered list of threat matches found. Each entry contains a URL and the threat types that were found matching that URL. The list size can be greater than the number of URLs in the request as the all expressions of the URL would've been considered.
cacheDuration:
type: string
description: 'The client-side cache duration. The client MUST add this duration to the current time to determine the expiration time. The expiration time then applies to every URL queried by the client in the request, regardless of how many URLs are returned in the response. Even if the server returns no matches for a particular URL, this fact MUST also be cached by the client. If and only if the field `threats` is empty, the client MAY increase the `cache_duration` to determine a new expiration that is later than that specified by the server. In any case, the increased cache duration must not be longer than 24 hours. Important: the client MUST NOT assume that the server will return the same cache duration for all responses. The server MAY choose different cache durations for different responses depending on the situation.'
format: google-duration
type: object
description: The response returned after searching threats matching the specified URLs. If nothing is found, the server will return an OK status (HTTP status code 200) with the `threats` field empty, rather than returning a NOT_FOUND status (HTTP status code 404).
GoogleRpcError:
type: object
description: The error envelope every Google API returns.
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
status:
type: string
details:
type: array
items:
type: object
securitySchemes:
apiKey:
type: apiKey
in: query
name: key
description: API key; accepted by methods that do not need user data.
externalDocs:
url: https://developers.google.com/safe-browsing/
x-provenance:
method: harvested
publisher: Google
source: https://safebrowsing.googleapis.com/$discovery/rest?version=v5
note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261107)