DefiLlama Scraper
Pricing
from $1.00 / 1,000 records
DefiLlama Scraper
Extract DefiLlama protocol data as structured records: total value locked now and per chain, category, chains listed, audit references, token links, and the TVL change over 1d, 7d and 30d. Export data, run via API, schedule and monitor runs, or integrate with other tools.
Pricing
from $1.00 / 1,000 records
Rating
5.0
(1)
Developer
Public Money
Maintained by ApifyActor stats
1
Bookmarked
4
Total users
3
Monthly active users
18 hours ago
Last modified
Categories
Share
DefiLlama is the reference for DeFi total value locked, and it publishes its own free API. What this Actor adds is shape: one record per protocol with the same field names as the other 29 Actors in this fleet, TVL broken out per chain, the change over 1d, 7d and 30d, category and audit references, and a failure row rather than a silent gap when a slug does not resolve.
What it does
- Returns one record per protocol, in order. A slug DefiLlama does not know comes back with
status: "failed"and a reason. - Breaks TVL out per chain in
tvlByChain, so a protocol deployed on eight chains shows you where the money actually is. - Carries the change over 1d, 7d and 30d in one record, which is what tells you whether a TVL number is a trend or a spike.
- Reports category and audit references, so a protocol can be screened on more than its size.
- Uses the same field vocabulary as the rest of this fleet, so a DeFi record joins to a price record without a translation layer.
- Handles the source's pagination and rate limits for you, and gives you the platform's scheduling, webhooks and integrations around the result.
Use cases
| You need to | How this Actor does it |
|---|---|
| Track TVL for a protocol set | Pass your protocols and schedule the run daily |
| See which chain a protocol really lives on | Read tvlByChain rather than the headline number |
| Tell a trend from a spike | Compare change1d against change7d and change30d |
| Screen a category | Filter on category across a protocol list |
| Check whether a protocol is audited | Read audits and auditLinks before you size a position |
| Feed a DeFi research agent | Call the Actor over MCP and let the model ask for the protocol it needs |
Quick start
- Click Try for free.
- Add DefiLlama protocol slugs, one per line:
uniswap,aave,lido. The slug is the last part of the protocol's DefiLlama URL. - Click Start. Rows appear within seconds.
- Export as JSON, CSV, Excel or XML, or read the dataset over the API.
Input
| Field | Type | Default | What it controls |
|---|---|---|---|
protocols | array | uniswap, aave | DefiLlama protocol slugs to read |
maxItems | integer | 0 | Caps how many protocols are read. 0 reads them all |
{"protocols": ["uniswap","aave","lido"],"maxItems": 0}
Output
One dataset item per protocol. Fields DefiLlama does not publish for a protocol are dropped rather than returned as null, so an unaudited protocol carries no audit fields.
| Field group | Fields |
|---|---|
| Identity | status, requested, name, slug, category, url |
| Value locked | tvlUsd, tvlByChain, chains |
| Change | change1d, change7d, change30d |
| Diligence | audits, auditLinks, listedAt |
| Token | symbol, address, twitter |
| Timing | validFrom, scrapedAt |
{"status": "ok","requested": "aave","name": "AAVE","slug": "aave","category": "Lending","tvlUsd": 18442110394.22,"tvlByChain": {"Ethereum": 14220118844.1,"Arbitrum": 1884219004.7,"Base": 1122008841.2},"chains": ["Ethereum","Arbitrum","Base","Polygon"],"change1d": -0.84,"change7d": 3.12,"change30d": 11.48,"audits": "2","symbol": "AAVE","validFrom": "2026-09-06T05:30:00.000Z","url": "https://defillama.com/protocol/aave"}
Integrations
Run it over the API and get the rows back in one call:
curl -X POST "https://api.apify.com/v2/acts/publicmoney~defillama-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"protocols": ["uniswap", "aave", "lido"], "maxItems": 0}'
From Python:
from apify_client import ApifyClientclient = ApifyClient("YOUR_TOKEN")run = client.actor("publicmoney/defillama-scraper").call(run_input={"protocols": ["uniswap", "aave", "lido"], "maxItems": 0})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["symbol"], item["name"], item["validFrom"])
Give an AI agent the Actor over MCP:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=publicmoney/defillama-scraper"}}}
Schedules run it on any cron, webhooks fire when a run finishes, and platform integrations push the dataset to Google Sheets, Slack, Airtable, Zapier or your own endpoint.
Cost
Pay per event, so you pay for records rather than compute time.
| Event | Free tier | Top volume tier |
|---|---|---|
| Record with data | $0.002 | $0.0007 |
| Actor start | $0.00005 per GB | Same |
A record that returned no data is published as a failure row and is never charged. Six volume tiers apply, so the per-record price falls with monthly volume.
Troubleshooting
| Issue | Solution |
|---|---|
A protocol returns failed | The slug is wrong. It is DefiLlama's own, so read it off the end of the protocol's DefiLlama URL rather than guessing from the brand name. |
tvlUsd does not match the sum of tvlByChain | DefiLlama excludes double-counted positions from the headline number, so the parts can exceed the whole. The headline is the one to quote. |
| A protocol shows a huge one-day change | Check change7d and change30d. TVL moves with the price of the assets locked, so a token move shows up as a TVL move. |
audits is a number, not a list | That is DefiLlama's own scale for how audited a protocol is. auditLinks carries the references. |
The protocol has no symbol | It has no token. Plenty of protocols hold value without one. |
FAQ
Does DefiLlama have a free API?
Yes, and it is good. This Actor is not selling you access to it. What it gives you is the same record shape and field names as the other 29 Actors in this fleet, a failure row instead of a silent gap, pagination and rate limits handled, and the platform's scheduling, webhooks and integrations around it. For one script against one endpoint, use DefiLlama directly.
What is a DefiLlama protocol slug?
DefiLlama's own identifier, which is the last part of the protocol URL: aave, uniswap, lido. It is not always the brand name, so copy it from the URL.
Why is TVL per chain useful?
Because a protocol's headline TVL can be almost entirely on one chain. tvlByChain tells you whether a multi-chain deployment is real or nominal.
Does it return historical TVL?
No series, but each record carries the change over 1d, 7d and 30d. To build a series, schedule the Actor and let the dataset accumulate a row per protocol per run.
Why does TVL move when nothing was deposited?
TVL is denominated in USD, so it moves with the price of the assets locked. A token falling 10 percent drops TVL without a single withdrawal.
Do I need a DefiLlama API key?
No. You need an Apify token to call the Actor over the API. No DefiLlama credential is involved anywhere.
Can I get this data in Python?
Yes, with the apify-client package as shown above. It returns parsed JSON, so there is no HTML or response handling on your side.
Can I get the data into Excel or Google Sheets?
Yes. Export the dataset as XLSX or CSV, or connect the Google Sheets integration so each run appends to a sheet.
Can an AI agent call this Actor?
Yes. Add it to an MCP client with the config above and the model can request what it needs on its own. Every record is flat JSON with named fields, so no post-processing is needed.
Is it legal to scrape DefiLlama?
This Actor reads DefiLlama's public data, which the project publishes openly, and collects no personal data. How you store, redistribute or act on DeFi data is governed by your own agreements and local rules. Take your own legal advice for your use case.
Changelog
- 0.0.2 Added the per-chain TVL breakdown, audit references and the 7d and 30d change.
- 0.0.1 First release. Protocol TVL and category.
Feedback
Found a field DefiLlama publishes that this Actor misses, or an input it rejects? Open an issue on the Issues tab with the input and what you expected. A daily test runs every Actor in the fleet against live sources, so parser fixes ship fast.