# 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, 96.3% 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/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 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(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": [],
  "searchQueries": [
    "dogecoin"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call mangudai/coingecko-crypto-market-scraper --silent --output-dataset

```

## MCP server setup

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