{
  "openapi": "3.0.1",
  "info": {
    "title": "DefiLlama Scraper: TVL, Yields, Stablecoins, Hacks",
    "description": "Scrape DefiLlama data on DeFi: protocols with TVL, fees, revenue and volume, yield pools with APY and risk flags, stablecoin supply and peg, chain rankings and the history of hacks. Valuation ratios and trends included. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "gRJoBe6mU6fVn02mV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~defillama-protocols-yields-stablecoins-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-defillama-protocols-yields-stablecoins-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/parselab~defillama-protocols-yields-stablecoins-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-defillama-protocols-yields-stablecoins-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/parselab~defillama-protocols-yields-stablecoins-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-defillama-protocols-yields-stablecoins-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "protocols",
              "yields",
              "stablecoins",
              "chains",
              "hacks"
            ],
            "type": "string",
            "description": "Protocols returns one row per DeFi protocol with TVL, fees, revenue and volume. Yield pools returns farming and lending pools with APY. Stablecoins returns supply and peg data. Chains ranks blockchains by TVL. Hacks returns the history of exploits.",
            "default": "protocols"
          },
          "searchTerms": {
            "title": "Search words",
            "type": "array",
            "description": "Part of a name or a symbol, for example aave, uniswap or USDC. In the hacks mode the words are also searched in the description.",
            "items": {
              "type": "string"
            }
          },
          "chains": {
            "title": "Chains",
            "type": "array",
            "description": "Keep items on these chains, for example Ethereum, Solana, Base, Arbitrum.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories (protocols)",
            "type": "array",
            "description": "Protocols mode. For example Dexs, Lending, Liquid Staking, Bridge, Derivatives, Yield.",
            "items": {
              "type": "string"
            }
          },
          "projects": {
            "title": "Projects (yield pools)",
            "type": "array",
            "description": "Yield pools mode. Project names as DefiLlama writes them, for example aave-v3, lido, uniswap-v3, morpho.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "",
              "tvl",
              "change1d",
              "change7d",
              "change30d",
              "fees24h",
              "revenue24h",
              "volume24h",
              "marketCap",
              "listed",
              "apy",
              "apyBase",
              "apyMean30d",
              "circulating",
              "depeg",
              "stablecoins",
              "date",
              "amount"
            ],
            "type": "string",
            "description": "Largest first. Protocols: tvl, change1d, change7d, fees24h, revenue24h, volume24h, marketCap, listed. Yield pools: apy, tvl, apyBase, apyMean30d. Stablecoins: circulating, change7d, change30d, depeg. Chains: tvl, stablecoins. Hacks: date, amount.",
            "default": ""
          },
          "minTvlUsd": {
            "title": "Minimum TVL (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Protocols, yield pools and chains. Keep items with at least this much value locked."
          },
          "maxTvlUsd": {
            "title": "Maximum TVL (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Protocols, yield pools and chains. Useful to find small protocols early."
          },
          "minMarketCapUsd": {
            "title": "Minimum market cap (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Protocols mode."
          },
          "minTvlChange7dPct": {
            "title": "Minimum TVL change 7 days (%)",
            "type": "number",
            "description": "Protocols mode. For example 20 to find protocols that grew at least 20% in a week."
          },
          "maxTvlChange7dPct": {
            "title": "Maximum TVL change 7 days (%)",
            "type": "number",
            "description": "Protocols mode. For example -20 to find protocols that lost at least 20% in a week."
          },
          "minFees24hUsd": {
            "title": "Minimum fees 24h (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Protocols mode. Keep protocols that earned at least this much in fees in 24 hours."
          },
          "listedAfter": {
            "title": "Listed after",
            "type": "string",
            "description": "Protocols mode. Keep protocols listed on or after this date, in the form 2026-09-30."
          },
          "includeEarnings": {
            "title": "Add fees, revenue and volume",
            "type": "boolean",
            "description": "Protocols mode. Adds fees, revenue and volume of each protocol and the valuation ratios. Reads three more lists.",
            "default": true
          },
          "minApy": {
            "title": "Minimum APY (%)",
            "type": "number",
            "description": "Yield pools mode."
          },
          "maxApy": {
            "title": "Maximum APY (%)",
            "type": "number",
            "description": "Yield pools mode. Very high APY is often a risk sign, so a cap helps."
          },
          "minBaseApy": {
            "title": "Minimum base APY (%)",
            "type": "number",
            "description": "Yield pools mode. The part of the yield that does not come from reward tokens."
          },
          "stablecoinsOnly": {
            "title": "Stablecoin pools only",
            "type": "boolean",
            "description": "Yield pools mode.",
            "default": false
          },
          "noImpermanentLoss": {
            "title": "No impermanent loss risk",
            "type": "boolean",
            "description": "Yield pools mode. Keep pools that DefiLlama marks as without impermanent loss risk.",
            "default": false
          },
          "singleExposureOnly": {
            "title": "Single asset exposure only",
            "type": "boolean",
            "description": "Yield pools mode. Keep pools that hold one asset instead of a pair.",
            "default": false
          },
          "keepOutliers": {
            "title": "Keep outliers",
            "type": "boolean",
            "description": "Yield pools mode. DefiLlama marks pools with an unusual APY as outliers. They are dropped unless you turn this on.",
            "default": false
          },
          "pegTypes": {
            "title": "Peg types",
            "type": "array",
            "description": "Stablecoins mode. For example peggedUSD, peggedEUR, peggedVAR.",
            "items": {
              "type": "string"
            }
          },
          "mechanisms": {
            "title": "Peg mechanisms",
            "type": "array",
            "description": "Stablecoins mode. For example fiat-backed, crypto-backed, algorithmic.",
            "items": {
              "type": "string"
            }
          },
          "minCirculatingUsd": {
            "title": "Minimum supply (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Stablecoins mode."
          },
          "onlyDepegged": {
            "title": "Only off the peg",
            "type": "boolean",
            "description": "Stablecoins mode. Keep dollar stablecoins whose price is away from 1 dollar by at least the threshold below.",
            "default": false
          },
          "depegThresholdPct": {
            "title": "Peg threshold (%)",
            "minimum": 0,
            "type": "number",
            "description": "Stablecoins mode. Distance from the peg that counts as off the peg.",
            "default": 0.5
          },
          "dateFrom": {
            "title": "Hacks from date",
            "type": "string",
            "description": "Hacks mode. Start date in the form 2026-01-01."
          },
          "dateTo": {
            "title": "Hacks to date",
            "type": "string",
            "description": "Hacks mode. End date in the form 2026-10-31."
          },
          "minAmountUsd": {
            "title": "Minimum amount lost (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Hacks mode."
          },
          "classifications": {
            "title": "Hack classifications",
            "type": "array",
            "description": "Hacks mode. For example Infrastructure, Smart Contract Language, Protocol Logic, Governance.",
            "items": {
              "type": "string"
            }
          },
          "techniques": {
            "title": "Hack techniques",
            "type": "array",
            "description": "Hacks mode. Part of the technique, for example private key, reentrancy, flash loan, oracle.",
            "items": {
              "type": "string"
            }
          },
          "targetTypes": {
            "title": "Target types",
            "type": "array",
            "description": "Hacks mode. For example CeFi, Bridge, Token, Contract.",
            "items": {
              "type": "string"
            }
          },
          "bridgeHacksOnly": {
            "title": "Bridge hacks only",
            "type": "boolean",
            "description": "Hacks mode.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}