DefiLlama Scraper: how to get Protocol TVL by Chain and Category as JSON/CSV (API, Python, no code)
Snapshot every DefiLlama-tracked protocol filtered by chain, category, and TVL range. This guide shows the output fields, a working input, and
Python, JavaScript and cURL code for the Actor v0iddo/defillama-protocols-snapshot on Apify.
Open DefiLlama Scraper on Apify
What data you get
One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.
| Field | Label | Type | Example |
|---|---|---|---|
snapshotAt | Snapshot At | date | 2026-10-26T04:25:16+00:00 |
id | Id | text | 2269 |
slug | Slug | text | binance-cex |
name | Name | text | Binance CEX |
symbol | Symbol | text | BNB |
category | Category | text | CEX |
chain | Chain | text | Ethereum |
allChains | All Chains | list | ["Ethereum", "Bitcoin", "Binance"] |
url | Url | URL | https://www.binance.com |
description | Description | text | Binance is a cryptocurrency exchange which is the largest exchange ... |
logo | Logo | URL | https://icons.llamao.fi/icons/protocols/binance-cex |
audits | Audits | number | 0 |
twitter | text | binance | |
listedAtUnix | number | 1668170565 | |
tvl | number | 169902090071.38483 | |
tvlOnChain | number | 66568366470.96232 | |
change1h | number | -0.5237263000974224 | |
change1d | number | -1.2640202723395362 | |
change7d | number | -1.0306484930119097 |
Input example
This is the input that is pre-filled on the Actor page. Change the values for your own run.
{
"chains": [
"Ethereum"
]
}
| Input field | Type | What it does |
|---|---|---|
chains | array | Restrict to protocols active on these chains. |
categories | array | Restrict to these categories. |
minTvlUsd | integer | Drop protocols whose total TVL is below this threshold. |
maxTvlUsd | integer | Drop protocols whose TVL is above this threshold. |
Output sample
Real rows from a run of the Actor. Fields that name people are left out of the sample.
[
{
"snapshotAt": "2026-10-26T04:25:16+00:00",
"id": "2269",
"slug": "binance-cex",
"name": "Binance CEX",
"symbol": "BNB",
"category": "CEX",
"chain": "Ethereum",
"allChains": [
"Ethereum",
"Bitcoin",
"Binance"
],
"url": "https://www.binance.com",
"description": "Binance is a cryptocurrency exchange which is the largest exchange in the world in terms of daily trading volume of cryptocurrencies",
"logo": "https://icons.llamao.fi/icons/protocols/binance-cex",
"audits": 0,
"twitter": "binance",
"listedAtUnix": 1668170565,
"tvl": 169902090071.38483,
"tvlOnChain": 66568366470.96232,
"change1h": -0.5237263000974224,
"change1d": -1.2640202723395362,
"change7d": -1.0306484930119097
},
{
"snapshotAt": "2026-10-26T04:25:16+00:00",
"id": "2272",
"slug": "okx",
"name": "OKX",
"symbol": "OKB",
"category": "CEX",
"chain": "Ethereum",
"allChains": [
"Ethereum",
"Bitcoin",
"X Layer"
],
"url": "https://www.okx.com",
"description": "OKX, formerly known as OKEx, is a Seychelles-based cryptocurrency exchange and derivatives exchange that provides a platform for trading...",
"logo": "https://icons.llamao.fi/icons/protocols/okx",
"audits": 0,
"twitter": "okx",
"geckoId": "okb",
"address": "0x75231f58b43240c9718dd58b4967c5114342a86c",
"listedAtUnix": 1668185769,
"tvl": 30154083611.303024,
"tvlOnChain": 13391374425.64804,
"change1h": -0.4021014700582839,
"change1d": -0.9777064773627444,
"change7d": -2.18000933054617,
"mcap": 2258049420.8059473
}
]
Code: Python, JavaScript and cURL
Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/defillama-protocols-snapshot.
Python (apify-client)
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {'chains': ['Ethereum']}
run = client.actor("v0iddo/defillama-protocols-snapshot").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)
JavaScript (apify-client)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
"chains": [
"Ethereum"
]
};
const run = await client.actor('v0iddo/defillama-protocols-snapshot').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
cURL
curl -X POST "https://api.apify.com/v2/acts/v0iddo~defillama-protocols-snapshot/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"chains": ["Ethereum"]}'
Price
$0.10 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.07 per 1,000. See the pricing tab for your plan. A new Apify account gets $5 of platform credit every month.
FAQ
What data does the DefiLlama Scraper return?
Each result is one row in an Apify dataset. Fields include snapshotAt, id, slug, name, symbol, category, chain, allChains, and more. The table above shows every field with an example value.
How do I use the DefiLlama Scraper from Python?
Install the apify-client package, create a client with your Apify API token, call the Actor v0iddo/defillama-protocols-snapshot with an input like the one above, and read the rows from the run's dataset. The Python snippet above does exactly that.
Can I use it without writing code?
Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.
How much does it cost?
$0.10 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.07 per 1,000. A new Apify account gets $5 of platform credit every month.
How do I limit the number of results?
Set a maximum cost for a run in the run options on Apify, and the run stops when it is reached.
Can I send the results to Google Sheets, Make, Zapier or n8n?
Yes. Apify datasets connect to Google Sheets, Slack, Make, Zapier and n8n, and a webhook can call your own service when a run finishes. You can also export the dataset as JSON, CSV or Excel.
Open DefiLlama Scraper on Apify
Related guides
- Currency exchange rates (ECB): Latest and historical euro foreign exchange reference rates from the European Central Bank, with conversion...
- Yahoo Finance Scraper: Scrape Yahoo Finance quotes and key statistics for stocks, ETFs, indexes, crypto, currencies and futures: p...
- Steam game reviews scraper: Scrape Steam player reviews by App ID.