# DefiLlama Yields Scraper (`logiover/defillama-yields-scraper`) Actor

Scrape DeFi yield & APY pools from DefiLlama — APY, TVL, base/reward yield, 1d/7d/30d APY trend, impermanent-loss risk and volume for 20,000+ pools across every chain. Filter by chain, protocol, TVL and APY. Schedule it daily to track the best yields.

- **URL**: https://apify.com/logiover/defillama-yields-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** Business, Developer tools
- **Stats:** 790 total users, 32 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

## 💰 DefiLlama Yields Scraper — DeFi APY & TVL Pool Data Across All Chains

Scrape **DeFi yield and APY pools from DefiLlama**, the most trusted DeFi data source. This Apify Actor extracts APY, TVL, base and reward yield, multi-timeframe APY trends, impermanent-loss risk, and trading volume for **20,000+ yield pools** across Ethereum, Arbitrum, Solana, Base, and every other chain. No login, no API key, no blocking.

If you need bulk **DefiLlama yields data** or a continuously fresh DeFi APY feed you can export to JSON, CSV, or Excel, this Actor is built for scheduled, recurring use — APY and TVL move every day.

### ✨ What this Actor does / Key features

- **20,000+ yield pools** across all major chains in one run.
- **Full APY breakdown** — total APY, base APY, reward APY, and 30-day mean APY.
- **APY trend data** — 1d, 7d, and 30d APY change percentages so you can spot rising or fading pools.
- **TVL and volume** — total value locked plus 1-day and 7-day USD volume.
- **Risk signals** — stablecoin flag, impermanent-loss risk, and exposure type.
- **Reward token data** — the tokens each pool pays as incentives.
- **Powerful filters** — by chain, project/protocol, minimum TVL, APY range, and stablecoin-only.
- **Sort the output** — rank pools by TVL, total APY, base APY, reward APY, or 1d volume.
- **Built for scheduling** — run daily or hourly for an always-fresh yields dataset.

### 🔍 Input

| Field | Type | Description |
|---|---|---|
| `chains` | array | Filter to specific chains, e.g. `Ethereum`, `Arbitrum`, `Solana`, `Base`. Leave empty for all. |
| `projects` | array | Filter to specific protocols, e.g. `aave-v3`, `lido`, `uniswap-v3`. Leave empty for all. |
| `minTvlUsd` | integer | Drop pools below this TVL — filters out tiny/risky pools. Default `10000`. |
| `minApy` | integer | Only pools with APY at or above this percentage. `0` = no filter. |
| `maxApy` | integer | Only pools with APY at or below this percentage — filters out unrealistic/scam APYs. `0` = no filter. |
| `stablecoinOnly` | boolean | Only stablecoin pools (lower impermanent-loss risk). Default `false`. |
| `sortBy` | string (enum) | Rank pools by `tvlUsd`, `apy`, `apyBase`, `apyReward`, or `volumeUsd1d`. Default `tvlUsd`. |
| `maxPools` | integer | Maximum pools to save. `0` = all (20,000+ pools). |

### 🚀 Example input

