# CoinGecko Crypto Market API (`automly/coingecko-crypto-market-api`) Actor

Get real-time cryptocurrency prices, market caps, trading volumes, and trends from CoinGecko. Search coins, get detailed coin data, track trending cryptos, retrieve historical price charts, and monitor global crypto market stats — no API key required.

- **URL**: https://apify.com/automly/coingecko-crypto-market-api.md
- **Developed by:** [Automly](https://apify.com/automly) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 result item produceds

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 API

Get live cryptocurrency prices, market caps, trading volumes and price changes for thousands of coins, plus trending coins, coin search, detailed coin profiles, price history and global market stats. Prices in USD, EUR, GBP, JPY, BTC and many other currencies. No API key needed. Export to JSON, CSV or Excel, or call it from your own code.

Data provided by [CoinGecko](https://www.coingecko.com).

### What does CoinGecko Crypto Market API do?

- **Top coins by market cap**: up to 250 coins with price, market cap, rank, 24-hour volume, highs and lows, supply, all-time high and low, and price change over 1h, 24h, 7d, 14d, 30d, 200d or 1y
- **Coin details**: description, website, launch date and market data for the coins you list
- **Price history**: price, market cap and volume over the last 1 day to all time for one coin
- **Trending coins**: the coins people are searching for most in the last 24 hours
- **Search**: find coins by name or symbol and get their CoinGecko IDs
- **Global stats**: total crypto market cap and volume, number of coins and exchanges, and each top coin's market share
- Filter the top-coins list by category, such as `layer-1`, `decentralized-finance-defi` or `meme-token`, and sort by market cap, volume or ID

### What people use it for

- Portfolio and price trackers in Google Sheets, Excel or a dashboard
- Scheduled price snapshots and alerts to Slack, email or a webhook
- Research datasets of market caps, volumes and returns across coins
- Feeding crypto prices into apps, bots and reports

### How to use it

1. Click **Try for free** to open the Actor in Apify Console
2. Pick an **API Endpoint**: top coins, search, trending, coin details, price history or global stats
3. Fill in what that endpoint needs: a **Search Query** for search, **Coin IDs** for coin details and price history
4. Choose the **Target Currency** and **Max Results**, then click **Start**
5. Open the **Output** tab: the **Coins** view shows prices and changes, **Price history** shows chart points

Coin IDs are the names CoinGecko uses in its page addresses, such as `bitcoin`, `ethereum`, `solana` or `usd-coin`. Use the search endpoint to find an ID.

### Input examples

Top 20 coins in euros:

```json
{
  "endpoint": "coins/markets",
  "vsCurrency": "eur",
  "maxResults": 20,
  "priceChangePercentage": "1h,24h,7d,30d"
}
```

Details for three coins:

```json
{
  "endpoint": "coin",
  "coinIds": "bitcoin,ethereum,solana",
  "vsCurrency": "usd"
}
```

The last 30 days of Ethereum prices (hourly points, most recent 250):

```json
{
  "endpoint": "market_chart",
  "coinIds": "ethereum",
  "days": "30",
  "maxResults": 250
}
```

| Field | What it does |
|---|---|
| `endpoint` | `coins/markets`, `search`, `trending`, `coin`, `market_chart` or `global` |
| `vsCurrency` | Currency for prices, such as `usd`, `eur`, `gbp`, `jpy`, `btc` |
| `coinIds` | Coin IDs for `coin` and `market_chart` (price history uses the first one) |
| `searchQuery` | Text to search for with `search` |
| `category` | Category for `coins/markets`, such as `layer-1` |
| `orderBy` | Sort for `coins/markets`: market cap, volume or ID, up or down |
| `priceChangePercentage` | Change windows: `1h,24h,7d,14d,30d,200d,1y` |
| `maxResults` | 1 to 250 rows |
| `sparkline` | Adds 7 days of hourly prices to each coin |
| `days` | History length for `market_chart`: 1, 7, 14, 30, 90, 180, 365 or max |

### Output example

A coin from the top-coins list:

```json
{
  "coinId": "bitcoin",
  "symbol": "btc",
  "name": "Bitcoin",
  "imageUrl": "https://coin-images.coingecko.com/coins/images/1/large/bitcoin.png?1696501400",
  "currentPrice": 84492,
  "marketCap": 1697318250094,
  "marketCapRank": 1,
  "fullyDilutedValuation": 1697331176433,
  "totalVolume": 21802718797,
  "high24h": 85089,
  "low24h": 83835,
  "priceChange24h": 483.29,
  "priceChangePercentage1h": -0.4615,
  "priceChangePercentage24h": 0.56887,
  "priceChangePercentage7d": 4.9888,
  "priceChangePercentage30d": 6.434,
  "marketCapChange24h": 9610280470,
  "marketCapChangePercentage24h": 0.56943,
  "circulatingSupply": 20089965,
  "totalSupply": 20090134,
  "maxSupply": 21000000,
  "ath": 126080,
  "athChangePercentage": -32.98498,
  "athDate": "2025-10-06T10:57:42.000Z",
  "atl": 67.81,
  "atlChangePercentage": 124503.60356,
  "atlDate": "2013-07-05T16:00:00.000Z",
  "lastUpdated": "2026-09-27T15:09:20.000Z",
  "recordType": "market"
}
```

A price history point:

```json
{
  "coinId": "ethereum",
  "timestamp": 1790517600000,
  "date": "2026-09-27T14:00:00+00:00",
  "price": 2708.88,
  "marketCap": 330712182324.25,
  "totalVolume": 7528162301.84,
  "vsCurrency": "usd",
  "recordType": "chart"
}
```

### Pricing

You pay **$0.50 per 1,000 rows** ($0.0005 per coin, search result or price point) plus the small Apify platform usage of the run. The top 100 coins cost $0.05 in row charges.

### FAQ

**Do I need a CoinGecko API key?**
No.

**How fresh are the prices?**
Each run reads CoinGecko's current data, which updates about every minute. Schedule the Actor for regular snapshots.

**Why did my coin return nothing?**
Use the CoinGecko coin ID, not the ticker: `bitcoin`, not `btc`. The run log names any ID that was not found, and the search endpoint finds the right ID.

**How detailed is the price history?**
CoinGecko picks the spacing from the number of days: 1 day gives 5-minute points, 2 to 90 days hourly points, longer ranges daily points. The run returns the most recent points up to your Max Results.

**Which categories can I use?**
Any CoinGecko category ID, as it appears in the address of the category page on coingecko.com, for example `layer-1`, `decentralized-finance-defi`, `meme-token` or `artificial-intelligence`.

# Actor input Schema

## `endpoint` (type: `string`):

What to get: top coins by market cap, a coin search, trending coins, details for chosen coins, price history for one coin, or global market stats.

## `vsCurrency` (type: `string`):

Currency for prices, such as usd, eur, gbp, jpy or btc.

## `coinIds` (type: `string`):

Comma-separated CoinGecko coin IDs for 'coin' and 'market\_chart' (for example 'bitcoin,ethereum,solana'). The ID is in the coin's CoinGecko page address; ticker symbols such as 'btc' do not work. Price history uses the first ID.

## `searchQuery` (type: `string`):

Search term for 'search' mode (e.g., 'bitcoin', 'defi').

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

Category filter for coins/markets (e.g., 'decentralized-finance-defi', 'layer-1', 'meme-token').

## `orderBy` (type: `string`):

Sort field for coins/markets mode.

## `priceChangePercentage` (type: `string`):

Comma-separated windows for price change %, from: 1h, 24h, 7d, 14d, 30d, 200d, 1y.

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

Maximum number of rows (1-250). For price history, the most recent points are returned.

## `sparkline` (type: `boolean`):

Add 7 days of hourly prices to each coin (top coins endpoint).

## `days` (type: `string`):

Days of price history for 'market\_chart': 1 gives 5-minute points, 2-90 hourly points, more than 90 daily points.

## Actor input object example

```json
{
  "endpoint": "coins/markets",
  "vsCurrency": "usd",
  "orderBy": "market_cap_desc",
  "priceChangePercentage": "1h,24h,7d",
  "maxResults": 20,
  "sparkline": false,
  "days": "30"
}
```

# Actor output Schema

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

Every row with all fields.

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

Coins with rank, price, 24-hour and 7-day change, market cap and volume.

## `chart` (type: `string`):

Price history points (market\_chart endpoint).

# 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 = {
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/coingecko-crypto-market-api").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 = { "maxResults": 20 }

# Run the Actor and wait for it to finish
run = client.actor("automly/coingecko-crypto-market-api").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 '{
  "maxResults": 20
}' |
apify call automly/coingecko-crypto-market-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automly/coingecko-crypto-market-api"
        }
    }
}
```

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/v8AsZjyQJRje3BKCI/builds/UkdocazewTRmOoGJb/openapi.json
