# DefiLlama DeFi Protocol Scraper (`parseforge/defillama-scraper`) Actor

Scrape DeFi protocol analytics from DefiLlama. Get total value locked (TVL), yields, stablecoins, and chain data for 4,000+ protocols. Track TVL changes across timeframes, chain breakdowns, market cap, and protocol categories across 570+ blockchains.

- **URL**: https://apify.com/parseforge/defillama-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.95 / 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

![ParseForge Banner](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)

## 🔗 DefiLlama DeFi Protocol Scraper

> 🚀 Pull TVL, yields, stablecoin supply, and chain analytics for 4,000+ DeFi protocols from DefiLlama. Structured data ready for dashboards and analysis in seconds.

<table><tr>
<td style="border-left:4px solid #0F766E;padding:12px 16px;font-weight:600">Pull structured records from DefiLlama DeFi Protocol — clean fields ready as CSV, JSON, JSONL, Excel, or XML for downstream pipelines.</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
parseforge/defillama-scraper on Apify. Call: ApifyClient("TOKEN").actor("parseforge/defillama-scraper").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: maxItems (integer, default 10), endpoint (string, default "protocols"), protocol (string). Full actor spec: fetch build via GET https://api.apify.com/v2/acts/parseforge~defillama-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations
```

DefiLlama Scraper collects decentralized finance data covering protocols, chains, stablecoins, yield farming pools, and historical TVL trends. Each protocol record includes the name, symbol, category, total value locked, 1h/1d/7d TVL changes, supported chains, market cap, and URL. You can also pull yield data with APY rates across pools, stablecoin circulating supply and peg status, or chain-level TVL rankings for 570+ blockchain networks.

DeFi researchers use this to track protocol dominance and TVL flows. Investors compare yield opportunities across chains and pools. Developers feed the data into analytics dashboards. Analysts monitor stablecoin supply distribution and chain adoption trends. If you need structured DeFi market data without building API integrations, this actor delivers it in a single run.

| Target | DefiLlama (4,000+ DeFi protocols) |
|--------|-------------------------------|
| Use Cases | DeFi research, TVL tracking, yield comparison, stablecoin monitoring |

### 📋 What it does

- 📊 **Protocol data.** 4,000+ DeFi protocols with TVL, category, chain breakdown, and change metrics.
- 💰 **Yield farming.** APY data across farming pools, protocols, and chains.
- 🪙 **Stablecoin analytics.** Circulating supply and peg data for 40+ stablecoins.
- ⛓️ **Chain rankings.** TVL data for 570+ blockchain networks.
- 🔍 **Protocol deep dive.** Detailed chain-level TVL breakdown for any specific protocol.

Each record gives you a complete snapshot of DeFi activity. Protocol records include TVL changes over three timeframes (1h, 1d, 7d), the chains they operate on, and their market cap when available.

> 💡 **Why it matters:** DeFi data is spread across hundreds of protocol dashboards and chain explorers. DefiLlama aggregates it all, and this actor lets you download it as structured data without writing API code.

### 📊 Data fields

Each record includes: `apy`, `apyBase`, `apyReward`, `audits`, `category`, `chain`, `chains`, `chainTvls`, `change_1d`, `change_1h`, `change_7d`, `fdv`, `forkedFrom`, `gecko_id`, `logo`, `mcap`, `name`, `pegMechanism`, `pegType`, `project`, `scrapedAt`, `staking`, `symbol`, `totalSupplyUSD`, `tvl`, `tvlUsd`, `twitter`, `url`. These field names come straight from the actor's dataset schema, so what you see here is what lands in your dataset.

> ⚠️ **Good to Know:** DefiLlama provides free, open-source DeFi data. The "protocols" endpoint returns the broadest dataset with 4,000+ entries. Use the "protocol" field to get chain-level TVL breakdowns for a specific project.

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the DefiLlama Scraper page on the Apify Store.
3. 🎯 **Set input.** Choose your data source (protocols, chains, yields, stablecoins) and max items.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

### 🔗 Recommended Actors

- [**💰 CoinGecko Scraper**](https://apify.com/parseforge/coingecko-scraper) - Real-time cryptocurrency prices, market cap, and volume data
- [**📊 FRED Economic Data Scraper**](https://apify.com/parseforge/fred-scraper) - Federal Reserve economic time-series data
- [**💼 SEC EDGAR Full Text Search**](https://apify.com/parseforge/sec-edgar-full-text-search-scraper) - Search SEC filings by keyword
- [**📈 BLS Wage Data Scraper**](https://apify.com/parseforge/bls-wage-data-scraper) - Employment and wage statistics
- [**🏢 Flippa Scraper**](https://apify.com/parseforge/flippa-scraper) - Online business and website marketplace data

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more data scrapers and tools.

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by DefiLlama. All trademarks mentioned are the property of their respective owners. Only publicly available data is collected.

### 🆘 Need Help?

If you hit a bug, have questions about setup, or need a scraper we haven't built yet, open our [contact form](https://tally.so/r/BzdKgA) or write to parseforge@protonmail.com. We also take on paid custom data projects.

For faster answers, join our [Discord](https://parseforge.co/discord). It's the best place to get support and suggest new actors.

# Actor input Schema

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

How many protocols to collect per run.

## `endpoint` (type: `string`):

Which DefiLlama dataset to query.

## `protocol` (type: `string`):

Get detailed data for a specific protocol (e.g. 'aave', 'uniswap', 'lido'). Overrides endpoint selection.

## Actor input object example

```json
{
  "maxItems": 10,
  "endpoint": "protocols"
}
```

# Actor output Schema

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

No description

# 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 = {
    "maxItems": 10,
    "endpoint": "protocols"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/defillama-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 = {
    "maxItems": 10,
    "endpoint": "protocols",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/defillama-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 '{
  "maxItems": 10,
  "endpoint": "protocols"
}' |
apify call parseforge/defillama-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/D8mPaixUmdkGGLGbN/builds/S79HuLTVO49K0k2ch/openapi.json
