How to Scrape DefiLlama Protocols & TVL Data in 2026
Extract all 7,000+ DeFi protocols from DefiLlama — TVL, 1h/1d/7d change, market cap, category and chains. How the API is exposed, its limits, and how to pull it cleanly.
DefiLlama is the de-facto neutral source of total-value-locked (TVL) data in DeFi. Where individual protocols inflate their own dashboards, DefiLlama recomputes TVL from on-chain balances and presents one comparable number across 7,000+ protocols and every chain. That neutrality is exactly why analysts, funds and index builders treat it as ground truth. This guide covers what’s worth extracting, how the public API actually behaves, and why a managed bulk scraper beats hitting the endpoint by hand.
What’s worth extracting
DefiLlama’s protocols snapshot is a wide, nested JSON document. Once flattened to one row per protocol, the fields that matter for almost every use case are:
- TVL — current total value locked in USD, the headline metric.
- TVL momentum — 1-hour, 1-day and 7-day percentage change. This is where the signal lives: a protocol bleeding 30% of TVL in a day is a story before the price catches up.
- Market cap — circulating market-cap estimate, plus the mcap/TVL ratio you can derive from it.
- Category — Dexes, Lending, Liquid Staking, CDP, Yield, Bridge, Restaking, and dozens more.
- Chains — primary chain plus the full list of chains the protocol is deployed on.
- Identity & links — protocol name, slug, logo, website, Twitter handle, audit links.
- Description and listing timestamp — short blurb and when DefiLlama first indexed it.
That’s roughly 15–25 useful columns per protocol. For a longitudinal TVL archive you mostly need TVL, the change windows, category and chains, captured daily.
How the data is exposed
DefiLlama runs a genuinely open, free, no-key API. The protocols list lives at a single endpoint:
GET https://api.llama.fi/protocols
That one request returns the entire snapshot — every protocol in one large JSON array. There’s no pagination to walk, no cursor to manage. Per-protocol historical TVL lives at a separate endpoint:
GET https://api.llama.fi/protocol/{slug}
The convenience of “one request, full dataset” is also the trap. The response is multiple megabytes of deeply nested objects (per-chain TVL maps, token breakdowns, historical arrays). Turning that into a clean, filterable table — flattening nested chain maps, normalizing categories, computing the change columns consistently — is the part people underestimate. You write it once, then maintain it forever as DefiLlama tweaks the shape.
Rate limits and fair use
The free api.llama.fi tier has no hard documented quota, but it is rate-limited and shared by the entire ecosystem. In practice:
- Bursty parallel requests against
/protocol/{slug}for thousands of protocols will get you throttled (HTTP 429) fast. - DefiLlama publishes a paid “Pro” API with higher limits for heavy commercial use — if you’re hammering it on a tight loop, you’re expected to be on that tier.
- The polite pattern is: pull the full
/protocolssnapshot once per cycle, then only fetch per-protocol history for the handful you actually need.
A managed scraper bakes this etiquette in: one snapshot request, in-stream filtering and sorting, exponential backoff on 429, and no per-protocol fan-out unless you ask for it.
▶ Run the DefiLlama Protocols Scraper — fetches all 7,000+ protocols in one fast run, flattens TVL, 1d/7d change, market cap, category and chains into a clean table. Filter by chain, category and minimum TVL. Pay only per row.
Build it yourself vs. use a managed scraper
The API is open, so why not just curl it? Because the data, not the request, is the work:
- Building from scratch — an afternoon to get a raw dump, then a week of edge cases: nested per-chain TVL flattening, category normalization, dealing with protocols that report zero or null TVL, computing change windows the same way DefiLlama’s front end does, and keeping it green when the JSON shape shifts.
- Using a managed actor — point it at chains/categories/min-TVL filters, hit run, get tabular JSON/CSV/Excel out. Schedule it daily and you have a longitudinal archive without owning any infrastructure.
For a one-off research question, the DIY route is fine. For a daily-refreshed feed feeding a dashboard or model, the maintenance is the real cost.
Schema design for downstream use
A clean, flat per-protocol row that’s easy to query and append to over time:
{
"name": "Aave",
"slug": "aave",
"category": "Lending",
"chain": "Ethereum",
"chains": ["Ethereum", "Polygon", "Arbitrum", "Base", "Avalanche"],
"tvl_usd": 18420000000,
"change_1h": -0.4,
"change_1d": 1.8,
"change_7d": -3.2,
"mcap_usd": 1840000000,
"mcap_tvl_ratio": 0.10,
"twitter": "aave",
"url": "https://aave.com",
"scraped_at": "2026-05-20T00:00:00Z"
}
A few decisions worth making early:
- Store
scraped_aton every row. TVL is a point-in-time number; a snapshot is meaningless without knowing when it was valid. This is what turns daily runs into a usable time series. - Keep
chainsas an array, not a flattened string. Cross-chain TVL studies need to explode protocols by chain; you can’t do that cleanly if you’ve already joined them with commas. - Persist
slugas the join key. Display names change (rebrands, “v2” suffixes); the slug is the stable identifier for joining across daily snapshots. - Derive
mcap_tvl_ratioyourself. It’s the single most-used valuation signal in DeFi research and trivial to compute from the two stored columns.
Typical use cases
What teams actually do with a DefiLlama protocols feed:
- TVL trend analytics — daily snapshots stitched into a longitudinal record to chart TVL share and momentum over months.
- Competitive intelligence for protocol teams — filter to your category and chain, track your TVL share versus rivals week over week.
- VC and fund research — screen emerging protocols by TVL growth, benchmark a target against its category, size a market.
- DeFi index / ETF construction — category- or chain-weighted inputs built from TVL and market cap.
- Treasury and risk monitoring — alert on large 1-day or 7-day TVL movements in protocols you’re exposed to.
- Dashboards and newsletters — top gainers/losers leaderboards, “biggest TVL movers this week” content.
The common thread is that the value compounds with freshness and history. A single snapshot answers “what’s big now”; a daily archive answers “what’s growing, what’s bleeding, and how fast.”
Cost math for the managed approach
Because the endpoint returns the entire dataset in one response, runs are fast and cheap. A full daily snapshot of all 7,000+ protocols is roughly 7,000 rows per run. At a fraction of a cent per row plus a tiny per-run start fee, a daily full-landscape archive lands in the low tens of dollars per month — and if you filter to one chain or category, far less than that.
Compared to running your own poller on a VPS, you avoid the cron babysitting, the 429-backoff logic, the JSON-flattening maintenance, and the cold-start week of learning the response shape. For most teams the engineering time saved dwarfs the compute bill.
Common pitfalls
- Null and zero TVL. Newly listed or deprecated protocols report null or zero. Decide up front whether to drop them or keep them flagged — don’t let them silently skew your “smallest protocol” queries.
- Category drift. DefiLlama occasionally renames or splits categories (e.g. carving “Restaking” out of “Liquid Staking”). If you pivot on category, expect the taxonomy to evolve.
- Double-counting across chains. A protocol’s total TVL already aggregates its chains; if you also sum per-chain numbers you’ll double-count. Pick one level of granularity per analysis.
- Market-cap gaps. Not every protocol has a liquid, priced token, so
mcapis often null. Guard your mcap/TVL ratio against divide-by-null. - Snapshot, not stream. This is point-in-time data. For intraday movement you need frequent runs; the change columns are computed by DefiLlama, not by you, so trust them rather than diffing your own sparse snapshots.
Wrapping up
DefiLlama’s open API makes a raw dump easy and the clean, durable dataset hard. If you just need to answer one question today, curl it and wrangle the JSON. If you want a filtered, flattened, daily-refreshed record of the entire DeFi landscape feeding a dashboard, an index, or a model, run a managed scraper that already solves the flattening and the fair-use pacing.
▶ Open the DefiLlama Protocols Scraper on Apify — schedule it daily for a full-landscape TVL archive. JSON/CSV/Excel out, pay per row, free monthly credit to start.
Related guides
App Store Data API Alternative: ASO Metadata Beyond iTunes
Apple's iTunes Search and Lookup API is rate-limited and thin. Here's an App Store data API alternative that returns full reviews, rankings, and keyword signals for ASO.
Binance Market Data Without API Keys: Spot Prices and Funding in 2026
How to pull Binance spot prices, order books and funding data without API keys — using the public REST surface, its weight limits and region blocks explained.
CoinGecko API Alternative: Exchange Data Without Rate-Limit Pain
A CoinGecko API alternative for exchange and market data — why the free Demo tier's ~30 calls/min and Pro-gated fields force you to the public pages instead.