> ## Streaming results with the CLI and API

> Follow a test run's results as they come in, from the command line or the Antithesis API.

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

---

You can stream a test run's results as they come in, from the Snouty CLI or the Antithesis API.

To follow a run in the web app instead, use the [Run View](/docs/product/understanding_test_results/run_view/) (currently in beta).

## Stream property results

Stream a run's properties to get notifications when Antithesis first encounters a property, and when properties pass or fail.

**With the API**

Call the [property stream](/docs/reference/rest_api/#op-streamRunStatus) endpoint:

```bash
curl --fail $AUTH -N -X POST \
https://$ANTITHESIS_TENANT.antithesis.com/api/v0/runs/$RUN/stream \
-d '{}'
# → {"type": "NEW_PROPERTIES_ADDED", "data": [{"id": "27a7cb0b...", "name": "Writes are durable",
#     "status": "Undetermined", "example_count": 0, "counterexample_count": 0, ...}]}
#   {"type": "PROPERTIES_FAILED", "data": [{"id": "27a7cb0b...", "name": "Writes are durable",
#     "status": "Failing", "example_count": 0, "counterexample_count": 1, ...}]}
#   {"type": "RUN_FINALIZED", "data": []}
```

**With Snouty CLI**

Run [`snouty runs stream`](/docs/ai/snouty/#check-property-results) to print one line for each event as it happens:

```bash
snouty runs stream <run-id>
```

Each `sample` line gives the moment of an example or counterexample, which you can pass to `snouty runs logs` to read the logs at that moment. Snouty only sends a selection of samples, not all of them.

Use the `--property` flag to follow only specific properties, or `--json` to print each event as a JSON object.

The stream only shows events that happen after it starts. To get the current results as well, start the stream first, wait until Snouty reports that the stream is open, and then run `snouty runs properties $RUN`.

## Stream event logs

Stream a run's events to get new matches as Antithesis finds them. Queries use [event sets](/docs/reference/event-set-reference/).

**With the API**

Call the [search endpoint](/docs/reference/rest_api/#op-search) with `is_streaming` set to `true`:

```bash
curl --fail $AUTH -N -X POST \
https://$ANTITHESIS_TENANT.antithesis.com/api/v0/runs/$RUN/events/search \
-d '{"query": "contains({output_text: \"connection refused\"})", "is_streaming": true}'
```

Matching events arrive as newline-delimited JSON, one event per line.

**With Snouty CLI**

Run [`snouty runs search`](/docs/ai/snouty/#search-events-in-a-run) with the `--follow` flag to stream new results as they arrive:

```bash
snouty runs search $RUN --follow \
'contains({output_text: "connection refused"})'
```

Use the `--limit` flag (default 50) to cap the total number of events printed.
