# CoinGecko Crypto Scraper — Prices, Market Cap & Market Data (`haketa/coingecko-scraper`) Actor

Scrape crypto market data from CoinGecko: price, market cap and rank, 24h volume, 1h/24h/7d/30d/1y change, ATH/ATL, supply and more. Search by coin, ID, category or trending, in any currency. For price tracking, dashboards and research. Not affiliated with CoinGecko.

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

## Pricing

from $1.75 / 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

## CoinGecko Crypto Scraper — Prices, Market Cap & Market Data

> **Scrape live crypto market data for thousands of coins: price, market cap and rank, 24h volume, 1h/24h/7d/30d/1y price change, ATH/ATL, circulating & max supply and more — in any currency.** Get the top coins by market cap, filter by category, search by name, pass coin IDs, or pull trending coins. Clean JSON/CSV/Excel in seconds. Built for price tracking, dashboards, portfolios and research.

[![CoinGecko](https://img.shields.io/badge/CoinGecko-Market%20Data-8dc63f)]()
[![Prices + Market Cap](https://img.shields.io/badge/Prices%20%2B%20Market%20Cap-2da44e)]()
[![Any Currency](https://img.shields.io/badge/Any%20Currency-8250df)]()
[![Export](https://img.shields.io/badge/Export-JSON%20%2F%20CSV%20%2F%20Excel-fb8500)]()

***

### What This Actor Does

Pull rich market data for any set of cryptocurrencies. Each coin comes back as one clean record:

- **Price & market cap** — current price, market cap, **market-cap rank**, fully diluted valuation
- **Volume & range** — 24h volume, 24h high/low
- **Performance** — price change over **1h, 24h, 7d, 30d and 1y**, plus 24h market-cap change
- **Supply** — circulating, total and max supply
- **All-time** — ATH and ATL with dates and % from each
- **Meta** — symbol, logo, currency, trending flag, CoinGecko URL and data timestamp

Five ways to select coins:

1. **Top by market cap** (default) — leave inputs empty.
2. **Category** — e.g. `layer-1`, `meme-token`, `artificial-intelligence`.
3. **Search** — by coin name or symbol.
4. **Coin IDs** — exact IDs like `bitcoin`, `ethereum`.
5. **Trending** — the current trending coins.

Prices come in **any currency** (USD, EUR, GBP, TRY, BTC…).

***

### Why Use This

- **Track prices & market caps** across thousands of coins on a schedule, in your currency.
- **Build dashboards & portfolios** with ranks, volume, supply and multi-period performance.
- **Research sectors** by category (L1s, memes, AI, DeFi…) and spot trending coins.
- **Clean and fast.** Reads CoinGecko's public API — no key, no login, no browser.

***

### Quick Start

#### Run it in the console (no code)

1. Leave inputs empty for the **top coins**, or add a **category**, **searches**, **coin IDs**, or toggle **trending**.
2. Pick a **currency**, set **Max coins**, click **Start**.
3. Export as **JSON, CSV, Excel or HTML**, or push to Sheets, a webhook or a database.

#### Top 500 coins (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("YOUR_USERNAME/coingecko-scraper").call(run_input={"maxItems": 500, "vsCurrency": "usd"})

for c in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(c["marketCapRank"], c["symbol"], c["currentPrice"], c["priceChangePercentage24h"], "%")
```

#### A sector + trending (Python)

```python
run = client.actor("YOUR_USERNAME/coingecko-scraper").call(run_input={
    "category": "artificial-intelligence", "includeTrending": True, "vsCurrency": "eur",
})
```

***

### Input Parameters

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | Coin names/symbols to search. |
| `coinIds` | array | Exact CoinGecko coin IDs (e.g. `bitcoin`). |
| `category` | string | Category ID (e.g. `layer-1`, `meme-token`). |
| `includeTrending` | boolean | Also include the current trending coins. |
| `vsCurrency` | string | Quote currency (e.g. `usd`, `eur`, `try`, `btc`). |
| `maxItems` | integer | Max coins. `0` = no limit. Empty searches = top coins by market cap. |
| `maxPages` | integer | Pagination cap for top/category modes (250 per page). |
| `proxyConfiguration` | object | Apify Proxy. Datacenter is enough (public API). |

***

### Output

Each coin is one record:

```json
{
  "id": "bitcoin", "symbol": "BTC", "name": "Bitcoin",
  "currentPrice": 86294, "marketCap": 1733815420370, "marketCapRank": 1,
  "totalVolume": 39437028591, "high24h": 86794, "low24h": 83457,
  "priceChangePercentage1h": 0.16, "priceChangePercentage24h": 2.81,
  "priceChangePercentage7d": 2.34, "priceChangePercentage30d": 12.43, "priceChangePercentage1y": -27.22,
  "circulatingSupply": 20092375, "maxSupply": 21000000,
  "ath": 126080, "athDate": "2025-10-06T10:57:42.000Z",
  "atl": 67.81, "atlDate": "2013-07-05T16:00:00.000Z",
  "isTrending": false, "vsCurrency": "usd",
  "url": "https://www.coingecko.com/en/coins/bitcoin"
}
```

***

### Use Cases

#### 1. Price & market-cap tracking

Snapshot prices, ranks and volume for thousands of coins on a schedule, in any currency.

#### 2. Dashboards & portfolios

Feed ranks, performance and supply into dashboards, sheets or portfolio tools.

#### 3. Sector & trend research

Pull a category (L1, meme, AI, DeFi) or the trending list to analyse a segment.

#### 4. Alerts & analytics

Watch 24h/7d changes or ATH distance for alerting and backtesting.

***

### Tips

- **Leave searches empty** for the top coins by market cap — the fastest way to a full table.
- **`category`** focuses on a sector; browse CoinGecko categories for IDs (e.g. `meme-token`).
- **`vsCurrency`** re-prices everything — compare the same coins across currencies.
- **`priceChangePercentage7d` / `30d` / `1y`** give momentum beyond 24h.
- **Schedule it** with Apify Schedules for recurring market snapshots.

***

### Frequently Asked Questions

**Do I need an account or key?**
No. The CoinGecko public API is free and keyless — no login or anti-bot.

**Which currencies are supported?**
Fiat (USD, EUR, GBP, TRY, JPY…) and crypto (BTC, ETH) quote currencies.

**How do I get a whole sector?**
Use `category` with a CoinGecko category ID such as `layer-1`, `meme-token` or `artificial-intelligence`.

**How fresh is the data?**
Each record includes `lastUpdated` from CoinGecko; prices are near real-time.

**What export formats are supported?**
JSON, CSV, Excel, HTML, or via API — plus Google Sheets, webhooks, Make and Zapier.

***

### Legal & Responsible Use

This Actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by CoinGecko.** It reads only public market data and is **not financial advice**. Use the data responsibly and in line with applicable terms and laws.

# Actor input Schema

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

Coin names or symbols to search (e.g. "solana", "bitcoin"). Resolved to coins automatically.

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

Exact CoinGecko coin IDs (e.g. bitcoin, ethereum, solana).

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

Filter by a CoinGecko category ID (e.g. layer-1, meme-token, artificial-intelligence).

## `includeTrending` (type: `boolean`):

Also include the current trending coins.

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

Quote currency for prices (e.g. usd, eur, gbp, try, btc).

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

Maximum coins to return. 0 = no limit. Leave searches empty to get the top coins by market cap.

## `maxPages` (type: `integer`):

Pagination cap for top-market and category modes (250 per page).

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

Apify Proxy. The API is public — datacenter is enough and enabled by default (rotating IPs avoid rate limits).

## Actor input object example

```json
{
  "includeTrending": false,
  "vsCurrency": "usd",
  "maxItems": 250,
  "maxPages": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `id` (type: `string`):

CoinGecko coin ID

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

Ticker symbol

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

Coin name

## `image` (type: `string`):

Logo URL

## `currentPrice` (type: `string`):

Current price

## `marketCap` (type: `string`):

Market cap

## `marketCapRank` (type: `string`):

Market cap rank

## `fullyDilutedValuation` (type: `string`):

Fully diluted val.

## `totalVolume` (type: `string`):

24h volume

## `high24h` (type: `string`):

24h high

## `low24h` (type: `string`):

24h low

## `priceChange24h` (type: `string`):

24h price change

## `priceChangePercentage1h` (type: `string`):

1h % change

## `priceChangePercentage24h` (type: `string`):

24h % change

## `priceChangePercentage7d` (type: `string`):

7d % change

## `priceChangePercentage30d` (type: `string`):

30d % change

## `priceChangePercentage1y` (type: `string`):

1y % change

## `marketCapChangePercentage24h` (type: `string`):

Market cap 24h %

## `circulatingSupply` (type: `string`):

Circulating supply

## `totalSupply` (type: `string`):

Total supply

## `maxSupply` (type: `string`):

Max supply

## `ath` (type: `string`):

All-time high

## `athChangePercentage` (type: `string`):

From ATH %

## `athDate` (type: `string`):

ATH date

## `atl` (type: `string`):

All-time low

## `atlDate` (type: `string`):

ATL date

## `isTrending` (type: `string`):

Currently trending

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

Quote currency

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

CoinGecko URL

## `lastUpdated` (type: `string`):

Data timestamp

## `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/coingecko-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/coingecko-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/coingecko-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/coingecko-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/qvKhPNRhZwkNolyFY/builds/e36UlMZmbPn0csTQ9/openapi.json
