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

# Discovery Filters

> Structured filters supported on /discovery/resources and /discovery/search.

All filters are accepted as query-string parameters on both [`/discovery/resources`](/api/discovery-resources) and [`/discovery/search`](/api/discovery-search). Multiple filters combine with AND semantics.

## Payment filters

| Filter     | Type   | Example          | Notes                       |
| ---------- | ------ | ---------------- | --------------------------- |
| `network`  | string | `stellar:pubnet` | CAIP-2 identifier.          |
| `scheme`   | string | `exact`, `upto`  |                             |
| `asset`    | string | `USDC`           | Symbol or contract address. |
| `maxPrice` | number | `0.01`           | In human units of `asset`.  |
| `minPrice` | number | `0.001`          |                             |

## Resource filters

| Filter  | Type                | Example                    |
| ------- | ------------------- | -------------------------- |
| `type`  | `http` \| `mcp`     | `type=mcp`                 |
| `tag`   | string (repeatable) | `tag=weather&tag=forecast` |
| `payTo` | string              | `GCKF...QMBA`              |

## Result controls

| Filter   | Type                          | Default      |
| -------- | ----------------------------- | ------------ |
| `sort`   | `rank` \| `price` \| `recent` | `rank`       |
| `limit`  | number                        | 20 (max 100) |
| `cursor` | opaque string                 | none         |

## Combining examples

```bash theme={null}
# All MCP tools that summarize text, on mainnet, under 1 cent, sorted by price
curl "$FAC/discovery/search?q=summarize&type=mcp&network=stellar:pubnet&maxPrice=0.01&sort=price"

# All exact-scheme endpoints from a specific seller
curl "$FAC/discovery/resources?scheme=exact&payTo=GCKF...QMBA"
```

## Behavior notes

* Filters are validated. Unknown filters return `400 unknown_filter` rather than being silently ignored.
* Filters that reduce the result set to zero return `200` with an empty `results` array, not `404`.
