<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceActivity",
  "identifier" : "/documentation/DeviceActivity/DeviceActivityData/activityData(filteredBy:using:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Device Activity",
      "DeviceActivity"
    ],
    "preciseIdentifier" : "s:14DeviceActivity0aB4DataV08activityC010filteredBy5usingQrAA0aB6FilterV_AC6PolicyOtFZ"
  },
  "title" : "activityData(filteredBy:using:)"
}
-->

# activityData(filteredBy:using:)

Requests device activity data using a filter.

```
static func activityData(filteredBy filter: DeviceActivityFilter = .init(), using policy: DeviceActivityData.Policy = .cached) -> some AsyncSequence<DeviceActivityData, any Error>
```

## Parameters

`filter`

The filter to use when fetching activity data.

`policy`

The policy to use when fetching activity data.

## Return Value

A sequence of device activity data for the given filter.

## Discussion

Use this method to export family activity data, for use in another app or platform.

### Region support, authorization, and entitlement

You can develop and test an app that uses this method on devices in any region. Customer installations of your app can only use the method on devices located in the EU that are signed in with an Apple Account with an EU country or region. Otherwise, it throws an error.

Your app’s authorization status needs to be <doc://com.apple.documentation/documentation/FamilyControls/AuthorizationStatus/approvedWithDataAccess> to use this method.

Your app needs the  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.family-controls.app-and-website-usage> entitlement to use this method. Enable the capability on your Xcode target to add the entitlement to your app. For more information, see <doc://com.apple.documentation/documentation/Xcode/adding-capabilities-to-your-app>.

---

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)