# CoinGecko API — Coin Market Catalogue & Token Metadata (`headofactors/coin-market-catalogue`) Actor

CoinGecko API catalogue with ranked coins, prices, market cap, 24h volume, supply, categories and token contracts per chain. Collect top coins or your own coin IDs with transparent metadata status and free missing-ID diagnostics.

- **URL**: https://apify.com/headofactors/coin-market-catalogue.md
- **Developed by:** [HeadOfActors](https://apify.com/headofactors) (community)
- **Categories:** Developer tools, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 coins

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 API — Coin Market Catalogue and Token Metadata

Build a CoinGecko API coin catalogue of market cap rankings for dashboards, fintech applications and research. Collect ranked coins or a list of CoinGecko IDs with prices, market capitalization (market cap), daily volume, supply and project metadata. Each found coin becomes one dataset row. Categories and contract addresses help connect a price observation to the underlying project and its tokens on different chains.

### CoinGecko API catalogue collection

Use this Actor when you need a catalogue of coins with market statistics and identifiers. Choose the largest coins by market capitalization, optionally restrict the ranking to a category, or supply the specific coin IDs your application already knows. The result combines the market listing with optional project details. It supports native assets such as Bitcoin as well as tokens deployed on multiple chains.

CoinGecko IDs are the stable join key in this product. A ticker is useful for display but is not unique: different projects can share the same symbol. The output therefore includes both `coin_id` and an uppercase `symbol`. Keep the ID when storing observations or connecting this catalogue to other datasets.

### Input

With no input, the Actor requests the top 100 coins in USD and includes project metadata. Set `top_n` from 1 to 5,000 to choose the number of ranked market listings. Ranking follows market capitalization in descending order. `category` accepts a CoinGecko category ID, such as `layer-1`, and applies only to this ranked mode.

Use `coin_ids` for an explicit list of up to 1,000 IDs. This mode takes precedence over `top_n`. IDs are trimmed, converted to lowercase and deduplicated while preserving their first input position. The delivered rows follow that order. A category cannot be combined with explicit IDs.

Set `vs_currency` to a supported quote unit such as `usd`, `eur`, `btc` or `sats`. The value is case-insensitive. All monetary statistics in a row use this same quote unit. Supply values remain coin quantities, and percentage changes remain percentage values.

`include_metadata` defaults to true. It adds categories, contract addresses, homepage, whitepaper, Twitter profile, genesis date and hashing algorithm where the source provides them. `include_description` defaults to false and requires metadata. Enabling it includes the source English project description, which can contain HTML. Render this text safely in your own application.

A real input used with the saved source responses is:

```json
{"coin_ids":["bitcoin","pepe","notacoin123"],"include_description":true}
```

The last ID was tested against the source and has no market listing. It demonstrates the diagnostic behavior described below.

### Output

Found rows include `price`, `current_price`, `market_cap`, `market_cap_rank`, `total_volume`, supply figures, daily high and low, all-time highs and lows, and price changes over the available windows. Missing numerical observations stay null. A zero market capitalization from the source is represented as null because this indicates unknown capitalization. Zero trading volume remains zero.

A delivered row from a saved run. The project description, the all-time timestamps and the hourly, weekly and monthly change fields are left out below for length; every value shown is untouched:

```json
{
  "_type": "price_snapshot",
  "source": "coin-market-catalogue",
  "coin_id": "bitcoin",
  "found": true,
  "status": "ok",
  "symbol": "BTC",
  "name": "Bitcoin",
  "asset_class": "crypto",
  "price": 67042,
  "current_price": 67042,
  "currency": "USD",
  "vs_currency": "usd",
  "fetched_date": "2026-11-14",
  "as_of": "2026-11-14T12:55:53.000Z",
  "market_cap": 1348283428992,
  "market_cap_rank": 1,
  "total_volume": 32132780785,
  "circulating_supply": 20111771,
  "max_supply": 21000000,
  "ath": 126080,
  "price_change_percentage_24h": -3.11572,
  "metadata_status": "ok",
  "categories": ["Smart Contract Platform", "Layer 1 (L1)", "FTX Holdings", "Proof of Work (PoW)", "Bitcoin Ecosystem", "GMCI 30 Index", "GMCI Index", "Coinbase 50 Index"],
  "contracts": [],
  "homepage": "http://www.bitcoin.org",
  "genesis_date": "2009-01-03",
  "hashing_algorithm": "SHA-256"
}
```

A requested ID the source does not know becomes a diagnostic row instead of a made-up price:

```json
{
  "_type": "diagnostic",
  "source": "coin-market-catalogue",
  "coin_id": "notacoin123",
  "found": false,
  "status": "not_found",
  "fetched_date": "2026-11-14",
  "vs_currency": "usd"
}
```

`as_of` is the source update time. `fetched_at` records retrieval time in UTC, and `fetched_date` provides its date portion. These timestamps differ because the source caches market data. The catalogue is a snapshot and does not guarantee simultaneous observations across every coin or page.

`currency` contains an uppercase ISO currency code for fiat and supported monetary units such as XAU. For crypto quote units, `currency` is null and `vs_currency` carries the actual unit. For example, an Ethereum quotation in BTC retains its numeric price with `vs_currency: "btc"`.

Contracts are arrays of `{chain, address, decimals}`. Empty source platform entries are removed, so a native Bitcoin row has an empty contracts array. Solana addresses preserve their original case. Chain identifiers are CoinGecko platform IDs and may need explicit mapping when joining another provider.

An ID without a market listing receives `found: false` and `status: "not_found"`, with no invented price. When every requested ID is missing, the run reports no results. A metadata failure preserves the market row and price, sets `metadata_status` to the relevant error and adds a warning. Disabled metadata uses `metadata_status: "skipped"`.

### Pagination and larger collections

The Actor automatically follows continuation pages and deduplicates coins by ID. Direct API clients must reuse the original input with the returned `next_cursor` until it becomes null. `partial` means either more pages remain or requested metadata was unavailable; inspect warnings to distinguish these cases.

Market rankings can move while a long collection is running. Deduplication prevents duplicate dataset entries but cannot freeze the provider's ranking. Larger collections also take longer when project details are requested for every coin. Disable metadata when you only need market statistics.

### Pricing and free usage

The `coin` result event applies once to each found coin row actually delivered. Missing-ID diagnostics and empty results have no result charge. Project metadata is part of the found row and has no separate event in this product. Consult the Actor's Pricing tab for the current event price and platform usage costs. Free usage is limited to ten input coins or ranked results per run; the input is capped before collection.

### Joining other datasets

Join `coin_id` to crypto instruments in [Market Quotes](https://apify.com/s-r/market-quotes) for quote and OHLCV workflows. Use chain plus contract address to look up DEX pairs with [DexScreener Scraper](https://apify.com/s-r/dexscreener-scraper). Coin IDs and symbols can also help match token unlock calendars; confirm the provider's identifier mapping before relying on a symbol alone.

### CoinGecko API compared with the alternatives

Three ways to get a coin catalogue, and what each one asks of you:

- **The public CoinGecko API, called directly.** You write the pagination, the quote-unit handling and the per-coin detail call, because the ranked listing alone carries no categories and no token contracts. Unauthenticated requests are rate limited by the source, so a wide collection has to be scheduled around that limit. This route suits you if you already operate that plumbing.
- **A price table from a single page.** Fast and cheap, and it stops at the numbers: no project categories, no contract addresses per chain, and no answer for an ID that has no market listing. A ranked price list is what most coin scrapers deliver, and it is what the first source endpoint returns on its own.
- **This Actor.** Both source endpoints in one run, one row per coin with identifiers, market statistics, supply figures, categories and token contracts, continuation pages followed for you, and an explicit `status` and `metadata_status` on every row so a partial result is visible instead of silent. Identifiers are kept stable, so the same rows join to quotes, DEX pairs and unlock calendars later.

### FAQ

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

No. The Actor uses the public source and does not require a CoinGecko account or a customer-supplied key.

#### Can I enter BTC or another ticker instead of an ID?

Enter the CoinGecko ID, such as `bitcoin`. Tickers can refer to more than one project. The Actor intentionally accepts IDs to make the requested catalogue unambiguous.

#### Does this Actor provide historical candles or OHLCV?

This product collects the current catalogue and market statistics. For a mixed instrument watchlist or OHLCV, use Market Quotes. Keep catalogue identifiers when joining these outputs.

#### Why can a coin have a price but no contracts?

Native coins do not necessarily have a token contract. Empty contract arrays are valid. Separately, `metadata_status` and warnings identify a requested metadata lookup that did not complete.

#### How fresh are the numbers in a row?

`as_of` is the time the source updated that coin and `fetched_at` is when this run retrieved it, both in UTC; `fetched_date` is the date portion used for the market quote projection. The catalogue is a snapshot taken while the run executes, so a long collection can span several source updates.

#### What happens if the source rate-limits one request?

The run retries, and a coin whose project details still could not be fetched keeps its market row with `metadata_status` set to the error plus a warning on the run. Market statistics are never dropped because of a metadata problem, and `partial` tells you the run stopped short of everything you asked for.

#### Can I restrict the ranking to a category?

Yes, in ranked mode: `category` takes a CoinGecko category ID such as `layer-1` and the ranking still follows market capitalization. A category cannot be combined with an explicit list of `coin_ids`.

# Actor input Schema

## `top_n` (type: `integer`):

Number of coins ranked by market capitalization; ignored when coin_ids is non-empty.

## `coin_ids` (type: `array`):

CoinGecko IDs such as bitcoin and pepe; normalized to lowercase, deduplicated in first-input order. Symbols are not IDs.

## `vs_currency` (type: `string`):

Quote unit from CoinGecko supported_vs_currencies, case-insensitive. Non-ISO units (btc, eth, sats) are returned in vs_currency with currency=null.

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

Optional CoinGecko category ID, for example layer-1; only allowed with top_n.

## `include_metadata` (type: `boolean`):

Retrieve categories, contract addresses per chain, homepage and project metadata.

## `include_description` (type: `boolean`):

Include the source English description; requires include_metadata=true. Source text may contain HTML.

## `cursor` (type: `string`):

Continuation from next_cursor. Reuse the original input and change only cursor; Apify follows continuations automatically.

## Actor input object example

```json
{
  "top_n": 100,
  "coin_ids": [],
  "vs_currency": "usd",
  "category": "",
  "include_metadata": true,
  "include_description": false,
  "cursor": ""
}
```

# Actor output Schema

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

One market row per coin plus free missing-ID diagnostics.

# 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("headofactors/coin-market-catalogue").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("headofactors/coin-market-catalogue").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 headofactors/coin-market-catalogue --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headofactors/coin-market-catalogue"
        }
    }
}
```

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/gmSHLfLBmLh2dvK9M/builds/lFJgz3myKDgNzz3L6/openapi.json
