# Get search

URL: https://docs.hanzo.ai/docs/openapi/risk/risksearchresult

> Reads back one search run: every shape tried over this organisation's own history, best first, and the one that fit.

`GET /v1/risk/search/{id}`

> [Risk →](https://docs.hanzo.ai/docs/openapi/risk) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                            |
| ------------- | ------------------------------------------ |
| **Address**   | `https://api.hanzo.ai/v1/risk/search/{id}` |
| **Method**    | `GET`                                      |
| **Operation** | `riskSearchResult`                         |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`     |

Reads back one search run: every shape tried over this
organisation's own history, best first, and the one that fit.

A run another organisation started is simply not there — the same 404 an
unknown id gives, so the read is not a probe oracle.

## Request

1 field.

| Field | In   | Type   | Required | Description                         |
| ----- | ---- | ------ | -------- | ----------------------------------- |
| `id`  | path | string | yes      | ID is the run, taken from the path. |

## Response

| Status    | Body                  | Meaning |
| --------- | --------------------- | ------- |
| `200`     | risk.riskSearchReport | ok      |
| `default` | problem-details       | refused |

`200` body — 48 fields.

| Field                      | In   | Type                | Always | Description                                                                                                                                                                                                                          |
| -------------------------- | ---- | ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `done`                     | body | boolean             | —      | Done is false while the run is still going; the trials below are then the ones finished so far.                                                                                                                                      |
| `ended`                    | body | string              | —      | Ended is when it finished, RFC 3339.                                                                                                                                                                                                 |
| `events`                   | body | integer (int64)     | —      | Events is how much of this organisation's history was replayed.                                                                                                                                                                      |
| `fitted`                   | body | risk.riskModelValue | —      |                                                                                                                                                                                                                                      |
| `fitted.address`           | body | string              | —      | Address names this value by its own content: the model's shape, the geometry seed, its position in the window, its threshold, its masses as IEEE-754 bits and the fold watermark behind them.                                        |
| `fitted.at`                | body | string              | —      | At is when it was published, RFC 3339, on the server clock.                                                                                                                                                                          |
| `fitted.learned`           | body | integer (int64)     | —      | Learned is how many events are behind the masses.                                                                                                                                                                                    |
| `fitted.sequence`          | body | integer (int64)     | —      | Sequence is this value's place in YOUR organisation's own history, from 1 and contiguous until retention disposes of the oldest.                                                                                                     |
| `fitted.shape`             | body | string              | —      | Shape NAMES the model space the masses are only meaningful against, as `&lt;family&gt;:&lt;digest&gt;` — the KIND of model, and that family's own digest over the feature inventory in order and the detector's geometry parameters. |
| `fitted.warmed`            | body | string              | —      | Warmed is how far your own event surface had been folded in when this value was published, RFC 3339.                                                                                                                                 |
| `gap`                      | body | string              | —      | Gap says why the winning shape could not be fitted into an adoptable value, when it could not.                                                                                                                                       |
| `id`                       | body | string              | —      | ID is the run.                                                                                                                                                                                                                       |
| `refusal`                  | body | string              | —      | Refusal says why the run proves nothing, when it does.                                                                                                                                                                               |
| `started`                  | body | string              | —      | Started is when the run was accepted, RFC 3339.                                                                                                                                                                                      |
| `trials`                   | body | risk.riskTrial\[]   | —      | Trials is every shape tried, best first.                                                                                                                                                                                             |
| `trials[].alerted`         | body | integer (int64)     | —      | Alerted is how many of those it would have raised.                                                                                                                                                                                   |
| `trials[].curve`           | body | number (double)\[]  | —      | Curve is the realised alert rate over successive tenths of the history — the learning curve, which says whether the shape settled or is still moving.                                                                                |
| `trials[].fit`             | body | number (double)     | —      | Fit ranks the shape, smaller being better: the relative miss of the stated appetite, plus flat penalties for never warming and for saturating, plus the share of coordinates that were blind.                                        |
| `trials[].learned`         | body | integer (int64)     | —      | Learned is how many events the shape learned from during the replay.                                                                                                                                                                 |
| `trials[].realised`        | body | number (double)     | —      | Realised is what that appetite actually produced.                                                                                                                                                                                    |
| `trials[].saturated`       | body | boolean             | —      | Saturated is whether the appetite could not be honoured by any threshold, which is a shape that alerts on nothing and reads like a quiet one.                                                                                        |
| `trials[].scored`          | body | integer (int64)     | —      | Scored is how many it was able to score.                                                                                                                                                                                             |
| `trials[].stated`          | body | number (double)     | —      | Stated is the appetite the shape was tried at.                                                                                                                                                                                       |
| `trials[].topology`        | body | risk.riskTopology   | —      |                                                                                                                                                                                                                                      |
| `trials[].topology.blend`  | body | number (double)     | —      | Blend is how much of a closing window folds into the reference: 1 replaces it outright, less makes the reference expensive to move.                                                                                                  |
| `trials[].topology.depth`  | body | integer (int64)     | —      | Depth is how deep each tree is.                                                                                                                                                                                                      |
| `trials[].topology.family` | body | string              | —      | Family is the KIND of model this candidate is: `halfspace` is an ensemble of half-space trees whose masses are counters, and it is the family this search grid ranks.                                                                |
| `trials[].topology.review` | body | number (double)     | —      | Review is the appetite this shape was tried at.                                                                                                                                                                                      |
| `trials[].topology.trees`  | body | integer (int64)     | —      | Trees is how many half-space trees the ensemble holds.                                                                                                                                                                               |
| `trials[].topology.window` | body | integer (int64)     | —      | Window is how many events make one reference window.                                                                                                                                                                                 |
| `trials[].warm`            | body | boolean             | —      | Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history.                                                                                                                           |
| `winner`                   | body | risk.riskTrial      | —      |                                                                                                                                                                                                                                      |
| `winner.alerted`           | body | integer (int64)     | —      | Alerted is how many of those it would have raised.                                                                                                                                                                                   |
| `winner.curve`             | body | number (double)\[]  | —      | Curve is the realised alert rate over successive tenths of the history — the learning curve, which says whether the shape settled or is still moving.                                                                                |
| `winner.fit`               | body | number (double)     | —      | Fit ranks the shape, smaller being better: the relative miss of the stated appetite, plus flat penalties for never warming and for saturating, plus the share of coordinates that were blind.                                        |
| `winner.learned`           | body | integer (int64)     | —      | Learned is how many events the shape learned from during the replay.                                                                                                                                                                 |
| `winner.realised`          | body | number (double)     | —      | Realised is what that appetite actually produced.                                                                                                                                                                                    |
| `winner.saturated`         | body | boolean             | —      | Saturated is whether the appetite could not be honoured by any threshold, which is a shape that alerts on nothing and reads like a quiet one.                                                                                        |
| `winner.scored`            | body | integer (int64)     | —      | Scored is how many it was able to score.                                                                                                                                                                                             |
| `winner.stated`            | body | number (double)     | —      | Stated is the appetite the shape was tried at.                                                                                                                                                                                       |
| `winner.topology`          | body | risk.riskTopology   | —      |                                                                                                                                                                                                                                      |
| `winner.topology.blend`    | body | number (double)     | —      | Blend is how much of a closing window folds into the reference: 1 replaces it outright, less makes the reference expensive to move.                                                                                                  |
| `winner.topology.depth`    | body | integer (int64)     | —      | Depth is how deep each tree is.                                                                                                                                                                                                      |
| `winner.topology.family`   | body | string              | —      | Family is the KIND of model this candidate is: `halfspace` is an ensemble of half-space trees whose masses are counters, and it is the family this search grid ranks.                                                                |
| `winner.topology.review`   | body | number (double)     | —      | Review is the appetite this shape was tried at.                                                                                                                                                                                      |
| `winner.topology.trees`    | body | integer (int64)     | —      | Trees is how many half-space trees the ensemble holds.                                                                                                                                                                               |
| `winner.topology.window`   | body | integer (int64)     | —      | Window is how many events make one reference window.                                                                                                                                                                                 |
| `winner.warm`              | body | boolean             | —      | Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history.                                                                                                                           |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo risk search get <id>
```

**SDK**

**.ts**

```ts
import { Configuration, RiskApi } from 'hanzoai';

const api = new RiskApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskSearchResult({ id: 'id' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import RiskApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = RiskApi(client).risk_search_result(id='id')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.RiskAPI.RiskSearchResult(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, risk_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = risk_api::risk_search_result(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.RiskApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new RiskApi(client).riskSearchResult();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/risk/search/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `risk`, op `riskSearchResult` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "risk",
         "arguments": {
           "op": "riskSearchResult",
           "input": {
             "id": "<id>"
           }
         }
       }
     }'
```

---

[Risk API](https://docs.hanzo.ai/docs/openapi/risk) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
