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

Cryptocurrency data from CoinMarketCap: ranked, paginated listings (price, market cap, volume, % change) filterable by coin/token type and sort order, plus rich single-coin profiles (description, official links, ATH/ATL, dominance) by slug lookup.

- **URL**: https://apify.com/scrapyx/coinmarketcap-crypto-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Business, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.84 / 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.
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 Crypto Scraper

Cryptocurrency data from [CoinMarketCap](https://coinmarketcap.com): the
ranked, paginated listing table (price, market cap, volume, % change
across timeframes) plus rich single-coin profiles (description, official
links, all-time high/low, market cap dominance).

***

### What you get

Two independent inputs, either or both:

**`listingQueries`** — one `SEARCH_SUMMARY` + N `CRYPTOCURRENCY` rows per
entry. Each coin row: `id` · `name` · `symbol` · `slug` · `cmcRank` ·
`tags` · `price` · `marketCap` · `volume24h` · `percentChange1h/24h/7d/
30d/60d/90d/1y` · `circulatingSupply` / `totalSupply` / `maxSupply` ·
`listRank` (position within this query's own results). `quotes` is also
included raw for every currency CoinMarketCap itself returned alongside
the one you asked for via `convert`.

**`coinSlugs`** — one `CRYPTOCURRENCY` row per slug, a richer profile:
`description`, `urls` (official website/explorer/source-code/social
links), all-time-high/low with dates, 52-week range, `marketCapDominance`,
`holders`, `watchCount`. This is a genuinely different, larger response
shape than a listing row — see "Field shapes differ" below.

***

### Input

```jsonc
{
  "listingQueries": [
    { "cryptoType": "all", "sortBy": "market_cap", "sortType": "desc", "convert": "USD", "limit": 100 }
  ],
  "coinSlugs": ["bitcoin", "ethereum"]
}
```

All `listingQueries` fields are optional (the defaults shown above apply).
`coinSlugs` are CoinMarketCap URL slugs — the last segment of
`https://coinmarketcap.com/currencies/<slug>/`.

#### `sortBy` and `convert` are validated lists, not free text

`sortBy` must be one of `market_cap`, `price`, `volume_24h`,
`percent_change_24h`, `name`, `circulating_supply` — each individually
verified to genuinely reorder results. An unrecognised `sortBy` is
**not** honest on this API: it silently answers a clean, empty result
(`totalCount: 0`) rather than an error, so only verified values are
accepted. `convert` must be one of `USD`, `EUR`, `GBP`, `JPY`, `IDR`,
`BTC`, `ETH` — a short, verified set rather than the full list of
currencies CoinMarketCap itself supports, which wasn't exhaustively
checked this session.

`cryptoType` (`all` / `coins` / `tokens`) is a genuine filter — `coins`
excludes stablecoins and wrapped assets, verified by comparing top
results.

***

### Field shapes differ between the two record sources

A listing row and a detail row are **not** forced into one shape. Most
notably, both carry a `tags` field, but it means something different
depending on which endpoint answered: a plain list of strings on a
listing row (`["mineable", "pow", ...]`), a list of
`{slug, name, category, priority}` objects on a detail row. This is raw
passthrough of what CoinMarketCap's own API actually returns from each
endpoint, not an inconsistency introduced by this actor — see
CRAWLING\_METHOD.md for the full reasoning.

***

### Known limits

**1. Bogus lookups are reported honestly, but upstream disguises the
error.** A `coinSlugs` entry that doesn't exist gets a clean `ERROR` row
with `_error: "not_found"` — but CoinMarketCap's own API answers that
case with an HTTP 200 wrapping `"error_message": "The system is busy,
please try again later!"`, worded like a transient outage. It isn't one
(reproduced identically across three different fake slugs and repeat
calls) — this actor recognises the shape and reports it as what it
actually is.

**2. No search-by-name.** Only exact slug lookup is offered for
`coinSlugs` — CoinMarketCap's own keyword-search endpoint (a different
path than the data API used here) wasn't explored this session. Use
`listingQueries` with a high `limit` and inspect the `slug` field to find
the right one first.

**3. `convert` only offers 7 currencies.** CoinMarketCap supports far
more (dozens of fiat currencies), but only these 7 were individually
verified this session — see "sortBy and convert are validated lists"
above.

***

### Anti-bot posture

**None encountered.** 8/8 TLS profiles clean, and a 10-request burst with
zero delay between calls came back 200 every time during testing — the
opposite of `properties/99co-properties-scraper`, built immediately
before this actor the same session, where an equally small burst
triggered a genuine Cloudflare challenge. Paced modestly by default
anyway (0.3s minimum interval) as routine good behaviour, not because any
throttling was observed.

### Policy

`https://api.coinmarketcap.com/robots.txt` (`User-agent: *`) has no
ClaudeBot/anthropic-ai/GPTBot named group, and disallows only `/v1/` and
`/v2/` — this actor uses `/data-api/v3/`, covered by neither line.

# Actor input Schema

## `listingQueries` (type: `array`):

One ranked, paginated table fetch per entry, each with its own SEARCH\_SUMMARY row. Each item: {"cryptoType": "all", "sortBy": "market\_cap", "sortType": "desc", "convert": "USD", "limit": 100}. All fields optional (shown defaults apply). cryptoType: all/coins/tokens (genuinely narrows -- verified 'tokens' surfaces stablecoins first, 'coins' excludes them). sortBy must be one of market\_cap, price, volume\_24h, percent\_change\_24h, name, circulating\_supply -- an unrecognised value silently returns an EMPTY result on this API, not an error, so only verified values are accepted. convert: USD/EUR/GBP/JPY/IDR/BTC/ETH.

## `coinSlugs` (type: `array`):

Look up a single cryptocurrency's full profile by its CoinMarketCap URL slug (the last segment of https://coinmarketcap.com/currencies/<slug>/, e.g. 'bitcoin', 'ethereum') -- richer than a listing row: full description, official website/explorer/social links, and per-coin statistics (all-time high/low, 52-week range, market cap dominance, rank) not present in listingQueries rows. An unrecognised slug is reported as a clean not\_found ERROR row, not a crash -- upstream itself answers a disguised 'system busy' message for a bad slug (not a real outage), which this actor recognises and reports honestly.

## `maxConcurrency` (type: `integer`):

How many requests may be in flight at once. This absorbs latency variance; it is NOT the throttle — the crawl rate is set by 'Minimum interval between requests' below.

## `minRequestInterval` (type: `number`):

The actual speed control: the shortest gap between two requests, across all workers. This API showed zero rate-limiting even on a rapid unpaced burst during testing, so the default here is modest (routine good behaviour) rather than defensive.

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

Residential with no country pin is the cloud default. This is a global public JSON API with no observed WAF or geography-based gating during testing, so a wide, unpinned pool is used.

## Actor input object example

```json
{
  "listingQueries": [
    {
      "cryptoType": "all",
      "sortBy": "market_cap",
      "sortType": "desc",
      "convert": "USD",
      "limit": 100
    }
  ],
  "coinSlugs": [
    "bitcoin"
  ],
  "maxConcurrency": 5,
  "minRequestInterval": 0.3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per scraped record. See the dataset's default view for field definitions.

# 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 = {
    "listingQueries": [
        {
            "cryptoType": "all",
            "sortBy": "market_cap",
            "sortType": "desc",
            "convert": "USD",
            "limit": 100
        }
    ],
    "coinSlugs": [
        "bitcoin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/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 = {
    "listingQueries": [{
            "cryptoType": "all",
            "sortBy": "market_cap",
            "sortType": "desc",
            "convert": "USD",
            "limit": 100,
        }],
    "coinSlugs": ["bitcoin"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/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 '{
  "listingQueries": [
    {
      "cryptoType": "all",
      "sortBy": "market_cap",
      "sortType": "desc",
      "convert": "USD",
      "limit": 100
    }
  ],
  "coinSlugs": [
    "bitcoin"
  ]
}' |
apify call scrapyx/coinmarketcap-crypto-scraper --silent --output-dataset

```

## MCP server setup

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