---
title: "indexPath(forItemIdentifier:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitableviewdiffabledatasourcereference/indexpath(foritemidentifier:)"
---

# indexPath(forItemIdentifier:)

Returns an index path for the item with the specified identifier in the table view.

## Declaration

```swift
func indexPath(forItemIdentifier identifier: Any) -> IndexPath?
```

## Parameters

- `identifier`: The identifier of the item in the table view.

## Return Value

Return Value The item’s index path, or nil if no item is found with the provided item identifier.

## Discussion

Discussion This method is a constant time operation, O(1), which means you can look up an index path from its corresponding item identifier with no significant overhead.

## See Also

### Identifying items

- [itemIdentifier(for:)](uikit/uitableviewdiffabledatasourcereference/itemidentifier(for:).md)
