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

Scrape real-time cryptocurrency data from CoinMarketCap via a secure API. Fetch top coins, trending lists, most viewed, new entries, gainers, and RWA tokens with flexible count, intervals, and pagination. Ideal for crypto research and automation.

- **URL**: https://apify.com/coder_zoro/coinmarketcap-scraper.md
- **Developed by:** [Zoro](https://apify.com/coder_zoro) (community)
- **Categories:** Automation
- **Security:** Limited permissions
- **Stats:** 92 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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?

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

## CoinMarketCap Scraper

A powerful Apify actor that scrapes real-time cryptocurrency data from CoinMarketCap through a secure Lambda API endpoint. Get comprehensive data on top cryptocurrencies, trending coins, new entries, gainers, and more.

### 🚀 Features

- **Multiple Categories**: Access 6 different cryptocurrency data categories
- **Real-time Data**: Fresh data directly from CoinMarketCap
- **Flexible Parameters**: Customize count, intervals, and pagination
- **Async Processing**: Fast and efficient data retrieval
- **Immediate Push**: Data is pushed to dataset as soon as it's received
- **Metadata Enrichment**: Each record includes category and scrape timestamp

### 📊 Available Categories

#### 1. **Top List** (By Market Cap)

Get the top cryptocurrencies ranked by market capitalization.

- Default count: 100
- Sortable up to 5000 items

#### 2. **Trending List**

Discover trending cryptocurrencies based on time intervals.

- Intervals: 24h, 7d, 30d
- Pagination support (100 items per page)

#### 3. **Most Viewed List**

Track the most viewed cryptocurrencies in the last 24 hours.

- Shows user interest and attention
- Up to 5000 items available

#### 4. **New Crypto Entry**

Find newly listed cryptocurrencies.

- Sorted by date added
- Perfect for discovering new projects

#### 5. **Gainer List**

Identify the biggest gainers in the last 24 hours.

- Sorted by percentage gain
- Find trending upward coins

#### 6. **Real World Assets**

Explore tokenized real-world assets.

- Special category for RWA tokens
- Growing DeFi sector

### 🔧 Input Configuration

#### Required Fields

- **Category** (dropdown): Select the data category to scrape
  - `top_list` - Top cryptocurrencies by market cap
  - `trending_list` - Trending cryptocurrencies
  - `most_viewed_list` - Most viewed coins
  - `new_crypto_entry` - Newly listed cryptocurrencies
  - `gainer_list` - Top gainers
  - `real_world_assets` - Tokenized real-world assets

#### Optional Fields

- **Count** (integer): Number of items to retrieve
  - Default: 100
  - Range: 1-5000

- **Interval** (dropdown, for Trending List only): Time period
  - `24h` - Last 24 hours
  - `7d` - Last 7 days
  - `30d` - Last 30 days

- **Page Count** (integer, for Trending List only): Number of pages
  - Default: 1
  - Each page contains 100 items
  - Range: 1-50

### 📝 Example Input

#### Basic Top 100 Cryptos

```json
{
  "category": "top_list",
  "count": 100
}
```

#### Trending in Last 7 Days

```json
{
  "category": "trending_list",
  "interval": "7d",
  "page_count": 2,
  "count": 200
}
```

#### Top 50 Gainers

```json
{
  "category": "gainer_list",
  "count": 50
}
```

### 📤 Output Format

Each cryptocurrency record includes:

```json
{
  "id": 1,
  "name": "Bitcoin",
  "symbol": "BTC",
  "slug": "bitcoin",
  "cmcRank": 1,
  "marketPairCount": 12474,
  "circulatingSupply": 19948812.0,
  "totalSupply": 19948812.0,
  "maxSupply": 21000000.0,
  "ath": 126198.07,
  "atl": 0.048,
  "high24h": 97301.96,
  "low24h": 94000.73,
  "isActive": 1,
  "lastUpdated": "2025-11-15T11:31:00.000Z",
  "dateAdded": "2010-07-13T00:00:00.000Z",
  "isAudited": false,
  "auditInfoList": [],
  "badges": [1, 5],
  "_category": "top_list",
  "_scraped_at": "2025-11-15T11:36:12.408Z"
}
```

#### Additional Metadata Fields

- **\_category**: The category used for scraping
- **\_scraped_at**: ISO timestamp of when data was collected

### 💡 Use Cases

- **Market Analysis**: Track top cryptocurrencies and market trends
- **Investment Research**: Monitor gainers and new entries
- **Portfolio Management**: Keep tabs on your crypto holdings
- **Data Analytics**: Build crypto dashboards and reports
- **Price Alerts**: Set up monitoring for specific coins
- **Research**: Study cryptocurrency market patterns
- **Trading Bots**: Feed real-time data to trading algorithms

### ⚡ Performance

- **Speed**: Async processing for fast data retrieval
- **Efficiency**: Immediate data push to dataset
- **Scalability**: Handle up to 5000 records per run
- **Reliability**: Built-in error handling and logging

### 📊 Data Update Frequency

The data is as fresh as the CoinMarketCap API provides:

- Market data: Updated every ~1-2 minutes
- Rankings: Updated continuously
- New listings: Real-time

### 🛠️ Technical Details

- **Runtime**: Python 3.11+
- **Framework**: Apify SDK
- **HTTP Client**: aiohttp (async)
- **Data Format**: JSON
- **Rate Limiting**: Handled by Lambda API

### 📖 Example Usage

#### Get Top 50 Cryptocurrencies

```json
{
  "category": "top_list",
  "count": 50
}
```

#### Find New Listings

```json
{
  "category": "new_crypto_entry",
  "count": 25
}
```

#### Track 24h Gainers

```json
{
  "category": "gainer_list",
  "count": 100
}
```

#### Most Viewed This Week

```json
{
  "category": "most_viewed_list",
  "count": 50
}
```

### 🔍 Output Dataset

All scraped data is automatically pushed to the default dataset. You can:

- Export as JSON, CSV, Excel, or HTML
- Use in subsequent actors via Apify API
- Integrate with your applications
- Schedule regular runs for continuous monitoring

### 🔄 Updates

- **v1.0.0**: Initial release with 6 categories
  - Top list by market cap
  - Trending cryptocurrencies
  - Most viewed coins
  - New crypto entries
  - Gainer list
  - Real world assets

***

**Happy Scraping! 🚀💰**

# Actor input Schema

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

Select the cryptocurrency data category to fetch

## `count` (type: `integer`):

Number of cryptocurrencies to retrieve

## `interval` (type: `string`):

Time interval for trending list

## `page_count` (type: `integer`):

Number of pages to fetch for trending list (each page has 100 items)

## Actor input object example

```json
{
  "category": "top_list",
  "count": 100,
  "interval": "24h",
  "page_count": 1
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("coder_zoro/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("coder_zoro/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 '{}' |
apify call coder_zoro/coinmarketcap-scraper --silent --output-dataset

```

## MCP server setup

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