# DefiLlama Scraper: TVL, Yields, Stables & DEXs (`punkrecordsdata/defillama-tvl-scraper`) Actor

Scrape DefiLlama DeFi data: protocol TVL with history, chain TVL, stablecoin market caps, 17K+ yield pools with APY and DEX volumes. Export to CSV, Excel, JSON or XML.

- **URL**: https://apify.com/punkrecordsdata/defillama-tvl-scraper.md
- **Developed by:** [PunkRecordsData](https://apify.com/punkrecordsdata) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.19 / 1,000 protocol records

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<p align="center">
  <img src="https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=2" alt="PunkRecordsData" width="100%" />
</p>

## 🦙 DefiLlama Scraper - DeFi TVL, Yields, Stablecoins & DEX Volumes - PunkRecordsData

> 🚀 **Export DeFi data in seconds.** Six DefiLlama surfaces in one actor: 8,395 protocols with TVL and 1d/7d changes, daily TVL history per protocol (365 points per row), TVL for 467 chains, 427 stablecoins with peg data, 17,000+ yield pools with APY, and per-DEX trading volumes. Aave V3 comes back at $18.2B TVL with a full year of history. Export to CSV, Excel, JSON or XML.

The DefiLlama TVL Scraper reads the open DefiLlama APIs, the industry's reference source for DeFi metrics, and turns them into filtered, sorted datasets: by name, by chain, by minimum TVL. Every number is exactly what defillama.com shows, with protocol logos included for presentation-ready tables.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Crypto funds and analysts | Screen protocols by TVL, momentum and category |
| DeFi teams | Track competitors' TVL and your own chain footprint |
| Yield strategists | Filter 17K pools by APY, TVL floor and chain |
| Researchers and journalists | Reproducible DeFi market datasets with history |

### 📋 What the DefiLlama Scraper does

- **Protocol records**: name, logo, category, chains, TVL, 1d/7d change, market cap, audit flag and site URL.
- **TVL history**: up to 365 daily points per protocol in one row, ready for charting.
- **Chain TVL records**: total value locked per blockchain (467 chains).
- **Stablecoin records**: market cap, peg type and mechanism, live price, chains.
- **Yield pool records**: project, chain, symbol, APY (base + reward split), TVL, stablecoin and IL-risk flags.
- **DEX volume records**: 24h and 7d volume with 7d change per exchange.
- **Filters**: name terms, exact chain, minimum TVL, per-surface caps.

> 💡 **Why it matters:** DeFi due diligence spans TVL, momentum, yields and volumes at once. The site shows them in six different tabs; this actor delivers them as one filtered dataset.

### 📊 Output of the DeFi data search

Real samples from a live run:

```json
{
  "recordType": "protocol",
  "imageUrl": "https://icons.llama.fi/aave-v3.png",
  "name": "Aave V3",
  "category": "Lending",
  "chains": ["Ethereum", "Arbitrum", "Avalanche"],
  "tvlUsd": 18195552899.97,
  "change7d": -1.43,
  "audits": "Yes",
  "error": null
}
```

```json
{
  "recordType": "tvl-history",
  "slug": "aave-v3",
  "points": 365,
  "firstDate": "2025-09-29",
  "lastDate": "2026-09-28",
  "latestTvlUsd": 18188166458,
  "series": [{ "date": "2025-09-29", "tvlUsd": 15102938211 }],
  "error": null
}
```

### ✨ Why choose this DefiLlama scraper

- **6 billable data events**, the widest measured surface in the niche (best alternative: 4), each one switchable.
- **A year of TVL history per protocol in one row**, no per-day pagination.
- **APY split into base and reward**, plus stablecoin and IL-risk flags per pool.
- **TVL floor, chain and name filters server-side of your spreadsheet**, so exports arrive pre-screened.
- **Protocol logos as an image column**, presentation-ready in the dataset view.

### 📈 How this DefiLlama scraper compares to alternatives

Measured against the DefiLlama actors on the Apify Store (September 2026):

| | This actor | Best alternative | Other DefiLlama actors |
|---|---|---|---|
| Billable data events | 6 | 4 | 1 |
| TVL history series | Yes, 365 points/row | No | No |
| Stablecoins + DEX volumes | Yes | Partial | No |
| Chain / min-TVL filters | Yes | Partial | No |
| Price per 1,000 protocols | $3.20 | $3.00 | $0.20 |

### 🚀 How to use the DefiLlama TVL Scraper

1. Create a free Apify account (with $5 of credit) at console.apify.com.
2. Open this actor's page and click **Try for free**.
3. Optionally type name filters (aave, uniswap, usdc), a chain and a TVL floor.
4. Toggle the surfaces you need: protocols, history, chains, stablecoins, yields, DEXs.
5. Click **Start** and download CSV, Excel, JSON or XML.

### 💼 Business use cases

#### Protocol due diligence

TVL, momentum, audits flag and a year of history for every lending protocol above $100M, one run.

#### Yield screening

All stablecoin pools above your TVL floor on your chains, sorted by APY with base/reward split.

#### Market reports

Weekly chain and DEX volume snapshots straight into your BI tool.

#### Competitive monitoring

Your protocol vs your rivals' TVL trajectory, diffed daily by scheduler.

### 🔌 Automating the DefiLlama Scraper

Connect to **Make**, **Zapier**, **Slack**, **Airbyte**, **GitHub** or **Google Drive**: TVL-drop alerts, weekly yield digests, or warehouse syncs for dashboards.

### 🌟 Beyond business use cases

- **Research:** DeFi market-structure studies with clean panel data.
- **Personal:** track the protocols where you have funds parked.
- **Non-profit:** transparency reporting on on-chain finance.
- **Experimentation:** a structured playground over the open DefiLlama APIs.

### 🤖 Ask an AI assistant about this scraper

> "I need DeFi protocols above $50M TVL on Ethereum with 7-day change and a year of TVL history, plus their best stablecoin yields, as CSV. Would the DefiLlama Scraper on Apify (apify.com/punkrecordsdata/defillama-tvl-scraper) cover it?"

### ❓ Frequently Asked Questions

#### 🦙 How do I export DefiLlama TVL data to CSV or Excel?

Set your filters, toggle the surfaces, click Start and download from the Storage tab.

#### 📈 Can I get historical TVL for a protocol?

Yes, the history module returns up to 365 daily points per protocol in a single row's series array.

#### 💵 How are yield pool APYs reported?

Total APY plus the base/reward split, with TVL, stablecoin flag and IL risk per pool, exactly as DefiLlama publishes them.

#### ⛓ Can I filter by blockchain?

Yes, the chain filter applies to protocols, yield pools and DEXs.

#### 🪙 Does it include stablecoin data?

Yes: market cap, peg type (USD, EUR...), peg mechanism and live price for 427 stablecoins.

#### 📊 What DEX volume data is available?

24h and 7d volumes with 7d change per exchange, from DefiLlama's DEX overview.

#### 💰 What does the minimum TVL filter do?

Skips protocols/pools below your USD floor before they ever reach the dataset, so you pay only for relevant rows.

#### 💵 Do I pay for surfaces I switch off?

No. Each surface is a separate event billed per delivered row.

#### 📦 How many records can one run return?

Up to 1,000,000 on paid plans, with a per-surface cap you control. Free users get a 10-record preview.

#### ⚙️ Does it need an API key?

No, DefiLlama's APIs are open.

#### 🕒 How fresh is the data?

Live at run time, the same numbers defillama.com renders.

### 🔌 Integrate with any app

Datasets are available via the Apify API in JSON, CSV, Excel or XML, with webhooks, ready for Python, Sheets, Dune-style dashboards or BI tools.

### 🔗 Recommended Actors

- [Prediction Markets Scraper](https://apify.com/punkrecordsdata/prediction-markets-scraper) - Kalshi and Polymarket odds, another live-market feed
- [Steam Games Player Stats](https://apify.com/punkrecordsdata/steam-games-player-stats) - live-API product analytics
- [SEC EDGAR Filings Scraper](https://apify.com/punkrecordsdata/sec-edgar-filings-scraper) - the TradFi disclosure side
- [Hugging Face Scraper](https://apify.com/punkrecordsdata/huggingface-hub-scraper) - AI model ecosystem data

> 💡 **Pro Tip:** browse the complete [PunkRecordsData collection](https://apify.com/punkrecordsdata) for more data tools.

**🆘 Need Help?** contact.punkrecordsdata@gmail.com

> **⚠️ Disclaimer:** independent tool, not affiliated with DefiLlama; only publicly available data. Not financial advice.

# Actor input Schema

## `searchTerms` (type: `array`):

Only records whose name/project/symbol contains one of these terms (e.g. aave, uniswap, usdc). Leave empty for the top records by TVL.

## `chainFilter` (type: `string`):

Only protocols/pools on this chain (e.g. Ethereum, Solana, Arbitrum).

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

Skip protocols/pools below this TVL.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `maxItemsPerSurface` (type: `integer`):

Cap per data surface so one huge surface does not eat the whole run.

## `includeProtocols` (type: `boolean`):

All DeFi protocols with TVL, chain, category, 1d/7d change and market cap.

## `includeChains` (type: `boolean`):

TVL per blockchain (467 chains).

## `includeStablecoins` (type: `boolean`):

Stablecoin market caps, peg type and current price.

## `includeYields` (type: `boolean`):

17,000+ pools with APY, TVL, project and chain.

## `includeDexVolumes` (type: `boolean`):

Per-DEX 24h/7d trading volumes.

## `includeTvlHistory` (type: `boolean`):

Daily TVL time series for each matched protocol (up to 365 most recent points, in one row). Billed per protocol.

## Actor input object example

```json
{
  "searchTerms": [],
  "minTvlUsd": 0,
  "maxItems": 10,
  "maxItemsPerSurface": 100,
  "includeProtocols": true,
  "includeChains": false,
  "includeStablecoins": false,
  "includeYields": false,
  "includeDexVolumes": false,
  "includeTvlHistory": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per record

## `fullData` (type: `string`):

Complete dataset with all fields

# 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 = {
    "searchTerms": [],
    "chainFilter": "",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("punkrecordsdata/defillama-tvl-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 = {
    "searchTerms": [],
    "chainFilter": "",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("punkrecordsdata/defillama-tvl-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchTerms": [],
  "chainFilter": "",
  "maxItems": 10
}' |
apify call punkrecordsdata/defillama-tvl-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,punkrecordsdata/defillama-tvl-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/bkPbznAfMbqh7Zhrp/builds/Ofq8GPMYAQ6HHLm5N/openapi.json
