# instances

### Description

`instances` returns all the [instances](https://docs.atfinity.io/guides/glossary/instance) of the type(s) specified. It should be used in combination with [`count`](https://docs.atfinity.io/rule-language/operators/list-operators/count) or [`get_properties_from_instances`](https://docs.atfinity.io/rule-language/operators/special-operators/get-properties-from-instances). Like other declarations, an optional where clause is also supported.

### Example: Ontology and Role

```
instances(Person, AccountHolder)
```

This will give you all instances that are of the type Person and have the [role](https://docs.atfinity.io/guides/glossary/role) AccountHolder.<br>

### Example: Ontology and Where-Clause

```
instances(Person where self.first_name = 'Thorben')
```

This will give you all instances that are of the type Person that have the `first_name` Thorben.