```json
{
  "chains": ["Ethereum", "Arbitrum"],
  "projects": [],
  "minTvlUsd": 1000000,
  "minApy": 5,
  "maxApy": 100,
  "stablecoinOnly": true,
  "sortBy": "apy",
  "maxPools": 200
}
````

### 📦 Output

Each dataset item is one DeFi yield pool. Output fields:

| Field | Description |
|---|---|
| `poolId` | Unique DefiLlama pool identifier. |
| `project` | Protocol/project the pool belongs to (e.g. `aave-v3`). |
| `symbol` | Pool token symbol (e.g. `USDC` or `ETH-USDC`). |
| `chain` | Blockchain the pool is on. |
| `tvlUsd` | Total value locked in USD. |
| `apy` | Total annual percentage yield. |
| `apyBase` | Base APY from the underlying activity. |
| `apyReward` | Additional APY from reward token incentives. |
| `apyPct1D` | APY change over the last 1 day. |
| `apyPct7D` | APY change over the last 7 days. |
| `apyPct30D` | APY change over the last 30 days. |
| `apyMean30d` | Mean APY over the last 30 days. |
| `stablecoin` | Whether the pool is a stablecoin pool. |
| `ilRisk` | Impermanent-loss risk classification. |
| `exposure` | Exposure type (e.g. single or multi-token). |
| `rewardTokens` | Array of tokens paid as rewards. |
| `volumeUsd1d` / `volumeUsd7d` | 1-day and 7-day USD trading volume. |
| `poolMeta` | Extra pool metadata/description. |
| `url` | Link to the pool on DefiLlama. |
| `scrapedAt` | Timestamp of when the record was scraped. |

### 💡 Use cases

- **Yield farmers** — get a daily ranked feed of the best risk-adjusted APYs across chains and protocols.
- **DeFi dashboards & newsletters** — keep yield data continuously fresh and structured.
- **Research & analytics** — track APY and TVL trends across chains, protocols, and pool types.
- **Risk screening** — filter by impermanent-loss risk, stablecoin status, and realistic APY ranges.
- **Quant & strategy pipelines** — feed structured yield data into models and rebalancing tools.

### ❓ Frequently Asked Questions

**Do I need a DefiLlama API key or account?**
No. The Actor pulls from DefiLlama's public yields data and handles everything — you only need an Apify account.

**Is it legal to use this data?**
The Actor accesses publicly available DeFi data from DefiLlama. Use it in line with DefiLlama's terms of service.

**How many pools can I get in one run?**
Up to 20,000+ yield pools. Set `maxPools` to `0` for everything, or cap it for a smaller, faster run.

**Can I filter the results?**
Yes. Filter by chain, protocol, minimum TVL, APY range, and stablecoin-only, in any combination — useful for screening out tiny or unrealistic pools.

**Can I sort the output?**
Yes. Use `sortBy` to rank pools by TVL, total APY, base APY, reward APY, or 1-day volume.

**How fresh is the data?**
It reflects DefiLlama's latest yields data at run time. Schedule the Actor daily or hourly to keep a continuously updated feed.

**What output formats are supported?**
JSON, CSV, Excel (XLSX), HTML, and JSONLines, available through the Apify dataset and API.

### ⏰ Scheduling & integration

Schedule the Actor on Apify to run daily or hourly for a continuously updated DeFi yields dataset. Export to JSON, CSV, or Excel, call it from the Apify API, or push results into Google Sheets, databases, dashboards, or Slack with webhooks and no-code tools like Make and Zapier.

***

**Keywords:** defillama scraper, defillama yields scraper, defi apy scraper, defi yield data, defi tvl data, yield farming data, defi pool scraper, crypto yield aggregator data, defi analytics, defillama api

# Actor input Schema

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

Filter to specific chains, e.g. 'Ethereum', 'Arbitrum', 'Solana', 'Base'. Leave empty for all.

## `projects` (type: `array`):

Filter to specific protocols, e.g. 'aave-v3', 'lido', 'uniswap-v3'. Leave empty for all.

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

Drop pools below this TVL — filters out tiny/risky pools.

## `minApy` (type: `integer`):

Only pools with APY at or above this. 0 = no filter.

## `maxApy` (type: `integer`):

Only pools with APY at or below this — filters out unrealistic/scam APYs. 0 = no filter.

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

Only stablecoin pools (lower impermanent-loss risk).

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

Rank pools by this metric.

## `maxPools` (type: `integer`):

Maximum pools to save. 0 = all (20,000+ pools).

## Actor input object example

```json
{
  "chains": [],
  "projects": [],
  "minTvlUsd": 10000,
  "minApy": 0,
  "maxApy": 0,
  "stablecoinOnly": false,
  "sortBy": "tvlUsd"
}
```

# Actor output Schema

## `project` (type: `string`):

project

## `symbol` (type: `string`):

symbol

## `chain` (type: `string`):

chain

## `tvlUsd` (type: `string`):

tvlUsd

## `apy` (type: `string`):

apy

## `apyBase` (type: `string`):

apyBase

## `apyReward` (type: `string`):

apyReward

## `apyPct7D` (type: `string`):

apyPct7D

# 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": [],
    "projects": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/defillama-yields-scraper").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": [],
    "projects": [],
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/defillama-yields-scraper").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": [],
  "projects": []
}' |
apify call logiover/defillama-yields-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/defillama-yields-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DefiLlama Yields Scraper",
        "description": "Scrape DeFi yield & APY pools from DefiLlama — APY, TVL, base/reward yield, 1d/7d/30d APY trend, impermanent-loss risk and volume for 20,000+ pools across every chain. Filter by chain, protocol, TVL and APY. Schedule it daily to track the best yields.",
        "version": "1.0",
        "x-build-id": "coTvCulszXDGYxf1c"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~defillama-yields-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-defillama-yields-scraper",
                "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/logiover~defillama-yields-scraper/runs": {
            "post": {
                "operationId": "runs-sync-logiover-defillama-yields-scraper",
                "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/logiover~defillama-yields-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-defillama-yields-scraper",
                "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": "Chains",
                        "type": "array",
                        "description": "Filter to specific chains, e.g. 'Ethereum', 'Arbitrum', 'Solana', 'Base'. Leave empty for all.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "projects": {
                        "title": "Projects",
                        "type": "array",
                        "description": "Filter to specific protocols, e.g. 'aave-v3', 'lido', 'uniswap-v3'. Leave empty for all.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minTvlUsd": {
                        "title": "Minimum TVL (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop pools below this TVL — filters out tiny/risky pools.",
                        "default": 10000
                    },
                    "minApy": {
                        "title": "Minimum APY (%)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only pools with APY at or above this. 0 = no filter.",
                        "default": 0
                    },
                    "maxApy": {
                        "title": "Maximum APY (%)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only pools with APY at or below this — filters out unrealistic/scam APYs. 0 = no filter.",
                        "default": 0
                    },
                    "stablecoinOnly": {
                        "title": "Stablecoin Pools Only",
                        "type": "boolean",
                        "description": "Only stablecoin pools (lower impermanent-loss risk).",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "tvlUsd",
                            "apy",
                            "apyBase",
                            "apyReward",
                            "volumeUsd1d"
                        ],
                        "type": "string",
                        "description": "Rank pools by this metric.",
                        "default": "tvlUsd"
                    },
                    "maxPools": {
                        "title": "Max Pools",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum pools to save. 0 = all (20,000+ pools)."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
