# CoinMarketCap Scraper (`publicmoney/coinmarketcap-scraper`) Actor

Extract CoinMarketCap market data with no API key: rank, price, market cap, fully diluted valuation, volume, supply, all-time high and low, dominance, and 24h, 7d and 30d change. Export data, run via API, schedule and monitor runs, or integrate with other tools.

- **URL**: https://apify.com/publicmoney/coinmarketcap-scraper.md
- **Developed by:** [Public Money](https://apify.com/publicmoney) (Apify)
- **Categories:** Business
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 records

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?

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's API is key-gated on every tier, and the free plan caps you at a few hundred calls a month. This Actor reads CoinMarketCap market data for any coin and returns one structured record: rank, price, market cap, fully diluted valuation, volume, supply, all-time high and low, dominance and percent change over 24h, 7d and 30d. A second mode returns the news it carries per coin.

### What it does

- Returns **one record per coin**, in order. A slug CoinMarketCap does not know comes back with `status: "failed"` and a reason.
- Sweeps the market when you **leave the coin list empty**, sorted by cap, volume, price, 24h or 7d change, or listing date.
- Filters to **coins only, tokens only, or both**, which the market sweep on most sources will not do.
- Carries **fully diluted valuation and dominance** next to market cap, so a small float is visible rather than hidden.
- Reports percent change over **24h, 7d and 30d** in the same record.
- Converts to **any fiat or crypto CoinMarketCap supports**, by code or by its numeric id.
- Has a second mode for **news**, one record per story CoinMarketCap carries for a coin.
- Optional **price history** and a **coin detail** block with links and descriptions.

### Use cases

| You need to | How this Actor does it |
| --- | --- |
| Rank the market by more than cap | Sort by volume, 24h change or listing date and read `rank` |
| Spot a thin float | Compare `marketCap` against `fullyDilutedValuation` |
| Track Bitcoin dominance | Read `dominance` on each run and chart it |
| Separate coins from tokens | Set the crypto type and sweep only one of them |
| Follow the story on a coin | Switch to news mode and read `headline`, `publisher` and `datePublished` |
| Feed a crypto research agent | Call the Actor over MCP and let the model ask for the coin it needs |

### Quick start

1. Click **Try for free**.
2. Add CoinMarketCap slugs, one per line: `bitcoin`, `ethereum`, `solana`. These are the slugs in the coin URL, not tickers. Leave the field empty to sweep the top of the market.
3. Leave **Mode** on `market`, or switch it to `news`.
4. Set **Convert** if you want something other than USD, and choose a **Sort by** for a sweep.
5. Click **Start**. Rows appear within seconds.
6. Export as JSON, CSV, Excel or XML, or read the dataset over the API.

### Input

| Field | Type | Default | What it controls |
| --- | --- | --- | --- |
| `slugs` | array | empty | CoinMarketCap slugs to read. Empty sweeps the market by the chosen sort |
| `mode` | string | `market` | `market` returns a record per coin, `news` a record per story |
| `newsPerCoin` | integer | `10` | Stories per coin in news mode |
| `convert` | string | `USD` | The quote currency code. `convertId` takes CoinMarketCap's numeric id instead |
| `sortBy` | string | `market_cap` | Sweep order: cap, 24h volume, price, 24h or 7d change, or listing date |
| `sortType` | string | `desc` | Ascending or descending |
| `cryptoType` | string | `all` | Restricts a sweep to coins only or tokens only |
| `includeCoinDetail` | boolean | `false` | Adds links and the project description |
| `includeHistory` | boolean | `false` | Adds a price series for the trailing window |
| `maxItems` | integer | `100` | Caps how many coins are read |

```json
{
    "slugs": [
        "bitcoin",
        "ethereum",
        "solana"
    ],
    "mode": "market",
    "convert": "USD",
    "maxItems": 100
}
```

### Output

One dataset item per coin in market mode, one per story in news mode. Fields CoinMarketCap does not publish for a coin are dropped rather than returned as `null`.

| Field group | Fields |
| --- | --- |
| Identity | `status`, `slug`, `symbol`, `name`, `rank`, `url` |
| Price | `value`, `convert`, `percentChange24h`, `percentChange7d`, `percentChange30d` |
| Market | `marketCap`, `fullyDilutedValuation`, `volume24h`, `dominance` |
| Supply | `circulatingSupply`, `totalSupply`, `maxSupply` |
| Extremes | `ath`, `athDate`, `atl`, `atlDate` |
| News mode | `headline`, `publisher`, `datePublished`, `url` |
| Timing | `validFrom`, `scrapedAt` |

```json
{
    "status": "ok",
    "slug": "bitcoin",
    "symbol": "BTC",
    "name": "Bitcoin",
    "rank": 1,
    "value": 104238.61,
    "convert": "USD",
    "percentChange24h": -1.84,
    "percentChange7d": 3.12,
    "marketCap": 2068442110394,
    "fullyDilutedValuation": 2188010810000,
    "volume24h": 41220118844,
    "dominance": 56.81,
    "circulatingSupply": 19842193.0,
    "maxSupply": 21000000.0,
    "validFrom": "2026-09-04T20:00:01.000Z",
    "url": "https://coinmarketcap.com/currencies/bitcoin/"
}
```

#### What does news mode return?

`mode: "news"` returns the stories CoinMarketCap carries for each coin you named: `headline`, `publisher`, `datePublished` and `url`, plus the `slug` the story was found under so rows join back to the market records. News is charged as news items rather than as market records, and **News per coin** sets how many stories each coin returns.

### Integrations

Run it over the API and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/publicmoney~coinmarketcap-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"slugs": ["bitcoin", "ethereum", "solana"], "mode": "market", "convert": "USD", "maxItems": 100}'
```

From Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("publicmoney/coinmarketcap-scraper").call(run_input={"slugs": ["bitcoin", "ethereum", "solana"], "mode": "market", "convert": "USD", "maxItems": 100})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["symbol"], item["name"], item["value"])
```

