# Filter findings

Source: https://watership.ca/api-docs/docs/tasks/filter-findings

Report only the findings you care about, by level, by check group, or by tier and rule id.

There are two places to filter. Ask the API for less with fields in the request, or filter the findings in your own code after the response arrives. Filter in the request when you never want the other findings. Filter in your code when different people or steps need different views of one check.

## Report only errors, or errors and warnings [#report-only-errors-or-errors-and-warnings]

Set `min_level` in the request. The API leaves out every finding below that level:

```sh
curl http://127.0.0.1:4010/v1/checks \
  -H "Authorization: Bearer wsk_test_example" \
  -H "Content-Type: application/json" \
  -d '{"text": "The next maintenance window is 11/04/2026.", "format": "text", "min_level": "error"}'
```

| `min_level` | Reports |
|---|---|
| `suggestion` (default) | Errors, warnings, and suggestions |
| `warning` | Errors and warnings |
| `error` | Errors only |

The `counts` in the response count only the levels you asked for.

## Run only some groups of checks [#run-only-some-groups-of-checks]

Set `groups` to the check groups you want. To check only punctuation and numbers:

```json
{
  "text": "Exports finish within a day; it is rare for one to fail.",
  "groups": ["punctuation", "numbers"]
}
```

The groups are `voice`, `spelling`, `caps`, `punctuation`, `numbers`, `interface`, `links`, `inclusive`, `terms`, `structure`, `slop`, and `company`. To run only the slop guard checks, send `["slop"]`. Each finding's `group` field says which group it came from.

## Filter by tier [#filter-by-tier]

To act on every never-tier rule, filter on `tier`, not on `level`. Today every Watership check reports at the level of its rule's tier, so the two agree, but a company claims check has no tier and sets its own level, and a filter on `tier` keeps working if a check's level changes.

```js
const result = await response.json();

const blocking = result.findings.filter((f) => f.tier === 'never');
const worthFixing = result.findings.filter((f) => f.tier === 'avoid');
```

A company claims finding has no rule ids, so its `tier` is `null`. Its `level` is set by the organization's claims list: `error` for a banned claim, `warning` for one on the watch list. If you filter on tier, handle claims separately:

```js
const claims = result.findings.filter((f) => f.style === 'Company');
```

## Ignore one rule [#ignore-one-rule]

To drop one rule's findings, filter on `rule_ids`. A finding can name more than one rule, because one check can enforce rules in two guides, so test whether the list includes the id:

```js
const ignored = new Set(['voice-contractions']);
const kept = result.findings.filter((f) => !f.rule_ids.some((id) => ignored.has(id)));
```

To drop a rule for everyone in your organization, change the rule's tier in your copy of the guide instead. Filtering hides findings from one report, and a tier change applies everywhere the rule is checked.

## Related [#related]

- [The finding object](https://watership.ca/api-docs/docs/reference/finding) lists every field you can filter on.
- [Tiers and check types](https://watership.ca/api-docs/docs/concepts/tiers-and-check-types) explains what each tier means.
