Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

DeFiLlama Yield Scanner — Best DeFi APY & Yield Farming Pools

▶️ Run on Apify Apify Actor License: MIT

▶️ Run the DeFiLlama Yield Scanner on Apify →

Scan 15,000+ DeFi yield pools by APY, TVL and risk across every chain. The DeFiLlama Yield Scanner finds the best DeFi yields, top yield farming opportunities, and the highest-APY stablecoin pools on Ethereum, Solana, Base, Arbitrum, Polygon, BSC and 30+ other blockchains — with no API key, no account wiring, and no rate-limit babysitting. Point it at a chain, a protocol, a minimum APY or a TVL floor and get a clean, structured dataset of live yield pools you can export to JSON, CSV or Excel in seconds.

Whether you are hunting risk-adjusted DeFi allocation, comparing APY across protocols, monitoring a DeFi portfolio, or building a yield aggregator, this scanner turns the entire DeFi yield universe into one queryable dataset.

This repository is documentation only. The scanner runs as a hosted Actor on Apify — you do not need to install or host anything. Click Run on Apify to start.


Table of contents


What you get

Every run returns a structured dataset of DeFi yield pools. Each pool item includes:

  • APY breakdown — total apy, apyBase (protocol yield), and apyReward (incentive-token yield), so you can tell real yield from farmed emissions.
  • APY trend dataapyMean30d, apyBase7d, plus 1D / 7D / 30D change fields (apyPct1D, apyPct7D, apyPct30D) to spot rising or decaying yields.
  • TVL in USD (tvlUsd) — filter out dust pools and rank by liquidity depth.
  • Risk flagsstablecoin, ilRisk (impermanent-loss risk), exposure (single vs multi asset), and an outlier flag for statistically suspicious APYs.
  • APY outlook — DeFiLlama's ML prediction (predictedClass + predictedProbability) for where the yield is likely heading.
  • Token metadataunderlyingTokens and rewardTokens contract addresses.
  • Identity & contextproject, symbol, chain, poolMeta, a direct DeFiLlama url, and a fetchedAt timestamp.

Filter by chain, protocol, minimum/maximum APY, TVL floor, stablecoin-only or no-IL-risk, then sort by TVL, APY, base APY, reward APY, or an overall safest score.


Use cases

  • Yield farming scanner — surface the highest-APY farming pools on any chain, then filter out low-TVL or reward-only traps.
  • APY comparison — compare yields for the same asset (e.g. USDC, ETH, WBTC) across Aave, Compound, Morpho, Pendle, Curve and more.
  • Highest-APY stablecoin yields — flip on stablecoin-only mode to find the best low-price-risk yields for idle stables.
  • Risk-adjusted allocation — combine tvlUsd, ilRisk, stablecoin and exposure to build a risk-weighted yield portfolio.
  • DeFi research & dashboards — pull the whole yield universe into a spreadsheet, BI tool, or notebook for analysis.
  • Portfolio monitoring — schedule daily runs to track APY drift and TVL changes for the protocols you hold.
  • Product & alerting — feed a yield aggregator, a Discord/Telegram alert bot, or a "best yields today" newsletter.

Quick start (4 ways)

You can run the scanner from the Apify Console (no code), the Apify CLI, a plain HTTP request, or the official JavaScript / Python clients. All inputs are optional — an empty input returns 1,000+ pools sorted by TVL.

1. Apify Console (try for free, no code)

  1. Open the DeFiLlama Yield Scanner on Apify.
  2. Click Try for free.
  3. Leave the input empty and press Start — you'll get 1,000+ live pools ranked by TVL.
  4. Or set a filter (e.g. Stablecoin pools only + Minimum APY = 8) and run again.
  5. Download the results as JSON, CSV, or Excel from the Storage tab.

2. Apify CLI

# Install & log in once
npm install -g apify-cli
apify login

# Run with default input (1,000+ pools by TVL)
apify call logiover/defillama-yield-scanner

# Run with a custom input file
apify call logiover/defillama-yield-scanner --input-file=./input.json

Example input.json — best stablecoin yields on Ethereum & Base with at least $1M TVL:

{
  "chains": ["Ethereum", "Base"],
  "stablecoinOnly": true,
  "minApy": 6,
  "minTvlUsd": 1000000,
  "sort": "apy",
  "maxResults": 200
}

3. API / curl (run-sync-get-dataset-items)

Run the Actor and get the dataset items back in a single synchronous request. Replace <YOUR_APIFY_TOKEN> with your token from Apify → Settings → Integrations.

curl -X POST \
  "https://api.apify.com/v2/acts/logiover~defillama-yield-scanner/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
        "chains": ["Arbitrum"],
        "minApy": 10,
        "minTvlUsd": 500000,
        "sort": "apy",
        "maxResults": 100
      }'

The response is a JSON array of pool items — pipe it straight into jq, a file, or your app.

4. apify-client (JavaScript & Python)

JavaScript / Node.js

