# DeFi Yield APY Scanner (`gochujang/defi-yield-scanner`) Actor

Find the best DeFi yield opportunities across 500+ chains and 1000+ protocols. Filter by APY, TVL, chain, and asset type. Powered by DefiLlama — no API key required.

- **URL**: https://apify.com/gochujang/defi-yield-scanner.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## DeFi Yield APY Scanner

> Find the best DeFi yield opportunities across **500+ chains and 1000+ protocols** — filter by APY, TVL, chain, and risk level. Powered by DefiLlama. No API key required.

---

### What It Does

Scans 17,000+ DeFi yield pools from DefiLlama and returns ranked results based on your filters. Use it to:

- Find the highest safe APY for stablecoins
- Compare yields across chains (Ethereum, Base, Arbitrum, Solana, etc.)
- Monitor protocol-specific pools (Aave, Uniswap, Lido, Compound, etc.)
- Filter out impermanent loss risk for single-asset strategies
- Get 30-day average APY to avoid temporary spikes

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `chains` | string[] | `[]` | Filter by chain name (e.g. `Ethereum`, `Base`, `Arbitrum`). Empty = all chains |
| `protocols` | string[] | `[]` | Filter by protocol (e.g. `aave`, `lido`). Empty = all protocols |
| `minApy` | number | `3` | Minimum APY % |
| `maxApy` | number | `200` | Maximum APY % (set 0 for no cap) |
| `minTvlUsd` | number | `1000000` | Minimum TVL in USD |
| `stablecoinOnly` | boolean | `false` | Only return stablecoin pools |
| `noIlRisk` | boolean | `false` | Exclude pools with impermanent loss risk |
| `sortBy` | string | `"apy"` | `apy`, `tvl`, or `apy_30d_mean` |
| `limit` | integer | `100` | Max results to return (up to 5000) |

#### Example: Best stablecoin yields on Ethereum/Base
```json
{
  "chains": ["Ethereum", "Base"],
  "minApy": 5,
  "maxApy": 50,
  "minTvlUsd": 5000000,
  "stablecoinOnly": true,
  "noIlRisk": true,
  "sortBy": "apy",
  "limit": 20
}
````

#### Example: Top TVL pools across all chains

```json
{
  "minApy": 1,
  "minTvlUsd": 100000000,
  "sortBy": "tvl",
  "limit": 50
}
```

#### Example: Monitor specific protocol

```json
{
  "protocols": ["aave", "compound"],
  "minApy": 2,
  "sortBy": "apy_30d_mean"
}
```

***

### Output

Each record represents one yield pool:

```json
{
  "rank": 1,
  "pool_id": "747c1d2a-c668-4682-b9f9-296708a3dd90",
  "project": "aave-v3",
  "chain": "Ethereum",
  "symbol": "USDC",
  "apy": 8.42,
  "apy_base": 5.21,
  "apy_reward": 3.21,
  "apy_7d_change": -0.3,
  "apy_30d_change": 1.2,
  "apy_30d_mean": 7.85,
  "tvl_usd": 842000000,
  "stablecoin": true,
  "il_risk": "no",
  "exposure": "single",
  "underlying_tokens": ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],
  "reward_tokens": ["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],
  "volume_1d_usd": 12400000,
  "defillama_url": "https://defillama.com/yields/pool/747c1d2a-..."
}
```

| Field | Description |
|-------|-------------|
| `apy` | Current APY (base + reward) |
| `apy_base` | Base APY from protocol fees |
| `apy_reward` | Additional reward token APY |
| `apy_30d_mean` | 30-day average APY (more reliable than spot) |
| `il_risk` | `"no"` = no IL risk, `"yes"` = LP position with IL |
| `stablecoin` | True if underlying asset is a stablecoin |
| `exposure` | `"single"` = one asset, `"multi"` = LP pair |

***

### Pricing

Pay-Per-Event (PPE):

- **$0.001 per pool returned**

Examples:

- Top 100 stablecoin pools: **$0.10**
- Full scan 5,000 pools: **$5.00**

***

### Use Cases

**Yield optimization bot** — Run daily to find the best APY and auto-rebalance positions:

```bash
curl -X POST "https://api.apify.com/v2/acts/gochujang~defi-yield-scanner/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"stablecoinOnly": true, "minApy": 5, "noIlRisk": true, "limit": 10}'
```

**Alert system** — Monitor if your protocol's APY drops below threshold:

```bash
## Get current APY for Aave USDC on Ethereum
curl "https://api.apify.com/v2/datasets/{DATASET_ID}/items?token=YOUR_TOKEN" \
  | jq '[.[] | select(.project == "aave-v3" and .chain == "Ethereum" and (.symbol | contains("USDC")))]'
