---
title: "queryActivity(completionHandler:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchmaker/queryactivity(completionhandler:)"
---

# queryActivity(completionHandler:)

Finds the number of players, across player groups, who recently requested a match.

## Declaration

```swift
func queryActivity(completionHandler: (@Sendable (Int, (any Error)?) -> Void)? = nil)
```

```swift
func queryActivity() async throws -> Int
```

## Parameters

- `completionHandler`: The block that GameKit calls when it completes the request. This block receives the following parameters:

## See Also

### Finding players who request matches

- [queryPlayerGroupActivity(_:withCompletionHandler:)](gamekit/gkmatchmaker/queryplayergroupactivity(_:withcompletionhandler:).md)
- [queryQueueActivity(_:withCompletionHandler:)](gamekit/gkmatchmaker/queryqueueactivity(_:withcompletionhandler:).md)
