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

# SKILL

> Search and filter the yield opportunities enabled for a Yield.xyz project by network, token, provider, type, and reward rate. Use when the user wants to find, list, compare, or browse staking, lending, vault, restaking, RWA, or DeFi yields.

# Find yields

Query the yield catalog with `GET /v1/yields`. Results are scoped to the project that owns the API key: only yields enabled for that project are returned, so the catalog differs between projects.

## When to use

* Find or list yields (for example, "What yields are available for USDC on Base?")
* Filter by network, token, provider, or type
* Compare reward rates across protocols or networks
* Search for a yield by name or ID
* List the networks or providers available

## Authentication and host

Send the project API key in the `x-api-key` header. Keep it in an environment variable such as `YIELD_API_KEY`.

```
https://api.yield.xyz/v1
```

## Step 1: List yields

`GET /v1/yields`

| Parameter | Type | Description |
| - | - | - |
| `offset` | number | Pagination offset. Default `0`. |
| `limit` | number | Items per page, 1 to 100. Default `20`. |
| `network`, `networks` | string | One network ID, or a comma-separated list (`ethereum,base`). |
| `type`, `types` | string | Yield type or comma-separated list: `staking`, `liquid_staking`, `restaking`, `lending`, `vault`, `real_world_asset`, `concentrated_liquidity_pool`, `liquidity_pool`. |
| `token` | string | Token symbol or address. |
| `inputToken`, `inputTokens` | string | Accepted input token symbol or address, or a comma-separated list. |
| `provider`, `providers` | string | Provider ID, or a comma-separated list. |
| `yieldId`, `yieldIds` | string | One yield ID, or a comma-separated list. |
| `search` | string | Search by yield name. |
| `prime` | boolean | `true` returns only yields that meet the Prime quality criteria. |
| `hasCooldownPeriod`, `hasWarmupPeriod` | boolean | Filter by cooldown or warmup. |
| `sort` | string | `statusEnterAsc`, `statusEnterDesc`, `statusExitAsc`, `statusExitDesc`, `rewardRateAsc`, `rewardRateDesc`. |

```bash theme={null}
curl "https://api.yield.xyz/v1/yields?network=ethereum&types=staking,lending&sort=rewardRateDesc&limit=5" \
  -H "x-api-key: $YIELD_API_KEY"
```

The response is `{ items, total, offset, limit }`. An abbreviated item:

```json theme={null}
{
  "id": "ethereum-eth-lido-staking",
  "network": "ethereum",
  "token": { "symbol": "ETH", "name": "Ethereum", "decimals": 18, "network": "ethereum" },
  "outputToken": { "symbol": "stETH", "network": "ethereum" },
  "rewardRate": {
    "total": 2.8,
    "rateType": "APY",
    "components": [
      { "rate": 2.8, "rateType": "APY", "token": { "symbol": "ETH" }, "yieldSource": "liquid_staking" }
    ]
  },
  "status": { "enter": true, "exit": true },
  "metadata": { "name": "Lido ETH staking" },
  "mechanics": { "type": "liquid_staking" },
  "providerId": "lido"
}
```

Field notes:

* `rewardRate.total` is a percentage (`2.8` means 2.8%). `rateType` is `APR` or `APY`.
* `rewardRate.components[]` breaks the total down by source. Read reward and incentive tokens from `components[].token`, and the receipt token from `outputToken`.
* `status.enter` and `status.exit` say whether deposits and withdrawals are open.
* `mechanics.type` is the yield type.

## Step 2: Paginate

Increase `offset` by `limit` until `offset + limit >= total`.

## Step 3: List networks and providers

```bash theme={null}
curl "https://api.yield.xyz/v1/networks" -H "x-api-key: $YIELD_API_KEY"
curl "https://api.yield.xyz/v1/providers?limit=50" -H "x-api-key: $YIELD_API_KEY"
```

Use the network `id` and provider `id` values as filter inputs.

## Ranking pattern

For "best yields for ETH": query `token=ETH&sort=rewardRateDesc&limit=100`, then present the top items with yield ID, provider, `mechanics.type`, `rewardRate.total` with `rateType`, and network. Skip items where `status.enter` is `false` when the user wants to deposit.

## Errors

| Status | Meaning | Action |
| - | - | - |
| 400 | Invalid parameters | Check parameter names and values. |
| 401 | Missing or invalid API key | Check the `x-api-key` header. Do not retry with the same key. |
| 429 | Rate limited | Wait for `retry-after` seconds, then retry. |
| 500 | Server error | Retry with exponential backoff, up to 3 times. |

## Edge cases

* **Empty results:** `{ "items": [], "total": 0 }` means no enabled yield matches. Broaden the filters, or the yield may not be enabled for the project.
* **Yield IDs:** IDs look like `ethereum-eth-lido-staking`. Treat them as opaque and take them from the API.
* **Closed yields:** `status.enter: false` means no new deposits; exits may still be open.
* **Rates change:** Present rates as current, not fixed.


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