# DeFiLlama Scraper — DeFi Protocols, TVL, Chains & Yields (`haketa/defillama-scraper`) Actor

Scrape DeFiLlama DeFi data: protocols with TVL, chain, category, 1h/1d/7d change and market cap; chain-level TVL rankings; and yield pools with APY, base/reward APY and TVL. Filter by chain, category or search. For crypto research, dashboards and DeFi analytics. Not affiliated with DeFiLlama.

- **URL**: https://apify.com/haketa/defillama-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## DeFiLlama Scraper — DeFi Protocols, TVL, Chains & Yield APY

**Extract live DeFi market data from [DeFiLlama](https://defillama.com) in one run — protocol TVL rankings, chain-level TVL, and yield pools with APY — no login, no coding, no API key.** This **DeFiLlama scraper** turns the whole DeFiLlama universe into clean, structured rows: thousands of **DeFi protocols** with Total Value Locked, 1h/1d/7d change and market cap; every supported **blockchain** ranked by TVL; and the full **yield / APY pool** list with base APY, reward APY, 30-day mean APY and DeFiLlama's own APY outlook prediction. When you **scrape DeFiLlama** with this actor you get analyst-ready data instead of hand-copied numbers from a dashboard.

Export to **JSON, CSV, Excel, or API**.

> Built for crypto analysts, DeFi researchers, quant and trading desks, yield farmers, portfolio and treasury managers, data journalists, and builders of DeFi dashboards, screeners and alerting bots who need reliable **DeFiLlama data** on a schedule.

***

### 🔎 Why scrape DeFiLlama?

[DeFiLlama](https://defillama.com) is the most widely trusted, independent source of **DeFi TVL** (Total Value Locked) data. It tracks **8,800+ protocols**, **400+ chains**, and **15,000+ yield pools** across the entire decentralized-finance ecosystem — lending markets, DEXes, liquid staking, CDPs, restaking, RWAs, bridges and more. Because it is methodology-driven and vendor-neutral, DeFiLlama numbers are what desks, funds and journalists quote when they talk about the size and health of DeFi.

The problem: the website is built for browsing, not bulk analysis. You cannot easily pull 500 protocols into a spreadsheet, diff today's TVL against yesterday's, or snapshot every Ethereum yield pool above 10% APY on a cron. Copy-pasting from the DeFiLlama UI is slow, error-prone and impossible to automate. There is a public DeFiLlama API, but it returns huge raw JSON blobs that mix real chains with internal breakdown keys and need filtering, flattening and de-duplication before they are usable.

This **DeFiLlama scraper** does that work for you. It calls the public **DeFiLlama API** (`api.llama.fi` and `yields.llama.fi`), cleans and normalizes every record, applies your filters (chain, category, search, minimum TVL), sorts by TVL or APY, and hands back a tidy dataset you can open in Excel or pipe into your own pipeline.

**Common reasons people scrape DeFiLlama:**

- Track **DeFi TVL** across protocols and chains over time for market research and reporting.
- Build a **yield screener** — find the highest-APY pools, filter by chain, stablecoin, exposure and risk.
- Monitor a watchlist of protocols (Aave, Lido, Uniswap, Maker, EigenLayer…) for TVL inflows and outflows.
- Power a **DeFi dashboard, Google Sheet or Notion board** with fresh, structured DeFi data.
- Feed **quant / trading models** with TVL momentum (1h/1d/7d change) and APY signals.
- Compare chains (Ethereum, Solana, Base, Arbitrum, Tron…) by TVL and growth for ecosystem analysis.
- Snapshot the market daily for backtesting, newsletters, alerts or academic research.

### ✨ What this DeFiLlama scraper does

- ✅ **Three data modes in one actor** — choose `entityType`: **Protocols (TVL)**, **Chains (TVL)**, or **Yield pools (APY)**.
- ✅ **Protocol detail mode** — pass one or more `protocolSlugs` (e.g. `lido`, `aave`, `uniswap`) to get a **per-chain TVL breakdown**, chain count, description, audits and CoinGecko id for each protocol.
- ✅ **Scrapes the full set, then filters locally** — the DeFiLlama API returns the entire list in one call, so the actor pulls **all 8,800+ protocols / 400+ chains / 15,000+ yield pools**, then applies your filters and returns up to `maxItems` de-duplicated rows.
- ✅ **Powerful filters & targeting** — filter by **chain**, protocol **category** (Dexes, Lending, Liquid Staking, CDP, Yield, Restaking…), free-text **search terms** (name / symbol / project), and **minimum TVL**.
- ✅ **Sort control** — yields sort by **APY** or **TVL**; protocols and chains sort by **TVL** descending.
- ✅ **Rich protocol fields** — `name`, `slug`, `symbol`, `category`, primary `chain` + all `chains`, `tvl`, `change1h`, `change1d`, `change7d`, `mcap`, `url`, `twitter`, `logo`, `listedAt`, `defillamaUrl`.
- ✅ **Rich yield fields** — `project`, `chain`, `symbol`, `poolMeta`, `tvlUsd`, `apy`, `apyBase`, `apyReward`, `apyMean30d`, `apyPct1D`, `apyPct7D`, `apyPct30D`, `rewardTokens`, `stablecoin`, `ilRisk`, `exposure`, `underlyingTokens`, `volumeUsd1d`, `volumeUsd7d`, **`predictedClass` + `predictedProbability`** (DeFiLlama's ML APY outlook), `poolId`, `defillamaUrl`.
- ✅ **Rich chain fields** — `name`, `tvl`, `tokenSymbol` (gas token), `chainId`, `geckoId`, `cmcId`, `defillamaUrl`.
- ✅ **Clean, typed output** — numeric fields are real numbers, URLs are built for you, timestamps are ISO; every row carries a `scrapedAt` timestamp.
- ✅ **Export anywhere** — download as **JSON, CSV, Excel/XLSX, HTML table or RSS**, or pull via the Apify **API**.
- ✅ **Fast, cheap & reliable** — a public, keyless **DeFiLlama API** with **no anti-bot**; datacenter proxy is enough, runs finish in seconds, with 5× retry and proxy rotation built in.

### 🎯 Use cases

- **Crypto / DeFi analysts** — pull TVL and APY tables for research notes, market maps and ecosystem reports.
- **Yield farmers & DeFi funds** — screen 15,000+ pools for the best risk-adjusted APY by chain, stablecoin and exposure.
- **Quant & trading desks** — ingest TVL momentum (1h/1d/7d change) and APY signals into models and alerting.
- **Portfolio & treasury managers** — monitor protocol TVL inflows/outflows and chain allocation over time.
- **Dashboard & screener builders** — power a live DeFi dashboard, Sheet or app with structured **DeFiLlama data**.
- **Data journalists & researchers** — snapshot DeFi market size and growth with citable, methodology-driven numbers.
- **Builders & product teams** — enrich wallets, aggregators and bots with protocol, chain and yield metadata.
- **Competitive / ecosystem research** — rank chains and categories by TVL to size a market or a competitor.

### 📥 Input

Configure everything from the Apify Console UI, or pass a JSON input via API. All fields are optional — run with defaults to get the top protocols by TVL.

| Field | Type | Description |
|-------|------|-------------|
| `entityType` | string (enum) | What to scrape: `protocols` (TVL), `chains` (TVL), or `yields` (APY pools). Default `protocols`. |
| `searchTerms` | array of strings | Filter by name/symbol (protocols), chain name (chains) or project/symbol (yields). Leave empty for all. |
| `chains` | array of strings | Filter by chain, e.g. `Ethereum`, `Solana`, `Base`, `Arbitrum`. |
| `categories` | array of strings | Filter protocols by category, e.g. `Dexes`, `Lending`, `Liquid Staking`, `CDP`, `Yield`. |
| `protocolSlugs` | array of strings | Specific protocol slugs (e.g. `lido`, `aave`, `uniswap`) — returns per-chain TVL breakdown and description. |
| `minTvl` | integer | Only include entries with at least this much TVL in USD (`0` = no filter). |
| `sortBy` | string (enum) | For yield pools: sort by `tvl` or `apy`. Protocols and chains always sort by TVL. Default `tvl`. |
| `maxItems` | integer | Maximum entries to return. `0` = no limit. Prefilled to `250`. |
| `proxyConfiguration` | object | Apify Proxy. The API is public — datacenter is enough and enabled by default. |

#### Example input — top Ethereum yield pools by APY

```json
{
  "entityType": "yields",
  "chains": ["Ethereum"],
  "sortBy": "apy",
  "minTvl": 1000000,
  "maxItems": 200,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example input — top DEX protocols by TVL

```json
{
  "entityType": "protocols",
  "categories": ["Dexes"],
  "minTvl": 10000000,
  "maxItems": 250,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### 📤 Output

Each result is one structured record. The exact fields depend on the `entityType` you choose. Below is a **yield pool** item — the richest mode:

```json
{
  "project": "aave-v3",
  "chain": "Ethereum",
  "symbol": "USDC",
  "poolMeta": null,
  "tvlUsd": 892456123,
  "apy": 6.42,
  "apyBase": 4.11,
  "apyReward": 2.31,
  "apyMean30d": 5.88,
  "apyPct1D": 0.12,
  "apyPct7D": -0.44,
  "apyPct30D": 1.05,
  "rewardTokens": ["0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"],
  "stablecoin": true,
  "ilRisk": "no",
  "exposure": "single",
  "underlyingTokens": ["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"],
  "volumeUsd1d": null,
  "volumeUsd7d": null,
  "predictedClass": "Stable/Up",
  "predictedProbability": 72,
  "poolId": "aa70268e-4b52-42bf-a116-608b370f9501",
  "defillamaUrl": "https://defillama.com/yields/pool/aa70268e-4b52-42bf-a116-608b370f9501",
  "scrapedAt": "2026-10-25T09:00:00.000Z"
}
```

A **protocol** item (default mode) looks like this:

```json
{
  "name": "Lido",
  "slug": "lido",
  "symbol": "LDO",
  "category": "Liquid Staking",
  "chain": "Ethereum",
  "chains": ["Ethereum", "Moonbeam", "Moonriver"],
  "tvl": 25410000000,
  "change1h": 0.04,
  "change1d": -0.52,
  "change7d": 1.83,
  "mcap": 1120000000,
  "url": "https://lido.fi",
  "twitter": "https://twitter.com/LidoFinance",
  "logo": "https://icons.llamao.fi/icons/protocols/lido",
  "listedAt": "2020-12-19T00:00:00.000Z",
  "defillamaUrl": "https://defillama.com/protocol/lido",
  "scrapedAt": "2026-10-25T09:00:00.000Z"
}
```

#### Field reference

| Field | Description |
|-------|-------------|
| `name` | Protocol or chain name. |
| `slug` | Protocol slug (used in the DeFiLlama URL). |
| `project` | Yield pool project (yields mode). |
| `symbol` | Token symbol (protocol token or pool asset symbol). |
| `category` | Protocol category (Dexes, Lending, Liquid Staking, CDP, Yield…). |
| `chain` | Primary chain of the protocol / pool. |
| `chains` | All chains a protocol is deployed on (protocols mode). |
| `tvl` | Total Value Locked in USD (protocols & chains). |
| `tvlUsd` | Pool TVL in USD (yields mode). |
| `change1h` / `change1d` / `change7d` | TVL change over 1h / 1 day / 7 days, in %. |
| `mcap` | Protocol market cap in USD (present when available). |
| `apy` | Total APY % (base + reward). |
| `apyBase` | Base APY % from the protocol itself. |
| `apyReward` | Reward/incentive APY % (present when the pool has rewards). |
| `apyMean30d` | 30-day mean APY %, useful for stability. |
| `apyPct1D` / `apyPct7D` / `apyPct30D` | Change in APY over 1 / 7 / 30 days. |
| `rewardTokens` | Reward token contract addresses (present when the pool has rewards). |
| `stablecoin` | `true` if the pool is a stablecoin pool (present for yields). |
| `ilRisk` | Impermanent-loss risk flag (`no` / `yes`). |
| `exposure` | Token exposure: `single` or `multi`. |
| `underlyingTokens` | Underlying token contract addresses of the pool. |
| `volumeUsd1d` / `volumeUsd7d` | 1-day / 7-day DEX volume in USD (present for DEX pools). |
| `predictedClass` | DeFiLlama's ML APY outlook: `Stable/Up` or `Down`. |
| `predictedProbability` | Confidence (0–100) of the APY-outlook prediction. |
| `chainTvls` | Per-chain TVL breakdown (protocol detail mode). |
| `chainCount` | Number of chains a protocol spans (detail mode). |
| `tokenSymbol` | Chain gas token symbol (chains mode). |
| `chainId` | EVM chain ID (chains mode). |
| `geckoId` / `cmcId` | CoinGecko / CoinMarketCap identifiers. |
| `logo` | Protocol logo URL (protocols mode). |
| `listedAt` | Date the protocol was listed on DeFiLlama (ISO, present when available). |
| `description` | Protocol description (detail mode). |
| `url` | Protocol website. |
| `twitter` | Protocol Twitter/X URL. |
| `poolId` | DeFiLlama yield pool ID. |
| `defillamaUrl` | Canonical DeFiLlama page for the record. |
| `scrapedAt` | ISO timestamp when the row was scraped. |

Fields marked *"present when available"* are **data-dependent** — DeFiLlama only populates them for certain records (e.g. `apyReward`, `rewardTokens` and `stablecoin` only on reward/stablecoin pools; `volumeUsd7d` only on DEX pools; `mcap` only on tokens with a known market cap). Empty values are returned as `null` or `""`, never fabricated.

### 🔁 Pagination & scale

The **DeFiLlama API** is a **bulk / single-call API**: each endpoint returns the *entire* list in one response — all protocols from `api.llama.fi/protocols`, all chains from `api.llama.fi/v2/chains`, and all yield pools from `yields.llama.fi/pools`. There are no pages, offsets or cursors to walk, so the actor fetches the whole set in one request (with automatic retry and proxy rotation), then **filters, sorts and de-duplicates locally** and returns up to `maxItems` rows.

That means you can pull **hundreds to thousands** of records in a single fast run:

- **~8,800 protocols**, **~400 chains**, **~15,000 yield pools** available in each full fetch.
- Set `maxItems: 0` for **no limit** (the complete filtered set), or cap it (default `250`) to keep runs small.
- Narrow the result set with `chains`, `categories`, `searchTerms` and `minTvl` before the `maxItems` cut.
- In **protocol detail mode**, the actor fetches one request per `protocolSlug` and returns one enriched record per slug.

Because everything is one API call plus local processing, runs are extremely cheap and typically complete in **seconds**, even for the full dataset.

### ⚙️ How to use

1. **Open the actor** on the [Apify Console](https://console.apify.com) and click **Try for free**.
2. **Pick a mode** — set `entityType` to `protocols`, `chains` or `yields`.
3. **Add filters** (optional) — chains, categories, search terms, `minTvl`, `sortBy`, `maxItems`.
4. **Click Start** and watch the run finish in seconds.
5. **Export** your data as **JSON, CSV, Excel, HTML or RSS** from the **Storage → Dataset** tab.
6. **Automate it** — run on a **schedule** (e.g. daily), call it from the **Apify API / SDK**, or connect it to **Make, Zapier, Google Sheets, Airtable or a webhook** to push fresh DeFiLlama data into your stack.

### 💡 Tips

- Leave `searchTerms`, `chains` and `categories` empty and set `maxItems: 0` to snapshot the **entire** DeFi market in one run.
- For a **yield screener**, use `entityType: "yields"`, `sortBy: "apy"` and a `minTvl` (e.g. `1000000`) to drop dust pools and surface real opportunities.
- Combine `chains: ["Ethereum"]` with `categories` in protocols mode to zoom into one ecosystem and sector.
- Watch a portfolio by putting your protocols in `protocolSlugs` (detail mode) to get **per-chain TVL breakdowns** and descriptions.
- Use `stablecoin`, `ilRisk` and `exposure` to filter yields down to lower-risk, single-asset positions after export.
- Schedule a **daily run** and diff `tvl` / `apy` against the previous dataset to build trend and alerting signals.

### ❓ FAQ

**Is scraping DeFiLlama legal?**
This actor reads DeFiLlama's **public API**, which is free and keyless. Only publicly available data is collected and no login is required. As always, use the data responsibly, respect DeFiLlama's terms, and consult your own legal counsel for your specific use case. This actor is **not affiliated with or endorsed by DeFiLlama**, and the data is not financial advice.

**How many results can I get and how fast?**
A full fetch exposes roughly **8,800 protocols, 400 chains and 15,000 yield pools**. Because it's a single bulk API call plus local filtering, most runs finish in **seconds**. Use `maxItems` to cap the output or `0` for everything.

**Do I need proxies or a login?**
No login and no API key. The **DeFiLlama API** is public with no anti-bot, so **datacenter proxy** (enabled by default) is more than enough — residential proxies are not needed.

**What export formats are supported?**
**JSON, CSV, Excel/XLSX, HTML table and RSS**, plus programmatic access through the **Apify API** and SDKs.

**Is there a DeFiLlama API, and why use this scraper instead?**
Yes — this actor is built on top of the public DeFiLlama API. The scraper saves you the work of filtering huge raw JSON, separating real chains from internal breakdown keys, flattening predictions and reward tokens, de-duplicating, sorting and exporting — you get clean, spreadsheet-ready rows and scheduling out of the box.

**How fresh is the data?**
Every run fetches **live** data straight from DeFiLlama at request time, and each row is stamped with `scrapedAt`. Schedule the actor (e.g. hourly or daily) to keep a rolling, time-series snapshot.

**Can I filter by chain, category or APY?**
Yes. Filter protocols and yields **by chain**, protocols **by category**, anything **by search term** and **by minimum TVL**, and sort yield pools **by APY or TVL**.

**Can I get the TVL breakdown for a specific protocol?**
Yes — put slugs like `lido`, `aave`, `uniswap` into `protocolSlugs`. Detail mode returns a cleaned **per-chain TVL breakdown**, chain count, description, audits and CoinGecko id.

**Why are some fields empty (apyReward, mcap, volume)?**
Those fields are **data-dependent**: DeFiLlama only provides them for certain records (reward pools, tokens with a market cap, DEX pools with volume). The actor returns `null`/`""` rather than inventing values.

**Why do I sometimes see fewer rows than expected?**
Your filters (`minTvl`, `chains`, `categories`, `searchTerms`) or a low `maxItems` are narrowing the set. Loosen the filters or set `maxItems: 0` to return the complete filtered list.

### 🔗 Related scrapers

- [CoinGecko Scraper](https://apify.com/haketa/coingecko-scraper) — crypto prices, market cap, volume and rankings for thousands of coins.
- [Yahoo Finance Fundamentals Scraper](https://apify.com/haketa/yahoo-finance-fundamentals-scraper) — stock fundamentals, financials and valuation metrics.
- [Kalshi Scraper](https://apify.com/haketa/kalshi-scraper) — prediction-market events, contracts and live odds.

***

**Ready to scrape DeFiLlama?** Click **Try for free**, pick a mode, and export live **DeFi protocol, chain and yield** data as JSON, CSV or Excel in seconds.

# Actor input Schema

## `entityType` (type: `string`):

What to scrape: DeFi protocols (TVL), chains, or yield/APY pools.

## `searchTerms` (type: `array`):

Filter by name/symbol (protocols), chain name (chains) or project/symbol (yields). Leave empty for all.

## `chains` (type: `array`):

Filter by chain (e.g. Ethereum, Solana, Base, Arbitrum).

## `categories` (type: `array`):

Filter protocols by category (e.g. Dexes, Lending, Liquid Staking, CDP, Yield).

## `protocolSlugs` (type: `array`):

Specific protocol slugs (e.g. lido, aave, uniswap) — returns per-chain TVL breakdown and description.

## `minTvl` (type: `integer`):

Only include entries with at least this much TVL (0 = no filter).

## `sortBy` (type: `string`):

For yield pools: sort by TVL or APY (protocols/chains always sort by TVL).

## `maxItems` (type: `integer`):

Maximum entries to return. 0 = no limit.

## `proxyConfiguration` (type: `object`):

Apify Proxy. The API is public — datacenter is enough and enabled by default.

## Actor input object example

```json
{
  "entityType": "protocols",
  "minTvl": 0,
  "sortBy": "tvl",
  "maxItems": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `name` (type: `string`):

Protocol/chain name

## `slug` (type: `string`):

Protocol slug

## `project` (type: `string`):

Yield project

## `symbol` (type: `string`):

Token symbol

## `category` (type: `string`):

Protocol category

## `chain` (type: `string`):

Primary chain

## `chains` (type: `string`):

All chains

## `tvl` (type: `string`):

Total value locked

## `tvlUsd` (type: `string`):

Pool TVL (USD)

## `change1h` (type: `string`):

1h TVL change %

## `change1d` (type: `string`):

1d TVL change %

## `change7d` (type: `string`):

7d TVL change %

## `mcap` (type: `string`):

Market cap

## `apy` (type: `string`):

Total APY %

## `apyBase` (type: `string`):

Base APY %

## `apyReward` (type: `string`):

Reward APY %

## `apyMean30d` (type: `string`):

30-day mean APY %

## `apyPct7D` (type: `string`):

7d APY change

## `exposure` (type: `string`):

single / multi token

## `predictedClass` (type: `string`):

Predicted APY trend

## `poolMeta` (type: `string`):

Pool descriptor

## `volumeUsd7d` (type: `string`):

7d DEX volume (USD)

## `chainTvls` (type: `string`):

Per-chain TVL

## `chainCount` (type: `string`):

Number of chains

## `tokenSymbol` (type: `string`):

Chain gas token

## `chainId` (type: `string`):

EVM chain ID

## `logo` (type: `string`):

Protocol logo URL

## `listedAt` (type: `string`):

Listing date (ISO)

## `description` (type: `string`):

Protocol description

## `url` (type: `string`):

Protocol website

## `twitter` (type: `string`):

Twitter URL

## `poolId` (type: `string`):

Yield pool ID

## `defillamaUrl` (type: `string`):

DeFiLlama page

## `scrapedAt` (type: `string`):

ISO timestamp

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 250,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/defillama-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 250,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/defillama-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/defillama-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/defillama-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jdltGAmfo7JwtMORN/builds/WtVsretT32Dds2s48/openapi.json
