> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/safebrowsing/doc/en/llms.txt

# Update. Hash-based check

You can use the request to see if URLs are present on [Safe Browsing lists](https://yandex.com/dev/safebrowsing/doc/en/concepts/safebrowsing-lists.md#sb-lists). Compute [the hash prefix](https://yandex.com/dev/safebrowsing/doc/en/concepts/url-hash.md) for the URL and search the local database. If the hash prefix is found in at least one of the lists, the request returns data about the threat posed by the URL for the user. 


{% note info %}

Before searching, make sure that you completely [downloaded](https://yandex.com/dev/safebrowsing/doc/en/concepts/update-threatlist.md) the Safe Browsing lists you need and that the local database is up-to-date. Otherwise, use a и  [Lookup. URL-based check](https://yandex.com/dev/safebrowsing/doc/en/concepts/lookup.md) request.

{% endnote %}

## Request format {#request-format}

```
POST https://sba.yandex.net/v4/fullHashes:find
  ? [key](*key)=<API key>
```

#|
||
##key##[*](*requiredParam)
|

[API key](https://yandex.com/dev/safebrowsing/doc/en/concepts/restricts.md) value.

||
|#

\* Required

### Request body {#request-body}

```json
{ 
  "[client](*client)": {
    "[clientId](*clientId)": "{string}",
    "[clientVersion](*clientVersion)": "{string}"
  },
  "[clientStates](*clientStates)": ["{string}"],
  "[threatInfo](*threatInfo)": {
    "[threatTypes](*threatTypes)": ["{enum}"],
    "[platformTypes](*platformTypes)": ["{enum}"],
    "[threatEntryTypes](*threatEntryTypes)": ["{enum}"],
    "[threatEntries](*threatEntries)": [
      {"[hash](*hash)": "string"}
    ]
  }
}
```

{% include notitle [client](../_includes/params.md#client) %}

##### {#clientStates}

{% include notitle [clientStates](../_includes/params.md#clientStates) %}

{% include notitle [threatInfo](../_includes/params.md#threatInfo) %}

 
:   {% include notitle [threatTypes](../_includes/params.md#threatTypes) %}

    {% include notitle [platformTypes](../_includes/params.md#platformTypes) %}
    
    {% include notitle [threatEntryTypes](../_includes/params.md#threatEntryTypes) %}
    
    #|
    || ##threatEntries##[*](*requiredParam) | Checked resources. Array of objects. ||
    |#

     
    :   {% include notitle [hash](../_includes/params.md#hash) %}

\* Required

{% include notitle [request-format-response-format](../_includes/concepts/safebrowsing-lists/id-request-format/response-format.md) %}

## Response format {#response-body}

The response contains detailed information about the threat posed by each of the resources found.

If none of the checked hash prefixes are found on the server-hosted Safe Browsing lists, the response body contains only the `negativeCacheDuration` parameter. If matches are found, the response contains detailed information about the danger posed by each of the resources found.

```json
{
  "[matches](*matches)": [
    {
      "[threatType](*threatType)": "{еnum}",
      "[platformType](*platformType)": "{еnum}",
      "[threatEntryType](*threatEntryType)": "{еnum}",
      "[threat](*threat)": {"[hash](*hash_2)": "{string}"},
      "[cacheDuration](*cacheDuration)": "{string}"
    }
  ],
  "[minimumWaitDuration](*minimumWaitDuration)": "{string}",
  "[negativeCacheDuration](*negativeCacheDuration)": "{string}"
}
```

{% include notitle [matches](../_includes/params.md#matches) %}

 
:   {% include notitle [threatType](../_includes/params.md#threatType) %}

    {% include notitle [platformType](../_includes/params.md#platformType) %}
    
    {% include notitle [threatEntryType](../_includes/params.md#threatEntryType) %}
    
    #|
    ||
    ##threat##
    |
    
    The resource that poses a threat.
    
    ||
    |#

     
    :   #|
        ||
        ##hash##
        |
        A full-length hash for the URL.
        ||
        |#

    #|
    ||
    ##cacheDuration##
    |
    
    The time to cache the data about the threat posed by the resource. It's specified in seconds in the format `"<time>s"`.
    
    ||
    |#

#|
||
##minimumWaitDuration##
|
Minimum time in seconds before re-sending the request. Specified in the format `"minimumWaitDuration": "<time>s"`. Up to nine decimal digits are supported.
||
|#

{% include notitle [negativeCacheDuration](../_includes/params.md#negativeCacheDuration) %}

\* Required

## Example {#example}

Request URL:

```
https://sba.yandex.net/v4/fullHashes:find?key=2f8...8ea
```

Request body:

```json
{
  "[client](*client)": {
    "[clientId](*clientId)": "client_name",
    "[clientVersion](*clientVersion)": "1.1.1"
  },
  "[threatInfo](*threatInfo)": {
    "[threatTypes](*threatTypes)": ["MALWARE", "SOCIAL_ENGINEERING"],
    "[platformTypes](*platformTypes)": ["WINDOWS", "ALL_PLATFORMS"],
    "[threatEntryTypes](*threatEntryTypes)": ["URL"],
    "[threatEntries](*threatEntries)": [
      {"[hash](*hash)": "N2JjODJjN2U="}
    ]
  }
}
```

Response:
```json
{
  "[negativeCacheDuration](*negativeCacheDuration)": "1200.00s"
}
```

{% include notitle [table-style-none.md](../_includes/table-style-none.md) %}

[*key]: [API key](https://yandex.com/dev/safebrowsing/doc/en/concepts/restricts.md) value.

[*requiredParam]: \* Required

[*newClientState]:
    {% include notitle [newClientState](../_includes/popups.md#newClientState) %}

[*client]:
    {% include notitle [client](../_includes/popups.md#client) %}

[*clientId]:
    {% include notitle [clientId](../_includes/popups.md#clientId) %}

[*clientVersion]:
    {% include notitle [clientVersion](../_includes/popups.md#clientVersion) %}

[*threatInfo]:
    {% include notitle [threatInfo](../_includes/popups.md#threatInfo) %}

[*threatTypes]:
    {% include notitle [threatTypes](../_includes/popups.md#threatTypes) %}

[*platformTypes]:
    {% include notitle [platformTypes](../_includes/popups.md#platformTypes) %}

[*threatEntryTypes]:
    {% include notitle [threatEntryTypes](../_includes/popups.md#threatEntryTypes) %}

[*hash]:
    {% include notitle [hash](../_includes/popups.md#hash) %}

[*hash_2]:
    {% include notitle [hash_2](../_includes/popups.md#hash_2) %}

[*matches]:
    {% include notitle [matches](../_includes/popups.md#matches) %}

[*threatType]:
    {% include notitle [threatType](../_includes/popups.md#threatType) %}

[*platformType]:
    {% include notitle [platformType](../_includes/popups.md#platformType) %}

[*threatEntryType]:
    {% include notitle [threatEntryType](../_includes/popups.md#threatEntryType) %}

[*threat]:
    {% include notitle [threat](../_includes/popups.md#threat) %}

[*cacheDuration]:
    {% include notitle [cacheDuration](../_includes/popups.md#cacheDuration) %}

[*minimumWaitDuration]:
    {% include notitle [minimumWaitDuration](../_includes/popups.md#minimumWaitDuration) %}

[*negativeCacheDuration]:
    {% include notitle [negativeCacheDuration](../_includes/popups.md#negativeCacheDuration) %}

[*clientStates]:
    {% include notitle [clientStatesUFF](../_includes/popups.md#clientStatesUFF) %}

[*threatEntries]: Checked resources. Array of objects.
