# head

Limits the input to the first `n` events.

```tql
head [n:int]
```

## Description

Forwards the first `n` events and discards the rest.

`head n` is a shorthand notation for [`slice end=n`](https://preview.docs.tenzir.com/375/375/reference/operators/slice.md).

### `n: int (optional)`

The number of events to keep.

Defaults to `10`.

## Examples

### Get the first 10 events

```tql
head
```

### Get the first 5 events

```tql
head 5
```

## See Also

* [`slice`](https://preview.docs.tenzir.com/375/375/reference/operators/slice.md)
* [`tail`](https://preview.docs.tenzir.com/375/375/reference/operators/tail.md)
* [Slice and sample data](https://preview.docs.tenzir.com/375/375/guides/optimization/slice-and-sample-data.md)
* [Plot data with charts](https://preview.docs.tenzir.com/375/375/tutorials/plot-data-with-charts.md)