npm install apify-client
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('logiover/defillama-yield-scanner').call({
  chains: ['Ethereum', 'Solana'],
  minApy: 8,
  minTvlUsd: 1_000_000,
  sort: 'apy',
  maxResults: 250,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} pools`);
console.table(items.slice(0, 10).map(p => ({
  project: p.project, symbol: p.symbol, chain: p.chain,
  apy: p.apy, tvlUsd: p.tvlUsd,
})));

Python

pip install apify-client
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("logiover/defillama-yield-scanner").call(run_input={
    "stablecoinOnly": True,
    "minApy": 6,
    "minTvlUsd": 1_000_000,
    "sort": "apy",
    "maxResults": 200,
})

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Got {len(items)} stablecoin pools")
for p in items[:10]:
    print(p["project"], p["symbol"], p["chain"], p["apy"], p["tvlUsd"])

More client examples: examples/cli.md, examples/api-curl.md, examples/javascript.md, examples/python.md.


Input

Every field is optional. Send an empty object {} to scan all chains and get 1,000+ pools sorted by TVL.

Field Type Default Description
chains array of strings [] (all) Restrict to one or more blockchains (multi-select). Use "All" or leave empty to scan every chain. Supports Ethereum, Solana, Base, Arbitrum, Polygon, BSC, OP Mainnet, Avalanche, Sui, TON, Berachain, and 30+ more.
projects array of strings Filter to specific protocols by name (partial, case-insensitive) — e.g. aave, uniswap, curve, lido, pendle, morpho, compound.
minApy integer Only include pools with total APY ≥ this value (%).
maxApy integer Cap total APY at this value (%) — useful to hide unrealistic/degen outliers (e.g. 200).
minTvlUsd integer 10000 Only include pools with TVL ≥ this many USD. Set 0 to include dust pools.
stablecoinOnly boolean false Only return pools flagged as stablecoin pools (lower price risk).
noIlRisk boolean false Only return pools with no impermanent-loss risk (single-asset staking / lending style).
sort string tvl Order results before the maxResults cap: tvl, apy, apyBase, apyReward, or safest.
maxResults integer 1000 Max pools to return. Raise up to ~15,000 to pull every matching pool.
proxyConfiguration object auto Apify proxy settings. Defaults to automatic; the scanner also works without a proxy.

Output

Results are written to the run's default dataset — one object per yield pool. Fields:

Field Type Description
pool string DeFiLlama unique pool identifier (UUID).
project string Protocol running the pool (e.g. aave-v3, lido, pendle).
symbol string Pool token symbol (e.g. USDC, WEETH, WBTC-USDC).
chain string Blockchain the pool lives on.
tvlUsd number Total value locked in the pool, in USD.
apy number Total annual percentage yield (base + rewards).
apyBase number Base APY from the protocol, excluding reward tokens.
apyReward number APY contributed by incentive / reward tokens.
apyMean30d number Mean total APY over the last 30 days.
apyBase7d number Base APY averaged over the last 7 days.
apyPct1D number Change in APY over the last 24 hours (percentage points).
apyPct7D number Change in APY over the last 7 days (percentage points).
apyPct30D number Change in APY over the last 30 days (percentage points).
rewardTokens array Contract addresses of incentive/reward tokens (empty if none).
underlyingTokens array Contract addresses of the pool's underlying assets.
stablecoin boolean True when the pool is a stablecoin pool (lower price risk).
ilRisk string Impermanent-loss risk flag: no or yes.
exposure string Asset exposure: single or multi.
predictedClass string DeFiLlama ML APY outlook: Stable/Up or Down (null if none).
predictedProbability number Confidence of the predicted class, 0–100.
poolMeta string Extra pool descriptor (e.g. lockup period, tranche).
count number Number of historical data points DeFiLlama has for the pool.
outlier boolean True when DeFiLlama flags the pool's APY as a statistical outlier.
url string DeFiLlama pool page URL.
fetchedAt string When this row was scraped (ISO 8601).

Sample output

A single pool item looks like this:

{
  "pool": "747c1d2a-c668-4682-b9f9-296708a3dd90",
  "project": "aave-v3",
  "symbol": "USDC",
  "chain": "Ethereum",
  "tvlUsd": 486203914,
  "apy": 7.42,
  "apyBase": 5.13,
  "apyReward": 2.29,
  "apyMean30d": 6.88,
  "apyBase7d": 4.97,
  "apyPct1D": 0.12,
  "apyPct7D": -0.34,
  "apyPct30D": 1.05,
  "rewardTokens": ["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],
  "underlyingTokens": ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],
  "stablecoin": true,
  "ilRisk": "no",
  "exposure": "single",
  "predictedClass": "Stable/Up",
  "predictedProbability": 71,
  "poolMeta": null,
  "count": 812,
  "outlier": false,
  "url": "https://defillama.com/yields/pool/747c1d2a-c668-4682-b9f9-296708a3dd90",
  "fetchedAt": "2026-07-13T09:14:52.301Z"
}

Integrations & automation

Because it runs on the Apify platform, the DeFiLlama Yield Scanner plugs into your stack without glue code:

  • Schedules — run it hourly/daily and keep a fresh yield dataset without lifting a finger.
  • Webhooks — trigger a downstream service when a run finishes (e.g. post "top 10 yields today" to Slack/Discord/Telegram).
  • Zapier, Make & n8n — connect to 6,000+ apps via Apify's integrations; push new pools to Google Sheets, Airtable, Notion, or a database.
  • API access — start runs and pull the dataset from any language over plain HTTP; use run-sync-get-dataset-items for one-shot queries.
  • apify-client — official JavaScript and Python SDKs for tight app integration.
  • Storage & retention — every run's dataset is stored on Apify and downloadable any time.

See the Apify integrations docs for the full list.


Export formats

Download or fetch results in any of these formats — from the Console Storage tab or the Dataset API:

  • JSON / JSONL (newline-delimited)
  • CSV
  • Excel (XLSX)
  • HTML table
  • RSS / XML

Example — grab the latest run's dataset as CSV:

curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=csv&token=<YOUR_APIFY_TOKEN>" -o yields.csv

FAQ

What are the best DeFi yields right now?

The "best" yield depends on your risk tolerance. Sort by apy for raw yield, but always check tvlUsd (depth), apyReward vs apyBase (is the yield real or just token emissions?), and ilRisk. This scanner returns all of those fields so you can rank pools by risk-adjusted yield, not just headline APY. Use sort: "safest" to prioritize low-IL, stablecoin, high-TVL pools.

How do I find the highest-APY stablecoin yields?

Set stablecoinOnly: true and sort: "apy", optionally with a minTvlUsd floor (e.g. 1000000) to skip thin pools. You'll get the top stablecoin yield pools (USDC, USDT, DAI, USDe, and more) across every chain, each flagged with stablecoin: true and its impermanent-loss risk.

Is this a yield farming scanner?

Yes. It scans 15,000+ yield farming and lending pools across 30+ chains and 400+ protocols. Filter by chains, projects, minApy, and TVL to surface exactly the farming opportunities you care about, and use the apyReward field to see how much of the yield comes from farmed incentive tokens.

Does this use the DeFiLlama API? Do I need a DeFiLlama API key?

The scanner sources public DeFiLlama yields data, and you do not need a DeFiLlama API key — or any API key from DeFiLlama — to use it. Everything is handled inside the hosted Actor. You only need an Apify token to run it programmatically (free to create).

Do I need an API key to run the scanner?

No third-party API key is required. To run it from code (CLI, curl, or the SDKs) you use your own Apify API token, which you can create for free at Apify → Integrations. To run it in the Console you just click Try for free — no key at all.

Which blockchains are supported?

40+, including Ethereum, Solana, Base, Arbitrum, Polygon, BSC, OP Mainnet, Avalanche, Sui, TON, Starknet, Berachain, Aptos, Cardano, Linea, Mantle, Sei, ZKsync Era, Scroll, Blast, Bitcoin, Injective, Thorchain and more. Leave chains empty to scan all of them at once.

How many pools can I get in one run?

Up to roughly 15,000 matching pools per run. The default maxResults is 1000; raise it to pull the full yield universe. Results are ordered by your sort choice before the cap is applied, so the most relevant pools come first.

How fresh is the yield data?

Data reflects DeFiLlama's current yields snapshot at the moment of the run, with a fetchedAt timestamp on every row. Schedule the Actor hourly or daily to keep a continuously updated dataset for dashboards and alerts.

Can I compare APY for one asset across protocols?

Yes — set projects to the protocols you want (e.g. ["aave", "compound", "morpho"]) or filter by symbol after export. Each pool carries project, symbol, chain, and the full APY breakdown so an APY comparison across protocols is a one-line group-by.

How do I export the results to CSV or Excel?

From the Console, open the run's Storage tab and choose CSV or Excel. Programmatically, hit the Dataset API with ?format=csv or ?format=xlsx (see Export formats).

How much does it cost?

Pricing is shown on the Actor's Apify page. You can try it for free, and the DeFiLlama data source needs no paid API key, so there are no third-party data fees.


Related actors

  • DeFiLlama Scraper — protocols, TVL, chains, stablecoins, fees & revenue from DeFiLlama.
  • CoinGecko Scraper — token prices, market caps, volume and market data across thousands of coins.

Disclaimer: This repository is documentation only and does not contain the Actor's source code or any scraping logic. It exists to help you discover and use the hosted scanner. "DeFiLlama" is a trademark of its respective owner; this project is an independent tool and is not affiliated with or endorsed by DeFiLlama. Data is provided as-is for research and informational purposes and is not financial advice — always do your own research before allocating capital.

▶️ Run the DeFiLlama Yield Scanner on Apify →

About

Scan 15,000+ DeFi yield pools by APY, TVL & risk across every chain. Best yield farming & stablecoin yields. No API key.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors