ParseForge Scrapers

DefiLlama DeFi Protocol Scraper

parseforge/defillama-scraper

Developer toolsAutomationOther

Scrapes DeFi protocol TVL, yield pools, stablecoin supply, chain rankings, and historical TVL from DefiLlama. Returns each record as a flat row with full metrics.

Run this scraper See the API call
Total users
3
Monthly active
0
Total runs
143
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

DefiLlama DeFi Protocol Scraper

Scrape DeFi protocol TVL, yield pools, stablecoin supply, and chain rankings from DefiLlama, up to a million records per run. Every record comes with its full metrics, category tags, and chain breakdowns. No API key or registration. Export to CSV, JSON, Excel, or XML.

DefiLlama is the open-source DeFi data aggregator, but pulling its data into your own models means writing API scripts, handling pagination, and normalizing different endpoint schemas. This Actor reads the public DefiLlama datasets directly, lets you pick from protocols, chains, stablecoins, yield pools, or historical TVL, and returns every match in one flat, consistent row.

Who uses it What they scrape DefiLlama for
DeFi analysts Tracking total value locked (TVL) changes across protocols and chains for a weekly market report.
Yield farmers Comparing APY and pool TVL across yield farming pools to find the best risk-adjusted returns.
Crypto hedge funds Monitoring stablecoin supply and depegs as early signals for market stress.
Blockchain researchers Pulling historical TVL data to backtest correlation with token prices.

What it does

This Actor collects DeFi data from DefiLlama by endpoint or specific protocol slug, and returns each record as a flat row with its TVL, APY, supply, or chain metrics.

  • ๐Ÿ“Š Protocols endpoint: 4,000+ DeFi protocols with TVL, category, chain, and market cap.
  • โ›“๏ธ Chains endpoint: 570+ blockchain networks ranked by TVL, with protocol count and change percentages.
  • ๐Ÿ’ต Stablecoins endpoint: 40+ stablecoins with circulating supply, bridged supply, and peg status.
  • ๐ŸŒพ Yields endpoint: Yield farming pools with APY, TVL, and underlying protocol data.
  • ๐Ÿ“ˆ Historical TVL endpoint: Aggregate total TVL over time for the entire DeFi ecosystem.
  • ๐ŸŽฏ Single protocol lookup: Pass a protocol slug like 'aave' or 'lido' to get its full detailed breakdown.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with DefiLlama data

๐Ÿ“ˆ Monitor protocol TVL trends.

A DeFi analyst runs the protocols endpoint daily to track which lending and DEX protocols are gaining or losing TVL, feeding a dashboard that flags shifts over 5%.

๐ŸŒพ Find the best yield pools.

A yield farmer scrapes the yields endpoint filtered by APY and TVL to rank pools by risk-adjusted return before allocating capital.

๐Ÿ’ต Track stablecoin supply changes.

A macro researcher pulls the stablecoins endpoint weekly to detect supply contractions that often precede market downturns.

โ›“๏ธ Compare blockchain ecosystems.

A venture analyst scrapes the chains endpoint to rank L1s and L2s by TVL and protocol count, identifying ecosystems gaining developer traction.

๐Ÿ“Š Backtest TVL against price.

A quant researcher pulls the historical TVL endpoint to build a time series and test whether TVL leads or lags token price movements.

Why choose this scraper

What you get
No API key needed Reads DefiLlama public data directly, no registration or rate-limit headaches.
Five datasets, one schema Protocols, chains, stablecoins, yields, and historical TVL all return as flat, predictable rows.
Up to a million records Set maxItems to pull anything from a single protocol to the entire ecosystem.
CSV, JSON, Excel, XML Export into whichever format your analysis stack expects.

How it compares

Three DefiLlama scrapers exist on Apify. This one covers all five DefiLlama endpoints with a single-protocol lookup mode.

Feature ParseForge DefiLlama Scraper DefiLlama Scraper - Protocols, Yields, Chains & Stablecoins
Protocols endpoint (TVL, category, chains) Yes Yes Yes
Chains endpoint (TVL rankings) Yes Yes Yes
Stablecoins endpoint (supply data) Yes Yes Yes
Yields endpoint (APY, pool TVL) Yes Not listed Yes
Historical TVL endpoint Yes Yes Not listed
Single protocol lookup by slug Yes Not listed Not listed
Up to 1,000,000 records per run Yes Not listed Not listed

Configure the run

Drive the Actor by selecting a dataset endpoint or by passing a specific protocol slug. The maxItems limit controls how many records are collected per run. The Input tab lists every parameter.

A first run with the defaults:

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

A larger pull:

{
 "maxItems": 200,
 "endpoint": "protocols"
}

Pricing

Pay-per-result: $0.0063 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $0.63
1,000 results $6.30
10,000 results $63.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the DefiLlama DeFi Protocol Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to DefiLlama through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/defillama-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your protocol slug is spelled correctly. Slugs are lowercase and match the DefiLlama URL (e.g. 'aave', not 'AAVE'). If you are using an endpoint, make sure maxItems is set to at least 1.

Why is my run timing out?

Lower your maxItems value. Pulling a million records takes time. Start with 100 to test, then scale up.

Why are some fields empty in my output?

Not every endpoint returns every field. A stablecoin record will not have APY, and a yield pool record will not have stablecoin supply. Check the endpoint you selected.

Why did I get fewer records than my maxItems setting?

The Actor stops when it has collected all available data from the endpoint. If DefiLlama has 40 stablecoins, setting maxItems to 100 will return 40 records.

Can I get TVL in a specific currency?

DefiLlama reports TVL in USD by default. The Actor returns the values as DefiLlama provides them.

FAQ

Question Answer
Do I need a DefiLlama API key? No. This Actor reads the public DefiLlama data feeds directly. No registration, no API key, no OAuth.
What endpoints can I scrape? You can choose from five datasets: protocols, chains, stablecoins, yields, and historical TVL. You can also pass a specific protocol slug to get its full detail.
How many records can I pull in one run? Set maxItems anywhere from 1 to 1,000,000. The Actor stops when it hits your limit or runs out of data.
What fields do I get for a protocol? You get TVL, category, chains it is deployed on, market cap, 24h change, and more. The exact fields depend on the endpoint and are shown in the sample output on the Actor's page.
Can I scrape a single protocol? Yes. Pass a protocol slug like 'aave', 'uniswap', or 'lido' in the protocol field, and the Actor returns that protocol's full data.
Does this include historical TVL data? Yes. Select the historical-tvl endpoint to get the aggregate total TVL across all of DeFi over time.
What export formats are supported? You can export your dataset as CSV, JSON, Excel, or XML from the Apify platform.
How often is the data updated? The Actor pulls live data from DefiLlama on each run. Schedule it to run hourly, daily, or weekly to build a time series.
Can I filter by chain or category? The Actor returns all records from the selected endpoint. You can filter the output dataset in Apify's post-processing or in your own analysis tool.
Is this the same data as the DefiLlama website? Yes. It reads the same public data feeds that power the DefiLlama dashboard.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by DefiLlama. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many protocols to collect per run. 10
endpoint string (5 options) Which DefiLlama dataset to query. protocols
protocol string Get detailed data for a specific protocol (e.g. 'aave', 'uniswap', 'lido'). Overrides endpoint selection. not set

Pricing

from $2.95 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.00295 to $0.00315
result details Detailed fields for a single result (extended protocol data). $0.00591 to $0.0063

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~defillama-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run DefiLlama DeFi Protocol Scraper on Apify All scrapers