{
  "openapi": "3.0.1",
  "info": {
    "title": "CoinGecko Scraper - Crypto Prices, Markets, NFTs & Exchanges",
    "description": "Scrape CoinGecko crypto data: coin prices & markets (caps, volume, 1h/24h/7d/30d change, ATH/ATL, supply, sparkline), full coin profiles, historical OHLC, exchanges, derivatives, NFT collections, categories, trending, global market data & public-company treasuries. Monitoring mode. JSON, CSV, Excel.",
    "version": "0.1",
    "x-build-id": "peQ37GjtfzDh6DkiD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~coingecko-crypto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-coingecko-crypto-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/scrapesage~coingecko-crypto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-coingecko-crypto-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/scrapesage~coingecko-crypto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-coingecko-crypto-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "coins",
              "coinHistory",
              "exchanges",
              "derivatives",
              "categories",
              "nfts",
              "trending",
              "global",
              "companyTreasuries"
            ],
            "type": "string",
            "description": "<b>Coins & prices</b> = live market data for the top coins or any coins you choose (the default). <b>Historical OHLC & chart</b> = candles + price/volume history for specific coins. <b>Exchanges</b> / <b>Derivatives</b> = trading venues with trust score & volume. <b>Categories</b> = crypto sectors (L1, DeFi, memes…) with market cap. <b>NFT collections</b> = floor price, volume & holders. <b>Trending</b> = what's hot right now. <b>Global market</b> = total market cap, BTC dominance & DeFi. <b>Company treasuries</b> = public companies holding BTC/ETH.",
            "default": "coins"
          },
          "searchQueries": {
            "title": "Coin search queries",
            "type": "array",
            "description": "Coin names or symbols to resolve to CoinGecko ids, e.g. <code>bitcoin</code>, <code>solana</code>, <code>pepe</code>, <code>chainlink</code>. Used by the <b>Coins</b> and <b>Historical</b> modes. Leave empty in Coins mode to get the top coins by market cap.",
            "items": {
              "type": "string"
            }
          },
          "coinIds": {
            "title": "Coin IDs (exact CoinGecko ids)",
            "type": "array",
            "description": "Exact CoinGecko coin ids (the slug in the coin's URL), e.g. <code>bitcoin</code>, <code>ethereum</code>, <code>matic-network</code>, <code>shiba-inu</code>. Faster and more precise than search queries.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Direct CoinGecko URLs: coins (<code>coingecko.com/en/coins/bitcoin</code>), exchanges (<code>/en/exchanges/binance</code>), NFTs (<code>/en/nft/pudgy-penguins</code>) or categories (<code>/en/categories/meme-token</code>). Routed automatically by type.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "category": {
            "title": "Category filter (Coins mode)",
            "type": "string",
            "description": "Limit Coins mode to one CoinGecko category id, e.g. <code>layer-1</code>, <code>decentralized-finance-defi</code>, <code>meme-token</code>, <code>artificial-intelligence</code>, <code>real-world-assets-rwa</code>. Run <b>Categories</b> mode to discover ids."
          },
          "vsCurrency": {
            "title": "Quote currency",
            "type": "string",
            "description": "Currency to price everything in, e.g. <code>usd</code>, <code>eur</code>, <code>gbp</code>, <code>jpy</code>, <code>btc</code>, <code>eth</code>. Defaults to USD.",
            "default": "usd"
          },
          "order": {
            "title": "Sort order (Coins mode)",
            "enum": [
              "market_cap_desc",
              "market_cap_asc",
              "volume_desc",
              "volume_asc",
              "id_asc"
            ],
            "type": "string",
            "description": "How to order the top-coins list when not querying specific coins.",
            "default": "market_cap_desc"
          },
          "historyDays": {
            "title": "History window (Historical mode)",
            "enum": [
              "1",
              "7",
              "14",
              "30",
              "90",
              "180",
              "365",
              "max"
            ],
            "type": "string",
            "description": "How far back to fetch candles & price history for each coin.",
            "default": "30"
          },
          "treasuryCoins": {
            "title": "Treasury coins (Company treasuries mode)",
            "type": "array",
            "description": "Which coins' public-company holdings to fetch. CoinGecko tracks <code>bitcoin</code> and <code>ethereum</code>.",
            "default": [
              "bitcoin",
              "ethereum"
            ],
            "items": {
              "type": "string"
            }
          },
          "enrichCoinDetails": {
            "title": "Fetch full coin profiles (description, links, socials, dev & community stats)",
            "type": "boolean",
            "description": "In Coins mode, fetch each coin's full profile: description, contract addresses across chains, categories, project links (website, whitepaper, Twitter/X, Telegram, Reddit, GitHub), sentiment votes, community size and developer activity. Adds one API call per coin. Great for project research & crypto-project leads.",
            "default": false
          },
          "enrichExchangeDetails": {
            "title": "Fetch full exchange profiles (socials, centralization, ticker count)",
            "type": "boolean",
            "description": "In Exchanges mode, fetch each exchange's full profile: socials (Twitter/X, Reddit, Telegram, Facebook), website, whether it's centralized, and how many trading pairs it lists. Adds one API call per exchange.",
            "default": false
          },
          "includeSparkline": {
            "title": "Include 7-day price sparkline (Coins mode)",
            "type": "boolean",
            "description": "Attach the 7-day price sparkline array to each coin record.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of records to scrape in this run. For Coins/Exchanges/NFTs this is the number of items; for Company treasuries it caps total summary + per-company rows.",
            "default": 100
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip records already emitted in this run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember ids across runs in a named key-value store and emit ONLY records not seen before — e.g. new coins entering the top list, newly listed NFT collections, new exchanges or new companies adding crypto to their treasury. Perfect for new-listing alerts. Works with Apify Schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch so different monitors don't share state.",
            "default": "default"
          },
          "demoApiKey": {
            "title": "CoinGecko Demo API key (optional)",
            "type": "string",
            "description": "Optional free CoinGecko <b>Demo</b> API key for higher rate limits & smoother large runs. Get one free at coingecko.com/en/api. Leave blank to run keyless (the actor rotates proxy IPs to spread the free per-IP limit)."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel requests. CoinGecko's free tier is rate-limited per IP — keep this low (2–4) unless you supply a Demo API key.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy rotates IPs so the free CoinGecko rate limit is spread across many addresses.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}