---
title: "item(for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webhistory/item(for:)"
---

# item(for:)

Returns the web history item that corresponds to the specified web location.

## Declaration

```swift
func item(for URL: URL!) -> WebHistoryItem!
```

## Parameters

- `URL`: The location, as a URL, of the webpage that was visited.

## Return Value

Return Value The web history item that represents visits to the specified URL, or nil if none was found.

## See Also

### Getting Web History Items

- [orderedItemsLastVisited(onDay:)](webkit/webhistory/ordereditemslastvisited(onday:).md)
- [orderedLastVisitedDays](webkit/webhistory/orderedlastvisiteddays.md)
