---
title: "captureScreenshot(contentFilter:configuration:completionHandler:)"
framework: screencapturekit
role: symbol
role_heading: Type Method
path: "screencapturekit/scscreenshotmanager/capturescreenshot(contentfilter:configuration:completionhandler:)"
---

# captureScreenshot(contentFilter:configuration:completionHandler:)

## Declaration

```swift
class func captureScreenshot(contentFilter: SCContentFilter, configuration config: SCScreenshotConfiguration, completionHandler: (@Sendable (SCScreenshotOutput?, (any Error)?) -> Void)? = nil)
```

```swift
class func captureScreenshot(contentFilter: SCContentFilter, configuration config: SCScreenshotConfiguration) async throws -> SCScreenshotOutput
```

## Parameters

- `contentFilter`: Is the filter containing the content to take a screenshot of
- `config`: Is the screenshot configuration containing information on how to format the screenshot
- `completionHandler`: Is the handler that will deliver the SCScreenshotOutput object to the client

## Discussion

Discussion captureScreenshotWithFilter:configuration:completionHandler: this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client
