<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenTime",
  "identifier" : "/documentation/ScreenTime/STWebHistory/fetchHistory(during:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Screen Time"
    ],
    "preciseIdentifier" : "c:objc(cs)STWebHistory(im)fetchHistoryDuringInterval:completionHandler:"
  },
  "title" : "fetchHistory(during:completionHandler:)"
}
-->

# fetchHistory(during:completionHandler:)

Fetches web history that occurred during the date interval you specify.

```
func fetchHistory(during interval: DateInterval, completionHandler: @escaping @Sendable (Set<URL>?, (any Error)?) -> Void)
```

```
func fetchHistory(during interval: DateInterval) async throws -> Set<URL>
```

## Parameters

`interval`

The date interval of web history you want to fetch.

---

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)