# CoinGecko Crypto Data Scraper (`devilscrapes/coingecko-crypto-scraper`) Actor

Pull rich market data for any crypto asset — price, 24h change, market cap, volume, supply, ATH/ATL, exchanges, and on-chain stats. Built on CoinGecko's public API (free demo tier). One row per coin.

- **URL**: https://apify.com/devilscrapes/coingecko-crypto-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## CoinGecko Crypto Data Scraper

**💰 $2.00 / 1 000 results** &nbsp;·&nbsp; pay only for results &nbsp;·&nbsp; no credit card to try

_We do the dirty work so your dataset stays clean._ 😈

Pull rich market data for any crypto asset — price, 24h change, market cap, volume, supply, ATH/ATL, exchanges, and on-chain stats. We handle the rate limits, retries, fingerprint rotation, and proxy routing — you get one clean typed row per coin, on a schedule, exported wherever your stack lives.

</div>

---

### 🎯 What this scrapes

CoinGecko covers 14 000+ crypto assets with deep market data. This Actor takes a list of coin IDs (e.g. <code>bitcoin</code>, <code>ethereum</code>), absorbs the upstream's rate limits and transient errors with backoff, and writes one row per coin — current price in USD + your chosen vs currency, 24h price change, market cap, volume, circulating supply, ATH/ATL with dates, sentiment, and exchange listing count. Run it once for a snapshot or on a schedule for a time-series — we keep the connection honest so your dataset stays clean.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes so the target sees a browser, not Python.
- 🌐 **Residential proxy rotation** via Apify Proxy — fresh session and exit IP on every block.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, `Retry-After` honoured.
- 🧱 **Rate-limit-aware pacing** — when the target pushes back, we slow down instead of getting banned.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **Portfolio tracker** — schedule a daily run with your watch list, pipe to a spreadsheet.
- **Alerting** — diff successive runs, alert when 24h change crosses a threshold.
- **Research** — pull 50 coins by market cap rank, feed into a trading-strategy backtest.
- **Tax reporting** — daily price snapshots stored for capital-gains math.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `coinIds` | `array` | **yes** | ['bitcoin', 'ethereum', 'solana'] | List of CoinGecko coin IDs (lowercase slugs). Find them at coingecko.com — the slug in the URL. Examples: <code>bitcoin< |
| `vsCurrency` | `string` | no | 'eur' | ISO currency code (lowercase) to add alongside USD — e.g. <code>eur</code>, <code>gbp</code>, <code>jpy</code>. USD is a |
| `includeDeveloperData` | `boolean` | no | False | Add GitHub forks/stars/commits where the coin has a linked repo. |
| `apiKey` | `string` | no | '—' | Optional — lifts the demo-tier limit from 10 req/min to your plan's quota. |
| `concurrency` | `integer` | no | 2 | Parallel coin lookups. Keep low on the demo tier (10 req/min ceiling). |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | Optional. CoinGecko sometimes rate-limits aggressive scrapers — Apify Proxy with rotating sessions helps in that case. |

#### Example input

