# CoinGecko Crypto Market Data Scraper (`mangudai/coingecko-crypto-market-scraper`) Actor

Scrape live cryptocurrency prices and market data from the public CoinGecko API. No key, no login. Get ranked coins by market cap, look up specific coins, filter by sector, or search by keyword, with 30+ fields per coin.

- **URL**: https://apify.com/mangudai/coingecko-crypto-market-scraper.md
- **Developed by:** [Mangudäi](https://apify.com/mangudai) (community)
- **Categories:** Developer tools, E-commerce, Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 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.

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 crypto market data scraper

Pull live cryptocurrency prices and market data straight from the public CoinGecko API. No API key, no login, no captcha. Point it at the top coins by market cap, a specific list of coins, a single sector, or a keyword search, and get one clean row per coin.

It runs on CoinGecko's own JSON API (api.coingecko.com), the same data behind coingecko.com, so the output stays accurate and the actor stays simple to maintain. Traffic routes through Apify Proxy and every retry rotates to a fresh IP, which keeps CoinGecko's per-IP rate limit from stalling a run.

### What it does

Three modes, one actor:

- **markets** returns coins ranked by market cap (or volume), with full price and market data. This is the default. Filter to one sector with a category id, or pass a list of coin ids to fetch only those.
- **search** takes keywords, resolves each to matching coins, and returns their market rows.
- **categories** returns CoinGecko's crypto sectors (Layer 1, meme tokens, Solana ecosystem, and so on) with sector market cap, 24h change, and volume.

### Output fields (markets and search)

Each coin row carries: id, symbol, name, rank, price, marketCap, fullyDilutedValuation, volume24h, high24h, low24h, priceChange24h, priceChangePercent1h, priceChangePercent24h, priceChangePercent7d, priceChangePercent30d, marketCapChange24h, marketCapChangePercent24h, circulatingSupply, totalSupply, maxSupply, ath, athChangePercent, athDate, atl, atlChangePercent, atlDate, roiTimes, image, vsCurrency, lastUpdated, and coingeckoUrl.

Category rows carry: id, name, marketCap, marketCapChangePercent24h, volume24h, top3CoinIds, top3CoinImages, description, and updatedAt.

### Input

| Field | What it does |
| --- | --- |
| mode | markets, search, or categories |
| vsCurrency | quote currency, for example usd, eur, btc, eth |
| order | ranking for markets mode (market cap or volume, either direction) |
| maxItems | cap on rows returned; markets mode paginates 250 per page |
| coinIds | optional coin ids for markets mode, for example bitcoin, ethereum, solana |
| category | optional category id to restrict markets to one sector |
| searchQueries | keywords for search mode |
| proxyConfiguration | Apify Proxy settings, on by default |

### Example

The default run returns the top 100 coins by market cap in USD. A quick config to track a short watchlist:

```json
{
  "mode": "markets",
  "vsCurrency": "usd",
  "coinIds": ["bitcoin", "ethereum", "solana", "dogecoin"]
}
```

### Notes

CoinGecko's free API rate-limits by IP. The actor spreads requests across rotating Apify Proxy sessions and retries any 429 with exponential backoff, so most runs finish clean. Very large pulls (thousands of coins) take longer because pages are fetched politely rather than all at once. Prices come straight from CoinGecko and are only as fresh as CoinGecko's own updates, which is roughly once a minute.

# Actor input Schema

## `mode` (type: `string`):

markets returns ranked coins with price and market data. search resolves keywords to coins. categories returns crypto sector market data.

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

Currency prices are quoted in, for example usd, eur, btc, eth.

## `order` (type: `string`):

How coins are ranked in markets mode.

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

Maximum coins (markets/search) or categories to return. Markets mode paginates 250 per page.

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

Optional CoinGecko coin ids to fetch instead of the top ranked list, for example bitcoin, ethereum, solana. Leave empty for the ranked list.

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

Optional CoinGecko category id to restrict markets to one sector, for example solana-ecosystem, layer-1, meme-token.

## `searchQueries` (type: `array`):

Keywords to resolve to coins in search mode, for example dogecoin, arbitrum.

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

Apify Proxy rotates the IP on each retry, which avoids CoinGecko per-IP rate limits.

## Actor input object example

```json
{
  "mode": "markets",
  "vsCurrency": "usd",
  "order": "market_cap_desc",
  "maxItems": 100,
  "coinIds": [],
  "searchQueries": [
    "dogecoin"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `coins` (type: `string`):

The scraped coins, categories, or search results.

# 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": [],
    "searchQueries": [
        "dogecoin"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mangudai/coingecko-crypto-market-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": [],
    "searchQueries": ["dogecoin"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("mangudai/coingecko-crypto-market-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": [],
  "searchQueries": [
    "dogecoin"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call mangudai/coingecko-crypto-market-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/sFwu9ZHKxfVKRhKPw/builds/yjPa4H6a3iDRq64KT/openapi.json