```

***

### Data Source

All data comes from [DefiLlama](https://defillama.com/yields) — the most comprehensive DeFi analytics platform, tracking 7,000+ protocols across 500+ chains. Data is updated hourly.

- No API key required
- No rate limits
- 17,000+ pools covered

# Actor input Schema

## `chains` (type: `array`):

Filter by chain. Leave empty for all chains.

## `protocols` (type: `array`):

Filter by protocol name (e.g. aave, uniswap, lido). Leave empty for all.

## `minApy` (type: `number`):

Only return pools with APY above this value

## `maxApy` (type: `number`):

Cap APY to filter out suspicious high-yield traps. Set 0 for no cap.

## `minTvlUsd` (type: `integer`):

Only return pools with TVL above this value

## `stablecoinOnly` (type: `boolean`):

Only return pools where the underlying asset is a stablecoin

## `noIlRisk` (type: `boolean`):

Only return single-asset staking / lending pools (no LP positions)

## `sortBy` (type: `string`):

Ranking criterion

## `limit` (type: `integer`):

Maximum number of pools to return

## Actor input object example

```json
{
  "chains": [
    "Ethereum",
    "Base",
    "Arbitrum",
    "Solana"
  ],
  "protocols": [],
  "minApy": 3,
  "maxApy": 200,
  "minTvlUsd": 1000000,
  "stablecoinOnly": false,
  "noIlRisk": false,
  "sortBy": "apy",
  "limit": 100
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "chains": [
        "Ethereum",
        "Base",
        "Arbitrum",
        "Solana"
    ],
    "protocols": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/defi-yield-scanner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "chains": [
        "Ethereum",
        "Base",
        "Arbitrum",
        "Solana",
    ],
    "protocols": [],
}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/defi-yield-scanner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "chains": [
    "Ethereum",
    "Base",
    "Arbitrum",
    "Solana"
  ],
  "protocols": []
}' |
apify call gochujang/defi-yield-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gochujang/defi-yield-scanner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DeFi Yield APY Scanner",
        "description": "Find the best DeFi yield opportunities across 500+ chains and 1000+ protocols. Filter by APY, TVL, chain, and asset type. Powered by DefiLlama — no API key required.",
        "version": "0.1",
        "x-build-id": "v6HKv17Mo2yXciKqR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gochujang~defi-yield-scanner/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gochujang-defi-yield-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gochujang~defi-yield-scanner/runs": {
            "post": {
                "operationId": "runs-sync-gochujang-defi-yield-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gochujang~defi-yield-scanner/run-sync": {
            "post": {
                "operationId": "run-sync-gochujang-defi-yield-scanner",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "chains": {
                        "title": "Blockchains",
                        "type": "array",
                        "description": "Filter by chain. Leave empty for all chains.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "protocols": {
                        "title": "Protocols (optional)",
                        "type": "array",
                        "description": "Filter by protocol name (e.g. aave, uniswap, lido). Leave empty for all.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minApy": {
                        "title": "Minimum APY (%)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only return pools with APY above this value",
                        "default": 3
                    },
                    "maxApy": {
                        "title": "Maximum APY (%)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Cap APY to filter out suspicious high-yield traps. Set 0 for no cap.",
                        "default": 200
                    },
                    "minTvlUsd": {
                        "title": "Minimum TVL (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return pools with TVL above this value",
                        "default": 1000000
                    },
                    "stablecoinOnly": {
                        "title": "Stablecoin pools only",
                        "type": "boolean",
                        "description": "Only return pools where the underlying asset is a stablecoin",
                        "default": false
                    },
                    "noIlRisk": {
                        "title": "Exclude impermanent loss risk",
                        "type": "boolean",
                        "description": "Only return single-asset staking / lending pools (no LP positions)",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "apy",
                            "tvl",
                            "apy_30d_mean"
                        ],
                        "type": "string",
                        "description": "Ranking criterion",
                        "default": "apy"
                    },
                    "limit": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of pools to return",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