Give an AI agent the Actor over MCP:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?actors=publicmoney/coinmarketcap-scraper"
        }
    }
}
```

Schedules run it on any cron, webhooks fire when a run finishes, and platform integrations push the
dataset to Google Sheets, Slack, Airtable, Zapier or your own endpoint.

### Cost

Pay per event, so you pay for records rather than compute time.

| Event | Free tier | Top volume tier |
| --- | --- | --- |
| Record with data | $0.002 | $0.0007 |
| News article | $0.001 | $0.00035 |
| Actor start | $0.00005 per GB | Same |

A record that returned no data is published as a failure row and is **never charged**. Six volume tiers apply, so the per-record price falls with monthly volume.

### Troubleshooting

| Issue | Solution |
| --- | --- |
| A coin returns `failed` | You sent a ticker instead of a CoinMarketCap slug. It is `bitcoin`, not `BTC`. The slug is in the coin's URL. |
| I get far more rows than I expected | The coin list was left empty, so the Actor swept the market. Set **Max items** or name the coins. |
| `dominance` is missing | CoinMarketCap publishes dominance only for the largest assets. Smaller coins carry none. |
| `fullyDilutedValuation` equals `marketCap` | The whole supply is already circulating, so there is no dilution left. That is correct, not a bug. |
| News mode returns nothing for a coin | CoinMarketCap carries no stories for that coin right now. Market mode still works for it. |

### FAQ

#### Is the CoinMarketCap API free?

CoinMarketCap gates every tier behind a key and the free plan is capped at a few hundred calls a month. This Actor needs no CoinMarketCap key at all and is charged per record instead.

#### What is a CoinMarketCap slug?

The identifier in the coin's CoinMarketCap URL, which is not the ticker. Bitcoin is `bitcoin`, Polygon is `polygon-ecosystem-token`.

#### What is fully diluted valuation?

The market cap the coin would have if the entire supply were circulating. When it is far above `marketCap`, a large share of tokens has yet to unlock.

#### Is there a CoinMarketCap news API?

`mode: "news"` is the closest thing, returning the stories CoinMarketCap carries per coin with headline, publisher, date and URL, charged as news items.

#### Can I get the whole market instead of a list?

Yes. Leave the coin list empty and the Actor sweeps the market in the order you choose, capped by **Max items**, optionally restricted to coins or tokens.

#### Do I need a CoinMarketCap API key?

No. You need an Apify token to call the Actor over the API. No CoinMarketCap credential is involved anywhere.

#### Can I get this data in Python?

Yes, with the `apify-client` package as shown above. It returns parsed JSON, so there is no HTML or response handling on your side.

#### Can I get the data into Excel or Google Sheets?

Yes. Export the dataset as XLSX or CSV, or connect the Google Sheets integration so each run appends to a sheet.

#### Can an AI agent call this Actor?

Yes. Add it to an MCP client with the config above and the model can request what it needs on its own. Every record is flat JSON with named fields, so no post-processing is needed.

#### Is it legal to scrape CoinMarketCap?

This Actor reads public CoinMarketCap data that needs no login and collects no personal data. Scraping public data is generally lawful, and how you store, redistribute or act on market data is governed by your own agreements and local rules. Take your own legal advice for your use case.

### Changelog

- **0.0.2** Added news mode, dominance, fully diluted valuation and optional history.
- **0.0.1** First release. Market data for any coin or the top of the market.

### Feedback

Found a field CoinMarketCap publishes that this Actor misses, or an input it rejects? Open an issue on the Issues tab with the input and what you expected. A daily test runs every Actor in the fleet against live sources, so parser fixes ship fast.

# Actor input Schema

## `slugs` (type: `array`):

CoinMarketCap slugs to read, one per line. These are the identifiers in the coin's CoinMarketCap URL and not tickers, so Bitcoin is 'bitcoin' and Polygon is 'polygon-ecosystem-token'. Leave the field empty to sweep the top of the market in the order you chose instead of naming coins. Examples: 'bitcoin', 'ethereum', 'solana'.

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

What each record represents. Market returns one record per coin with rank, price, market cap, supply and change. News returns one record per story CoinMarketCap carries for the coins you named, charged as news items rather than as market records. Examples: 'market', 'news'. Default is 'market'.

## `newsPerCoin` (type: `integer`):

How many stories to return per coin in news mode, newest first. CoinMarketCap carries a rolling window per coin, so a value above what it holds returns everything available. Ignored in market mode. Examples: 3, 10, 25. Default is 10.

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

Currency the ranking walk is quoted in, uppercase. Examples: 'USD', 'EUR', 'GBP', 'BTC'. Default is USD. When you request coins by slug, set Convert currency ID instead — CoinMarketCap's by-slug route ignores this field.

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

How a market sweep is ordered when the slug list is left empty. Ignored when you name coins. Examples: 'market\_cap', 'volume\_24h', 'percent\_change\_24h'. Default is 'market\_cap'.

## `sortType` (type: `string`):

Whether the sweep runs from the top of the chosen sort or the bottom. Ascending on market cap surfaces the smallest listed assets. Examples: 'desc', 'asc'. Default is 'desc'.

## `cryptoType` (type: `string`):

Restricts a market sweep to native coins only, tokens only, or both. Ignored when you name slugs. Examples: 'all', 'coins', 'tokens'. Default is 'all'.

## `includeCoinDetail` (type: `boolean`):

Adds the project detail block to each record: links and the description CoinMarketCap carries. It costs an extra request per coin. Examples: true for research, false for prices. Default is off.

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

Maximum number of coins to read, counted from the top of the list. Use it to cap spend on a long list without editing the list itself. Examples: 10, 50, 200.

## `convertId` (type: `integer`):

CoinMarketCap's numeric currency id, as an alternative to the Convert code. Use it for currencies whose code is ambiguous. Leave it empty to use Convert. Examples: 2781 for USD, 2790 for EUR.

## `includeHistory` (type: `boolean`):

Adds a price series for the trailing window set by History days. It costs an extra request per coin. Examples: true for a chart, false for a snapshot. Default is off.

## `historyDays` (type: `integer`):

How many days of price history to include when history is on. Longer windows return more points and take longer to fetch, and the source thins the resolution on long ranges. Ignored when history is off. Examples: 7, 30, 365. Default is 30.

## Actor input object example

```json
{
  "slugs": [
    "bitcoin",
    "ethereum",
    "https://coinmarketcap.com/currencies/solana/"
  ],
  "mode": "market",
  "newsPerCoin": 10,
  "convert": "USD",
  "sortBy": "market_cap",
  "sortType": "desc",
  "cryptoType": "all",
  "includeCoinDetail": false,
  "maxItems": 100,
  "includeHistory": false,
  "historyDays": 30
}
```

# Actor output Schema

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

One item per coin scraped by the run, in the default dataset.

# 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 = {
    "slugs": [
        "bitcoin",
        "ethereum",
        "https://coinmarketcap.com/currencies/solana/"
    ],
    "mode": "market",
    "newsPerCoin": 10,
    "convert": "USD",
    "sortBy": "market_cap",
    "sortType": "desc",
    "cryptoType": "all",
    "includeCoinDetail": false,
    "maxItems": 100,
    "includeHistory": false,
    "historyDays": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("publicmoney/coinmarketcap-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 = {
    "slugs": [
        "bitcoin",
        "ethereum",
        "https://coinmarketcap.com/currencies/solana/",
    ],
    "mode": "market",
    "newsPerCoin": 10,
    "convert": "USD",
    "sortBy": "market_cap",
    "sortType": "desc",
    "cryptoType": "all",
    "includeCoinDetail": False,
    "maxItems": 100,
    "includeHistory": False,
    "historyDays": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("publicmoney/coinmarketcap-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 '{
  "slugs": [
    "bitcoin",
    "ethereum",
    "https://coinmarketcap.com/currencies/solana/"
  ],
  "mode": "market",
  "newsPerCoin": 10,
  "convert": "USD",
  "sortBy": "market_cap",
  "sortType": "desc",
  "cryptoType": "all",
  "includeCoinDetail": false,
  "maxItems": 100,
  "includeHistory": false,
  "historyDays": 30
}' |
apify call publicmoney/coinmarketcap-scraper --silent --output-dataset

```

## MCP server setup

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