Skip to main content
AI Studio  add-on for Spider.
Finance
defillama.com Verified

DeFi Llama Scraper

Aggregate total value locked, protocol yields, chain comparisons, and DeFi analytics from DeFi Llama. Built on spider-browser .

Get started Docs
target
defillama.com
success rate
99.9%
latency
~4ms
POST /fetch/defillama.com/
return_format
curl -X POST https://api.spider.cloud/fetch/defillama.com/ \
  -H "Authorization: Bearer $SPIDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"return_format": "json"}'
200 OK · cache hit · response shape
{
  "url": "https://defillama.com/",
  "status": 200,
  "data": {
    "protocol_name": "string",
    "chain": "string",
    "tvl": "string",
    "1d_change": "string",
    "7d_change": "string",
    "category": "string",
    "fees": "string",
    "revenue": "string"
  }
}
Quick start

Extract data in minutes.

Structured JSON from defillama.com with a single POST. AI-resolved selectors, cached on the first call.

defi-llama-scraper.ts
import { SpiderBrowser } from "spider-browser";

const spider = new SpiderBrowser({
  apiKey: process.env.SPIDER_API_KEY!,
  stealth: 2,
});

await spider.connect();
const page = spider.page!;
await page.goto("https://defillama.com/");
await page.content(10000);

const data = await page.evaluate(`(() => {
  const protocols = [];
  document.querySelectorAll("table tbody tr").forEach(el => {
    const name = el.querySelector("td:nth-child(2) a")?.textContent?.trim();
    const chain = el.querySelector("td:nth-child(3)")?.textContent?.trim();
    const tvl = el.querySelector("td:nth-child(5)")?.textContent?.trim();
    const change1d = el.querySelector("td:nth-child(6)")?.textContent?.trim();
    if (name) protocols.push({ name, chain, tvl, change1d });
  });
  return JSON.stringify({ total: protocols.length, protocols: protocols.slice(0, 20) });
})()`);

console.log(JSON.parse(data));
await spider.close();
ready to run · spider-browser · TypeScript
Extraction

Fields you can pull.

Protocol nameChainTVL1d change7d changeCategoryFeesRevenue
Data

Market data capture

Extract real-time quotes, charts, and financial metrics from defillama.com.

Rendering

Dynamic charts

Full browser rendering for interactive charts, tables, and streaming tickers.

Scale

Bulk screening

Process thousands of tickers and financial instruments concurrently.

Related

More Finance scrapers.

Start

Start scraping defillama.com.

Grab an API key and call the endpoint above. The first request resolves the config; every request after hits cache.