# CoinMarketCap Crypto Scraper (`khadinakbar/coinmarketcap-crypto-scraper`) Actor

Scrape CoinMarketCap rankings, coin details, trending coins, and global market metrics. HTTP-only, no API key, MCP-ready.

- **URL**: https://apify.com/khadinakbar/coinmarketcap-crypto-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Developer tools, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 market records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## CoinMarketCap Crypto Scraper

CoinMarketCap Crypto Scraper is an Apify Actor for analysts, developers, and AI agents that need structured CoinMarketCap market data from HTTP responses. It accepts a mode-driven input, returns one record per coin, exchange, or market snapshot depending on the selected dataset, and exposes useful fields such as rank, name, symbol, price, market cap, volume, percent change values, and URL. The Actor is usable through Apify MCP and is designed for workflows that need clean JSON rather than manual browsing.

### Best fit and connected workflows

This Actor fits workflows that start with a market view and then branch into a more specific investigation:

- Use `listing` mode when you want ranked coins by market cap, price, volume, or change fields.
- Use `detail` mode when you already know the coin slugs or symbols and want deeper per-coin statistics.
- Use `trending` mode when you want the current trending set, gainers, losers, and new entries in one pass.
- Use `global` mode when you need a snapshot of market-wide metrics such as total market cap and BTC or ETH dominance.
- Use `exchanges` mode when your workflow is centered on ranked exchanges by volume, score, and market count.

This is a good fit for dashboards, research pipelines, watchlist enrichment, and agent tools that need a single Apify Actor for multiple CoinMarketCap views.

### Practical scenario

Maya, a market analyst, starts with a list of coins from a team note: `bitcoin`, `ethereum`, and `solana`. She runs `detail` mode with those coin slugs. The returned records include each coin's name, symbol, price, market cap, percent change values, description, holders, platforms, URLs, and URL to the CoinMarketCap page. Maya uses the `holders`, `platforms`, and `urls` fields to decide which asset needs a deeper fundamentals review, then sends the chosen coin to a follow-up research step.

### Input

The Actor requires `mode`. Other fields refine how each mode is collected and sorted.

| Field | Type | Required | Description |
|---|---|---:|---|
| `mode` | string enum | Yes | Selects the CoinMarketCap dataset to scrape: `listing`, `detail`, `trending`, `global`, or `exchanges`. |
| `coins` | array of strings | Only in `detail` | Coin slugs or symbols for `detail` mode, such as `bitcoin` or `ETH`. |
| `maxResults` | integer | No | Maximum number of ranked coins or exchanges to return in `listing` and `exchanges` modes. |
| `convert` | string | No | Fiat or quote currency such as `USD`, `EUR`, `GBP`, or `JPY`. |
| `sortBy` | string enum | No | Sort field for `listing` and `exchanges` modes. |
| `sortDir` | string enum | No | Sort direction for `listing` and `exchanges` modes. |
| `proxyConfiguration` | object | No | Apify proxy settings. |

#### Focused input example

