> ## Documentation Index
> Fetch the complete documentation index at: https://enhancedradar.com/docs/api/llms.txt
> Use this file to discover all available pages before exploring further.

# Events topic

> Stream events that happened on frequency as they are reported and updated over the live WebSocket.

Streams events as they are reported and updated. Each event is checked against the subscription's filters and, when `q` is given, matched against `q` the same way [Search events](https://enhancedradar.com/docs/api/docs/api/api-reference/events/search.md) matches it. See [Connect](https://enhancedradar.com/docs/api/docs/api/api-reference/live/connect.md) for the message format.

## Parameters

At least one parameter other than `minimum_similarity_score` is required.

**q** `string`

What you are looking for, e.g. `laser strike on approach` or `aircraft returning to the gate`. Without `q`, every event that passes the filters is sent.

**minimum\_similarity\_score** `number` (default: 0.45)

Only with `q`. The lowest `similarity_score`, from 0 to 1, an event must reach to be sent.

**callsign** `string`

Only events involving this flight, by ICAO callsign.

**facility\_id** `string`

Only events on this facility's available channels.

**atc\_channel\_ids** `integer[]`

Array of channel ids, e.g. `[4, 7, 8]`. Only events on these channels. With `facility_id`, only the channels in both.

**airline\_id** `integer`

Only events involving a flight of this airline, from [List airlines](https://enhancedradar.com/docs/api/docs/api/api-reference/airlines/list.md).

```json theme={null}
{"action": "subscribe", "subscription_topic": "events", "params": {"q": "aircraft returning to the gate", "facility_id": "36bb4190-36e1-4aaf-b677-d9861a66cebb", "minimum_similarity_score": 0.5}}
```

## Updates

Each update's `data` has the same fields as one entry of `events` in [Search events](https://enhancedradar.com/docs/api/docs/api/api-reference/events/search.md), including every update so far. `similarity_score` is present only with `q`.

An event is sent when it is first reported and again each time it is updated, with the new update added to `updates`. Replace an earlier message for the same `event_id` with the newer one. A filter or `q` is checked against the newest report or update; once an event has been sent on a subscription, every later update to it is sent on that subscription too, even if the update alone would not match.

An event reaches the stream once its description has been written and indexed, usually within 30 seconds of being reported and rarely more than a minute.

## Choosing a threshold

Scores depend on the query: an event that clearly matches one query can score lower than a loose match for another. To choose `minimum_similarity_score`, run [Search events](https://enhancedradar.com/docs/api/docs/api/api-reference/events/search.md) with the same `q` over a recent window and note the `similarity_score` of the results you would and would not want; the scores are on the same scale.

> [!WARNING]
>
> Events are written by a language model from transcripts and can contain mistakes. Check important details against the transcripts.

## Billing

Subscribing is free. Each message is charged as one `event_push`, at \$5.00, when it is sent: the first report and each later update of an event are separate messages. See [Pricing](https://enhancedradar.com/docs/api/docs/api/pricing.md) and [Billing](https://enhancedradar.com/docs/api/docs/api/concepts/billing.md).

## Refusals

The subscription is refused when:

* No parameter was given.
* `minimum_similarity_score` was given without `q` or is not a number from 0 to 1.
* A filter is invalid, such as an unknown `airline_id`, a facility that is not covered, an unavailable channel, or `atc_channel_ids` with none on `facility_id`.
* `q` could not be processed; retry later.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.