# CoinGecko Scraper: Prices, Market Caps & Volume (`arman-bd/coingecko-crypto-scraper`) Actor

Scrape CoinGecko market data: price, market cap, 24h volume, supply, all-time highs and price changes across multiple windows. 17,000+ assets, no key on the public tier.

- **URL**: https://apify.com/arman-bd/coingecko-crypto-scraper.md
- **Developed by:** [Arman Hossain](https://apify.com/arman-bd) (community)
- **Categories:** Business, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.37 / 1,000 data scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## CoinGecko Scraper: Prices, Market Caps & Volume

![CoinGecko Scraper: Price, market cap, 24h volume, supply, all-time highs and price changes across multiple windows, for any coin](https://api.apify.com/v2/key-value-stores/ZQOcNAOHrIgTacAmy/records/coingecko-crypto-scraper.jpg)

**Agent skill: [SKILL.md](https://api.apify.com/v2/key-value-stores/t7YoTxpZEJOWvw4Ug/records/coingecko-crypto-scraper.md)**

```
https://api.apify.com/v2/key-value-stores/t7YoTxpZEJOWvw4Ug/records/coingecko-crypto-scraper.md
```

### What it does

Scrape CoinGecko market data: price, market cap, 24h volume, supply, all-time highs and price changes across multiple windows. 17,000+ assets, no key on the public tier. Give it `coinIds` and it returns one structured record per coin.

You can drive it three ways:

- **By coin.** Pass `coinIds` (`["bitcoin", "ethereum", "solana"]`) and get exactly those assets.
- **By category.** Pass `category` (`"layer-1"`, `"stablecoins"`, `"meme-token"`) and get that whole slice ranked by market cap.
- **By rank.** Pass neither and get the top `maxCoins` assets by market cap.

Everything is quoted in whichever of CoinGecko's 63 supported currencies you name, fiat (`usd`, `eur`, `gbp`, `jpy`) or crypto (`btc`, `eth`).

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `coinIds` | array | `[]` | CoinGecko **IDs**, not ticker symbols, the slug in the coin URL (`coingecko.com/en/coins/bitcoin` → `bitcoin`). Full CoinGecko URLs are accepted and normalised automatically. Empty = take the top coins by market cap. |
| `vsCurrency` | string | `"usd"` | Quote currency for every price, market cap and volume figure. One of CoinGecko's 63 supported quote currencies. An unsupported value makes the API return HTTP 400. |
| `category` | string | - | Restrict to one CoinGecko category, e.g. `layer-1`, `stablecoins`, `decentralized-finance-defi`. **Ignored when `coinIds` is set.** An unknown category returns HTTP 404 and is recorded as a failure. |
| `priceChangeWindows` | array | `["1h","24h","7d","30d","1y"]` | Extra price-change percentages to request, returned in `priceChanges`. Allowed: `1h`, `24h`, `7d`, `14d`, `30d`, `200d`, `1y`. `24h` is always included. Unknown values are warned about and dropped. |
| `maxCoins` | integer | `250` | Total cap on saved coins. Coins arrive 250 per request, so 1,000 coins = 4 requests ≈ 9 s of built-in rate-limit delay. |

#### Which combinations make sense

- `coinIds` **and** `category` together: `category` is ignored. Pick one.
- `coinIds` **and** `maxCoins`: the ID list is truncated to `maxCoins` before fetching.
- `category` **and** `maxCoins`: the category is paged until the cap is met or the category runs out (a 300-coin cap on `layer-1` returned 300 of 409 available).
- IDs that do not exist are silently dropped by CoinGecko. The Actor detects this and lists them in `RUN_SUMMARY.unknownCoinIds`.

#### Example input

```json
{
 "coinIds": ["bitcoin", "ethereum", "solana"],
 "vsCurrency": "usd",
 "priceChangeWindows": ["1h", "24h", "7d", "30d", "1y"],
 "maxCoins": 250
}
```

### Output

One dataset item per coin. A real record, exactly as produced by a live run:

```json
{
 "id": "bitcoin", // CoinGecko ID, stable join key
 "symbol": "BTC", // ticker, upper-cased
 "name": "Bitcoin", // display name
 "vsCurrency": "usd", // quote currency for every figure below
 "currentPrice": 64530, // last price
 "marketCap": 1294891648024, // circulating supply × price
 "marketCapRank": 1, // global rank by market cap
 "fullyDilutedValuation": 1294891648024, // max supply × price; null when max supply is unknown
 "totalVolume": 22208254108, // 24h traded volume
 "high24h": 64933, // 24h high
 "low24h": 63878, // 24h low
 "priceChange24h": 38.08, // absolute 24h move
 "priceChangePercentage24h": 0.7, // percentage 24h move
 "priceChanges": { // one entry per requested window, in %
 "24h": 0.7,
 "1h": -0.1,
 "7d": 0,
 "30d": 2.1,
 "1y": -43.4
 },
 "circulatingSupply": 20066496, // coins in circulation
 "totalSupply": 20066496, // issued supply
 "maxSupply": 21000000, // hard cap; null when uncapped (e.g. ETH)
 "ath": 126080, // all-time high in the quote currency
 "athDate": "2025-10-06T10:57:42.000Z", // when the ATH was set
 "atl": 67.81, // all-time low
 "lastUpdated": "2026-08-06T11:25:20.000Z",// CoinGecko's own data timestamp
 "scrapedAt": "2026-08-06T11:27:19.911Z" // when this Actor read it
}
```

Every numeric field is `null` rather than `0` when CoinGecko has no value, so an uncapped token gets `"maxSupply": null`, and you can tell "no data" apart from "zero".

#### `RUN_SUMMARY`

Written to the default key-value store at the end of every run:

```json
{
 "requestsMade": 1,
 "requestsFailed": 0,
 "failures": [],
 "coinsRequested": 5,
 "coinsReturnedByApi": 4,
 "coinsSaved": 4,
 "unknownCoinIds": ["notarealcoin"],
 "filters": {
 "vsCurrency": "usd",
 "category": null,
 "priceChangeWindows": ["24h", "1h", "7d", "30d", "1y"],
 "maxCoins": 10
 },
 "finishedAt": "2026-08-06T11:27:19.916Z"
}
```

`failures` holds one `{ request, error }` entry per request that could not be recovered, a rate-limit wall, a 404 category, a network drop. The run continues past them.

### Use cases

#### 1. Build a crypto portfolio tracker

Poll the exact assets you hold, in your reporting currency, on a schedule.

```json
{
 "coinIds": ["bitcoin", "ethereum", "solana", "chainlink", "uniswap"],
 "vsCurrency": "eur",
 "priceChangeWindows": ["24h", "7d", "30d"]
}
```

Multiply `currentPrice` by your position size; `priceChanges` gives you the period P\&L columns for free.

#### 2. Screen assets by market cap and volume

Pull a whole category and filter it downstream on `marketCap`, `totalVolume` and `priceChanges["7d"]`.

```json
{
 "category": "layer-1",
 "vsCurrency": "usd",
 "priceChangeWindows": ["24h", "7d", "30d"],
 "maxCoins": 300
}
```

A liquidity screen is one expression away: `totalVolume / marketCap > 0.05`.

#### 3. Feed a market-data dashboard

Take the top of the market in one sweep and refresh it hourly.

```json
{
 "vsCurrency": "usd",
 "maxCoins": 1000,
 "priceChangeWindows": ["1h", "24h", "7d", "30d", "1y"]
}
```

`marketCapRank` is already sorted, `lastUpdated` tells you how stale CoinGecko's own tick is, and `scrapedAt` tells you how stale your copy is.

### Limits and behaviour

- **Public tier rate limit.** CoinGecko's free API allows roughly 10-30 calls/minute and throttles hard above it. The Actor batches through the `/coins/markets` endpoint, **250 coins per request, never one call per coin**, and waits 3 s between requests (~20 req/min). A 1,000-coin run is 4 requests.
- **429 backoff.** A rate-limit response is retried up to 3 times. If CoinGecko sends `Retry-After`, that value is honoured exactly; otherwise the Actor waits 15 s, then 30 s. Transient 5xx errors use a shorter 1 s / 2 s linear backoff.
- **Failures never abort the run.** A failed page is logged, recorded in `RUN_SUMMARY.failures`, and the Actor moves on. It only throws when *every* request failed.
- **Unknown IDs are dropped, not fatal.** CoinGecko silently omits IDs it does not recognise. The Actor diffs requested against returned and reports the gap in `RUN_SUMMARY.unknownCoinIds`.
- **Unknown categories are fatal for that request.** CoinGecko answers 404; there is nothing to retry, so it fails fast and is recorded.
- **Deduplication.** A coin is saved once per run even if it appears in overlapping pages.
- **`maxCoins` is honoured across pages.** Fetching stops as soon as the cap is met, no wasted requests, no wasted spend.
- **Public data only.** No authentication, no personal data, no access-control bypass.

### FAQ

**Do I need a proxy?** No. Proxy configuration is not required to run this Actor.

**Do I need a CoinGecko account or API key?** No. You supply no credentials.

**What happens if CoinGecko is unavailable?** The failing request is retried, then recorded in `RUN_SUMMARY.failures`, and the run continues with whatever else succeeded. The run only errors out if every request failed.

**Can I schedule it?** Yes, it is designed for scheduled runs. Hourly at 250-1,000 coins is comfortably inside the free tier's limits.

**Where do I find a coin's ID?** It is the last path segment of its CoinGecko URL: `coingecko.com/en/coins/avalanche-2` → `avalanche-2`. Note that IDs often differ from tickers (`AVAX` is `avalanche-2`, `MATIC` is `matic-network`). You can also paste the full URL, the Actor extracts the ID.

**Why is `fullyDilutedValuation` null?** Because CoinGecko has no max supply for that asset. Same reason `maxSupply` is null for Ethereum.

**Can I get historical prices?** Not from this Actor, `/coins/markets` is a point-in-time snapshot. Schedule it and store the results; `lastUpdated` and `scrapedAt` give you clean time series keys.

**Can I integrate it with something else?** Yes, Apify API, client libraries, webhooks, scheduled runs, dataset exports (JSON/CSV/Excel) or MCP. Output is structured JSON.

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/arman-bd~coingecko-crypto-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{
 "coinIds": ["bitcoin", "ethereum", "solana"],
 "vsCurrency": "usd"
 }'
```

### JavaScript example

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('arman-bd/coingecko-crypto-scraper').call({
 category: 'layer-1',
 vsCurrency: 'usd',
 maxCoins: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const c of items) console.log(`#${c.marketCapRank} ${c.name}, ${c.currentPrice} (${c.priceChanges['24h']}% 24h)`);
```

# Actor input Schema

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

CoinGecko coin IDs. the slug in the coin's CoinGecko URL (coingecko.com/en/coins/bitcoin → 'bitcoin'). Not ticker symbols. Leave empty to take the top coins by market cap instead.

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

Currency every price, market cap and volume figure is denominated in. Any of CoinGecko's 63 supported quote currencies. fiat (usd, eur, gbp, jpy) or crypto (btc, eth).

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

Restrict to one CoinGecko category, e.g. 'layer-1', 'stablecoins', 'decentralized-finance-defi', 'meme-token'. Ignored when Coin IDs are given. An unknown category makes the API return 404.

## `priceChangeWindows` (type: `array`):

Extra price-change percentages to request, returned in the 'priceChanges' object. The 24h window is always included.

## `maxCoins` (type: `integer`):

Cap on how many coins are saved in total. Coins are fetched 250 per request, so a higher cap means more requests and a slower run on the rate-limited public tier.

## Actor input object example

```json
{
  "coinIds": [
    "bitcoin",
    "ethereum",
    "ripple"
  ],
  "vsCurrency": "usd",
  "category": "layer-1",
  "priceChangeWindows": [
    "1h",
    "24h",
    "7d"
  ],
  "maxCoins": 250
}
```

# Actor output Schema

## `items` (type: `string`):

Every record the run produced.

## `runsummary` (type: `string`):

The RUN\_SUMMARY record from the run's key-value store.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arman-bd/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",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("arman-bd/coingecko-crypto-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 '{
  "coinIds": [
    "bitcoin",
    "ethereum",
    "solana"
  ]
}' |
apify call arman-bd/coingecko-crypto-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,arman-bd/coingecko-crypto-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/3OJcwblGxTipwnQsf/builds/f2WTDtfDqwg6ZXJdN/openapi.json
