<!--
{
  "availability" : [
    "iOS: 26.2.0 -",
    "iPadOS: 26.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BEWebContentFilter/evaluateURL(_:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(cs)BEWebContentFilter(im)evaluateURL:completionHandler:"
  },
  "title" : "evaluateURL(_:completionHandler:)"
}
-->

# evaluateURL(_:completionHandler:)

Determines whether to block a URL.

```
func evaluateURL(_ url: URL, completionHandler: @escaping @Sendable (Bool, Data?) -> Void)
```

```
func evaluateURL(_ url: URL) async -> (Bool, Data?)
```

## Parameters

`url`

The URL to evaluate.

`completionHandler`

A closure that the system invokes when URL evaluation finishes. The closure returns `true` if the URL is blocked; `false`, otherwise.

## Discussion

If this method blocks a URL, it returns a UTF-8 encoded HTML representation of a blocking page.

This method performs a lazy initialization of some objects, so the first call can take longer than subsequent calls.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)