```json
{
  "coinIds": [
    "bitcoin",
    "ethereum"
  ],
  "vsCurrency": "eur",
  "concurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
````

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `coin_id` | `string` | CoinGecko coin slug. |
| `symbol` | `string` | Ticker symbol. |
| `name` | `string` | Coin display name. |
| `image_url` | `['string', 'null']` | Coin logo (large) URL. |
| `current_price_usd` | `['number', 'null']` | Current price in USD. |
| `current_price_vs` | `['number', 'null']` | Current price in the secondary `vsCurrency`. |
| `vs_currency` | `string` | Secondary currency code used. |
| `price_change_24h_pct` | `['number', 'null']` | 24h price change percent. |
| `price_change_7d_pct` | `['number', 'null']` | 7d price change percent. |
| `price_change_30d_pct` | `['number', 'null']` | 30d price change percent. |
| `market_cap_usd` | `['number', 'null']` | Market cap in USD. |
| `market_cap_rank` | `['integer', 'null']` | Market cap rank across all coins. |
| `total_volume_usd` | `['number', 'null']` | 24h trading volume in USD. |
| `circulating_supply` | `['number', 'null']` | Circulating supply. |
| `total_supply` | `['number', 'null']` | Total supply. |
| `max_supply` | `['number', 'null']` | Maximum supply (null for unlimited). |
| `ath_usd` | `['number', 'null']` | All-time high in USD. |
| `ath_date` | `['string', 'null']` | ATH timestamp (ISO-8601). |
| `atl_usd` | `['number', 'null']` | All-time low in USD. |
| `atl_date` | `['string', 'null']` | ATL timestamp. |
| `sentiment_up_pct` | `['number', 'null']` | Community sentiment % bullish. |
| `exchanges_count` | `['integer', 'null']` | Number of exchanges listing this coin. |
| `github_stars` | `['integer', 'null']` | GitHub stars (when includeDeveloperData=true). |
| `github_forks` | `['integer', 'null']` | GitHub forks. |
| `coingecko_url` | `string` | Canonical CoinGecko URL. |
| `scraped_at` | `string` | When this row was recorded. |

#### Example output

```json
{
  "coin_id": "bitcoin",
  "symbol": "btc",
  "name": "Bitcoin",
  "current_price_usd": 71250.32,
  "current_price_vs": 65120.1,
  "vs_currency": "eur",
  "price_change_24h_pct": 2.41,
  "market_cap_usd": 1408000000000,
  "market_cap_rank": 1,
  "coingecko_url": "https://www.coingecko.com/en/coins/bitcoin"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.005 | One-off warm-up charge per run |
| `result` | $0.002 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$2.00**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

Demo tier is rate-limited (~10 req/min). For thousands of coins, attach a CoinGecko Pro key. Some fields are null for low-coverage coins.

### ❓ FAQ

**Is this real-time?**

CoinGecko's free API updates every ~60 seconds. For sub-second feeds, use an exchange WebSocket.

**What about historical OHLC?**

Out of scope here — see the sibling `coingecko-ohlc-scraper` (planned).

**Why am I getting 429s?**

The free tier caps you at ~10 req/min from a single IP. Slow concurrency or attach a Pro key.

**Can I filter by category?**

Pass the full ID list. Category enumeration is on the roadmap.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `coinIds` (type: `array`):

List of CoinGecko coin IDs (lowercase slugs). Find them at coingecko.com — the slug in the URL. Examples: <code>bitcoin</code>, <code>ethereum</code>, <code>solana</code>.

## `vsCurrency` (type: `string`):

ISO currency code (lowercase) to add alongside USD — e.g. <code>eur</code>, <code>gbp</code>, <code>jpy</code>. USD is always included.

## `includeDeveloperData` (type: `boolean`):

Add GitHub forks/stars/commits where the coin has a linked repo.

## `apiKey` (type: `string`):

Optional — lifts the demo-tier limit from 10 req/min to your plan's quota.

## `concurrency` (type: `integer`):

Parallel coin lookups. Keep low on the demo tier (10 req/min ceiling).

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

Optional. CoinGecko sometimes rate-limits aggressive scrapers — Apify Proxy with rotating sessions helps in that case.

## Actor input object example

```json
{
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "vsCurrency": "eur",
  "includeDeveloperData": false,
  "concurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "coinIds": [
        "bitcoin",
        "ethereum",
        "solana"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/coingecko-crypto-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 = {
    "coinIds": [
        "bitcoin",
        "ethereum",
        "solana",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

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

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

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

```

## CLI example

```bash
echo '{
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/coingecko-crypto-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=devilscrapes/coingecko-crypto-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "CoinGecko Crypto Data Scraper",
        "description": "Pull rich market data for any crypto asset — price, 24h change, market cap, volume, supply, ATH/ATL, exchanges, and on-chain stats. Built on CoinGecko's public API (free demo tier). One row per coin.",
        "version": "0.4",
        "x-build-id": "JVsc9xFxja7dxPWdO"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/devilscrapes~coingecko-crypto-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-devilscrapes-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/devilscrapes~coingecko-crypto-scraper/runs": {
            "post": {
                "operationId": "runs-sync-devilscrapes-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/devilscrapes~coingecko-crypto-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-devilscrapes-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",
                "required": [
                    "coinIds"
                ],
                "properties": {
                    "coinIds": {
                        "title": "CoinGecko coin IDs",
                        "type": "array",
                        "description": "List of CoinGecko coin IDs (lowercase slugs). Find them at coingecko.com — the slug in the URL. Examples: <code>bitcoin</code>, <code>ethereum</code>, <code>solana</code>.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "vsCurrency": {
                        "title": "Secondary quote currency",
                        "type": "string",
                        "description": "ISO currency code (lowercase) to add alongside USD — e.g. <code>eur</code>, <code>gbp</code>, <code>jpy</code>. USD is always included.",
                        "default": "eur"
                    },
                    "includeDeveloperData": {
                        "title": "Include developer stats",
                        "type": "boolean",
                        "description": "Add GitHub forks/stars/commits where the coin has a linked repo.",
                        "default": false
                    },
                    "apiKey": {
                        "title": "CoinGecko Pro API key (optional)",
                        "type": "string",
                        "description": "Optional — lifts the demo-tier limit from 10 req/min to your plan's quota."
                    },
                    "concurrency": {
                        "title": "Concurrent fetches",
                        "minimum": 1,
                        "maximum": 32,
                        "type": "integer",
                        "description": "Parallel coin lookups. Keep low on the demo tier (10 req/min ceiling).",
                        "default": 2
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Optional. CoinGecko sometimes rate-limits aggressive scrapers — Apify Proxy with rotating sessions helps in that case.",
                        "default": {
                            "useApifyProxy": 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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