```json
{
  "mode": "detail",
  "coins": ["bitcoin", "ETH"],
  "convert": "USD",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Output

The dataset stores one record per coin in `listing`, `detail`, and `trending` modes, one record per exchange in `exchanges` mode, or one snapshot record in `global` mode. The views defined in the live contract emphasize overview and exchange records.

#### Output fields

| Field | Description |
|---|---|
| `mode` | Dataset mode for the returned record. |
| `rank` | Rank within the selected view, when present. |
| `name` | Coin or exchange name. |
| `symbol` | Coin symbol, when present. |
| `slug` | Coin or exchange slug, when present. |
| `price` | Quoted price in the selected conversion currency, when present. |
| `marketCap` | Market capitalization, when present. |
| `volume24h` | 24h coin volume, when present. |
| `percentChange24h` | 24h price change, when present. |
| `score` | Exchange score, when present. |
| `totalVol24h` | Exchange 24h volume, when present. |
| `numMarkets` | Number of markets for an exchange, when present. |
| `url` | CoinMarketCap URL for the record. |

#### Illustrative output record

```json
{
  "mode": "listing",
  "rank": 1,
  "name": "Bitcoin",
  "symbol": "BTC",
  "price": 0,
  "marketCap": 0,
  "percentChange24h": 0,
  "url": "https://coinmarketcap.com/currencies/bitcoin/"
}
```

### How it works

The Actor uses CoinMarketCap's public web data endpoints over HTTP. The live contract shows these mode paths:

- `listing`: ranked coins by market cap or other supported sort fields
- `detail`: deep per-coin records for the provided coin slugs or symbols
- `trending`: trending coins, gainers, losers, and new entries
- `global`: market-wide metrics
- `exchanges`: ranked exchanges by volume

The dataset schema maps coin views and exchange views to structured records, and the manifest marks the Actor as HTTP-only and MCP-ready.

### Pricing

CoinMarketCap Crypto Scraper uses Pay per event pricing on the Apify platform. The live contract includes event-based charges for Actor start, coin records, exchange records, and metric records. The exact current rates are shown in the live Pricing tab in Apify Console, along with any platform usage that applies to your run.

A simple event-count example in words: a run that returns a few coin records in `detail` mode will be charged for the Actor start event plus one event for each returned coin record.

### Use with AI agents (MCP)

This Actor is usable through Apify MCP as a tool that returns structured CoinMarketCap data for agent workflows. The exact Actor identity is `khadinakbar/coinmarketcap-crypto-scraper`.

Tool description: fetch ranked coins, coin details, trending market records, global market metrics, or exchange rankings in machine-readable JSON for downstream reasoning, filtering, and comparison.

> Get the top ranked coins from CoinMarketCap in USD, then return the rows with rank, name, symbol, price, market cap, and 24h change. If there are exchange records, compare the highest-volume exchange and summarize its score and market count.

Output interpretation:

- Use `rank`, `price`, `marketCap`, `percentChange24h`, `score`, `totalVol24h`, and `numMarkets` as the main decision fields.
- The `url` field is the provenance link back to CoinMarketCap for each record.
- Scope depends on the selected mode: coin records in `listing` and `detail`, exchange records in `exchanges`, and metric records in `trending` or `global`.
- Pagination is handled in `listing` and `exchanges` modes through `maxResults`, with server-side pagination in chunks of 100.
- Cost scales by returned events, so smaller result sets reduce event volume.

### Apify API example

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

const client = new ApifyClient({
  token: process.env.APIFY_TOKEN,
});

const run = await client.actor('khadinakbar/coinmarketcap-crypto-scraper').call({
  mode: 'listing',
  maxResults: 5,
  convert: 'USD',
  sortBy: 'market_cap',
  sortDir: 'desc',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

### Best results and outcome guidance

Use the mode that matches the question you are asking:

- Start with `listing` for broad market scanning.
- Use `detail` when you already have coin slugs or symbols and want deeper context.
- Use `trending` when you need movement-oriented records.
- Use `global` when you need market-wide snapshot fields.
- Use `exchanges` when exchange volume, score, and market counts are the key comparison points.

For cleaner output, keep the conversion currency consistent across runs and choose a sort field that matches your workflow, such as market cap for ranking or volume for exchange comparison.

### Focused standalone workflow

CoinMarketCap Crypto Scraper is designed as a focused standalone workflow for the public input and structured output contract described above.

### Design note

I found that the live dataset contract separates coin views and exchange views, and the overview view keeps the record shape focused on `mode`, `rank`, `name`, `symbol`, `price`, `marketCap`, `percentChange24h`, and `url`.

### FAQ

#### When should I use `listing` instead of `detail`?

Use `listing` when you want ranked market data across many coins. Use `detail` when you already know which coins to inspect by slug or symbol and want deeper per-coin fields.

#### How do I request exchange rankings?

Set `mode` to `exchanges` and, if needed, adjust `maxResults`, `sortBy`, and `sortDir`. The output is organized around exchange fields such as `score`, `totalVol24h`, and `numMarkets`.

#### How do I get market-wide context?

Use `mode: "global"` for a snapshot of market metrics. This mode is designed for broad market context rather than coin-by-coin comparisons.

#### Can AI agents call this Actor through MCP?

Yes. The Actor is MCP-ready and can be used as an Apify MCP tool that returns structured JSON for coin, exchange, trending, and global market workflows.

### Responsible use

Use this Actor in line with CoinMarketCap's terms and applicable laws. Review the returned records in context before making decisions, especially when combining market data with automated alerts, dashboards, or agent actions.

# Actor input Schema

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

Which CoinMarketCap dataset to scrape. 'listing' = top-N ranked coins by market cap. 'detail' = deep stats for specific coins in 'coins'. 'trending' = trending + gainers + losers + new. 'global' = total market cap and BTC/ETH dominance. 'exchanges' = top-N ranked crypto exchanges by volume. Defaults to 'listing'. This is NOT a search query field.

## `coins` (type: `array`):

Coin slugs or symbols to fetch in 'detail' mode, e.g. \["bitcoin", "ETH", "solana"]. Slugs are the lowercase URL name on coinmarketcap.com/currencies/<slug>/. Symbols (ETH, BTC) are auto-resolved to slugs. Ignored in listing/trending/global/exchanges modes. Required only when mode = detail.

## `maxResults` (type: `integer`):

Maximum number of ranked coins (listing mode) or exchanges (exchanges mode) to return (1-5000). Paginated in chunks of 100 server-side. Defaults to 100. Ignored in detail/trending/global modes.

## `convert` (type: `string`):

Currency that prices and market caps are quoted in (ISO code, e.g. 'USD', 'EUR', 'GBP', 'JPY'). Defaults to 'USD'. This is NOT a coin symbol — it is the quote currency for valuations.

## `sortBy` (type: `string`):

Field used to rank coins (listing mode) or exchanges (exchanges mode). Defaults to 'market\_cap' (coins) / 'volume\_24h' (exchanges). Ignored in detail/trending/global modes. When the mode is 'exchanges', 'market\_cap'/'price'/'percent\_change\_\*' values are ignored and volume sort is used.

## `sortDir` (type: `string`):

Sort direction for 'listing' and 'exchanges' modes. 'desc' = highest first (default), 'asc' = lowest first. Ignored in other modes.

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

Apify proxy settings. Datacenter US (default) is sufficient — CoinMarketCap's public data API has no anti-bot. Leave as default unless you need a specific region.

## Actor input object example

```json
{
  "mode": "listing",
  "coins": [
    "bitcoin",
    "ETH"
  ],
  "maxResults": 100,
  "convert": "USD",
  "sortBy": "market_cap",
  "sortDir": "desc",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items containing one coin, exchange, market-mover, or global market record per item.

## `output` (type: `string`):

Compact terminal outcome, record counts, event counts, source, and dataset link.

## `runSummary` (type: `string`):

Detailed terminal outcome with input, build, timing, charge, and diagnostic fields.

# 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 = {
    "mode": "listing",
    "coins": [
        "bitcoin",
        "ethereum"
    ],
    "maxResults": 100,
    "convert": "USD",
    "sortBy": "market_cap",
    "sortDir": "desc",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/coinmarketcap-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 = {
    "mode": "listing",
    "coins": [
        "bitcoin",
        "ethereum",
    ],
    "maxResults": 100,
    "convert": "USD",
    "sortBy": "market_cap",
    "sortDir": "desc",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/coinmarketcap-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 '{
  "mode": "listing",
  "coins": [
    "bitcoin",
    "ethereum"
  ],
  "maxResults": 100,
  "convert": "USD",
  "sortBy": "market_cap",
  "sortDir": "desc",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call khadinakbar/coinmarketcap-crypto-scraper --silent --output-dataset

```

## MCP server setup

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