# CoinGecko Coin Rankings, Trending & Categories (`dataspryva/coingecko-coin-rankings-trending-and-categories`) Actor

Get CoinGecko coin rankings, search results, per-coin detail, trending coins, and category listings with price, market cap, and 24h change, in your choice of currency.

- **URL**: https://apify.com/dataspryva/coingecko-coin-rankings-trending-and-categories.md
- **Developed by:** [Dataspryva](https://apify.com/dataspryva) (community)
- **Categories:** Developer tools, Integrations, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## CoinGecko Coin Rankings, Trending & Categories

Collect live cryptocurrency data from CoinGecko without an API key, account or cookie: ranked market listings, coin search results, complete coin profiles, the current trending board, and the full category directory. Prices can be quoted in any of 63 currencies, from USD and EUR to BTC, gold (XAU) and satoshis.

### What this actor does

- **Rankings (`mode=markets`)** — pages through CoinGecko's market list in 250-coin batches, ordered by market cap, 24h volume or coin ID. Filter by rank, market cap, 24h volume or category, and start on any page for deep pulls.
- **Search (`mode=search`)** — finds coins by name or ticker and returns their CoinGecko ID, market-cap rank and links.
- **Coin profiles (`mode=byId`)** — fetches full detail for specific coins by ID or by pasting a coingecko.com coin URL.
- **Trending (`mode=trending`)** — returns the current trending coins, NFTs, categories and real-world assets (RWAs) in one run.
- **Categories (`mode=categories`)** — lists every CoinGecko category with market cap, 24h volume, 24h change, description and its top three coins, sorted by market cap, name or 24h change.

Every record is omit-empty: a field the source has no value for is left out instead of being returned as `null`, `""`, `[]` or `{}`.

### Output per record

The `recordType` field identifies each family.

**Coin (`recordType: "coin"`, from rankings, search or profiles)**

- Identity: `coinId`, `symbol`, `name`, `imageUrl`, `vsCurrency`, `sourceUrl`
- Price: `currentPrice`, `priceHigh24h`, `priceLow24h`, `priceChange24h`
- Market: `marketCap`, `marketCapRank`, `fullyDilutedValuation`, `totalVolume`, `marketCapChange24h`, `marketCapChangePercent24h`
- Period changes: `priceChangePercent24h`, `priceChangePercent1h`, `priceChangePercent7d`, `priceChangePercent14d`, `priceChangePercent30d`, `priceChangePercent60d`, `priceChangePercent200d`, `priceChangePercent1y`
- Supply: `circulatingSupply`, `totalSupply`, `maxSupply`
- Extremes: `ath`, `athDate`, `athChangePercent`, `atl`, `atlDate`, `atlChangePercent`
- Profile-only: `description`, `categories`, `homepageUrl`, `reposUrl`, `genesisDate`, `totalValueLocked`, `sentimentVotesUpPercentage`, `sentimentVotesDownPercentage`, `watchlistPortfolioUsers`
- Optional: `sparklineIn7d` (168 hourly prices, when `includeSparkline` is on)
- Meta: `lastUpdated`, `scrapedAt`

**Trending coin (`recordType: "trending_coin"`)** — `coinId`, `name`, `symbol`, `trendingRank`, `marketCapRank`, `score`, `currentPrice`, `priceCurrency`, `priceChangePercent24h`, `priceInBtc`, `marketCap`, `totalVolume`, `imageUrl`, `sparklineUrl`, `sourceUrl`

**Trending NFT (`recordType: "trending_nft"`)** — `nftId`, `name`, `symbol`, `trendingRank`, `nftContractId`, `nativeCurrencySymbol`, `floorPriceNative`, `floorPrice`, `floorPrice24hChangePercent`, `floorPriceUsd24hChangePercent`, `volume24h`, `averageSalePrice24h`, `imageUrl`, `sparklineUrl`, `sourceUrl`

**Trending category (`recordType: "trending_category"`)** — `categoryId`, `name`, `trendingRank`, `coinsCount`, `marketCap`, `volume24h`, `marketCapChangePercent1h`, `marketCapChangePercent24h`, `top3CoinImages`, `sourceUrl`

**Trending RWA (`recordType: "trending_rwa"`)** — `rwaId`, `name`, `symbol`, `trendingRank`, `marketCapRank`, `benchmarkPrice`, `spotPrice`, `priceChangePercent24h`, `imageUrl`, `sourceUrl`

**Category (`recordType: "coin_category"`)** — `categoryId`, `name`, `marketCap`, `marketCapChange24h`, `marketCapChangePercent24h`, `volume24h`, `top3Coins`, `top3CoinsIds`, `description`, `updatedAt`, `sourceUrl`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `markets` | `markets`, `search`, `byId`, `trending` or `categories` |
| `searchQuery` | string | – | Coin name or ticker for search mode (the form is prefilled with `bitcoin`) |
| `coinIds` | array | `[]` | CoinGecko IDs or full coin URLs for profiles, or to restrict rankings |
| `vsCurrency` | select | `usd` | Quote currency; all 63 public-API currencies are listed |
| `order` | select | `market_cap_desc` | Ranking order: market cap, 24h volume or coin ID |
| `category` | string | – | Category slug filter for rankings, e.g. `layer-1` |
| `startPage` | integer | `1` | First 250-coin page to read in ranking mode |
| `maxItems` | integer | `50` | Maximum records (1–10,000); the daily form prefills `3` |
| `includeSparkline` | boolean | `false` | Add `sparklineIn7d` to ranking records |
| `minMarketCap` | number | – | Drop coins below this market cap |
| `maxMarketCap` | number | – | Drop coins above this market cap |
| `minRank` | integer | – | Drop coins ranked above this number |
| `maxRank` | integer | – | Drop coins ranked below this number |
| `minVolume24h` | number | – | Drop coins below this 24h volume |
| `maxVolume24h` | number | – | Drop coins above this 24h volume |
| `categoryOrder` | select | `market_cap_desc` | Category sort: market cap, name or 24h change |

### Examples

Top 50 coins by market cap:

```json
{ "mode": "markets", "maxItems": 50 }
```

DeFi coins ranked by 24h volume, in euros, skipping the top 100:

```json
{
  "mode": "markets",
  "category": "decentralized-finance-defi",
  "order": "volume_desc",
  "vsCurrency": "eur",
  "minRank": 101,
  "maxItems": 100
}
```

Deep ranking pull (page 9, i.e. ranks 2,001–2,250) with a volume floor:

```json
{ "mode": "markets", "startPage": 9, "maxItems": 250, "minVolume24h": 1000000 }
```

Coin profiles by ID or pasted URL:

```json
{
  "mode": "byId",
  "coinIds": [
    "bitcoin",
    "https://www.coingecko.com/en/coins/ethereum",
    "solana"
  ],
  "vsCurrency": "gbp"
}
```

Trending coins, NFTs, categories and RWAs:

```json
{ "mode": "trending" }
```

Categories sorted by 24h market-cap change:

```json
{ "mode": "categories", "categoryOrder": "market_cap_change_24h_desc", "maxItems": 100 }
```

### Pagination and rate limits

CoinGecko serves at most 250 coins per ranking request. Set `maxItems` above 250 and the actor requests the next 250-coin page automatically, stopping at `maxItems` or the end of the list. `startPage` resumes from any 250-coin page, which lets you split a large pull across runs and stay under the public rate limit.

The free public API allows roughly 5–15 requests per minute per IP. The actor pauses between pages and honours CoinGecko's `Retry-After` header when the limit is reached, so a deep pull can take several minutes. All data is public and cookieless; no proxy setup is needed.

### Legacy compatibility

Older task keys are still accepted: `coinId`, `ids`, `query`, `limit`, `page`, `sort`, `orderBy`, `currency`, `quoteCurrency`, `vs_currency`, `categoryId`, `min24hVolume`, `sparkline` and `catOrder` are mapped onto the current fields in code. Older `mode=coins` and `mode=rankings` values are also mapped in code, but the Apify input form validates `mode` against the five current values, so use `byId` and `markets` there. The published input and output field names are unchanged; new fields are added beside them.

### Data source

CoinGecko's free public API (`api.coingecko.com/api/v3`) supplies every record. The actor is independent and not affiliated with or endorsed by CoinGecko.

### Limitations

- **Public-API rate limit.** CoinGecko throttles anonymous traffic to roughly 5–15 requests per minute. Deep ranking pulls therefore take time, and a run can wait on the limiter; use `startPage` to resume.
- **10,000-record cap.** The actor accepts up to 10,000 records per run. CoinGecko tracks more coins; raise the limit only if your plan's run time and rate limit allow it.
- **No historical data.** This actor returns current snapshots. Charts, OHLC candles and historical prices are not included.
- **No exchange or global-market modes.** Exchange tables and global market-cap totals are outside this actor's rankings/trending/categories scope.
- **Trending is a fixed board.** CoinGecko returns about 15 trending coins, 7 NFTs, 6 categories and 7 RWAs per request; `maxItems` cannot create more.
- **Missing supply is normal.** Coins with no hard cap genuinely lack `maxSupply`; the field is omitted rather than fabricated.

### FAQ

**Do I need a CoinGecko API key?**
No. Every mode uses the free public API and returns data with no key, account or cookie.

**How do I find a coin's CoinGecko ID?**
Run `mode=search` with its name or ticker, or copy the slug from its coingecko.com URL (for example `bitcoin`). `mode=byId` also accepts the full URL.

**How do I find a category slug?**
Run `mode=categories` and use a `categoryId` value in the `category` filter for rankings.

**Why did my ranking run stop before `maxItems`?**
The source ran out of matching coins, the filters excluded the rest, or CoinGecko's rate limit delayed a page. Narrow the filters or start from an earlier page.

**Why are some fields missing on a coin?**
CoinGecko itself has no value for them (for example a coin with no maximum supply). The actor omits such fields instead of returning placeholders.

**Can I mix market-cap, rank and volume filters?**
Yes. A coin must satisfy every filter you set.

**Is this affiliated with CoinGecko?**
No. It is an independent tool that reads CoinGecko's publicly available data.

# Actor input Schema

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

Choose what to collect: ranked market data, matching coins, one or more full coin profiles, the current trending list, or the category directory. Older `coins`/`rankings` values are mapped in code, but this form validates the five current modes.

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

Coin name or symbol to search for (mode=search). Example: bitcoin, sol, doge. Legacy key `query` is also accepted.

## `coinIds` (type: `array`):

CoinGecko IDs (bitcoin, ethereum) or full coingecko.com coin URLs. Used by mode=byId for full profiles, and by mode=markets to restrict rankings to these coins. Legacy `coinId` and `ids` are accepted.

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

Currency used for every price field. All 63 currencies supported by CoinGecko's public API are listed. Legacy `currency` and `quoteCurrency` are accepted.

## `order` (type: `string`):

How mode=markets sorts coins. Legacy `sort` and `orderBy` are accepted.

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

Only return coins in this CoinGecko category (mode=markets), e.g. decentralized-finance-defi, layer-1, stablecoins. Run mode=categories to discover slugs. Legacy `categoryId` is accepted.

## `startPage` (type: `integer`):

First 250-coin page to read in mode=markets. Use it to resume a deep ranking after CoinGecko's rate limit. Legacy `page` is accepted.

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

Maximum records to return. Rankings page through CoinGecko 250 at a time, so values above 250 cost extra requests and may wait on the public rate limit. Legacy `limit` is accepted.

## `includeSparkline` (type: `boolean`):

Add the raw 168-hour price series (sparklineIn7d) to each ranking record. Off keeps records small.

## `minMarketCap` (type: `number`):

Drop coins whose market cap is below this value in the chosen quote currency (mode=markets).

## `maxMarketCap` (type: `number`):

Drop coins whose market cap is above this value in the chosen quote currency (mode=markets).

## `minRank` (type: `integer`):

Drop coins ranked above this number, e.g. 101 to skip the top 100 (mode=markets).

## `maxRank` (type: `integer`):

Drop coins ranked below this number, e.g. 500 to stop at rank 500 (mode=markets).

## `minVolume24h` (type: `number`):

Drop coins whose 24-hour trading volume is below this value (mode=markets). Legacy `min24hVolume` is accepted.

## `maxVolume24h` (type: `number`):

Drop coins whose 24-hour trading volume is above this value (mode=markets).

## `categoryOrder` (type: `string`):

How mode=categories sorts the category directory. Legacy `catOrder` is accepted.

## Actor input object example

```json
{
  "mode": "markets",
  "searchQuery": "bitcoin",
  "coinIds": [],
  "vsCurrency": "usd",
  "order": "market_cap_desc",
  "startPage": 1,
  "maxItems": 3,
  "includeSparkline": false,
  "categoryOrder": "market_cap_desc"
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset containing every emitted record. The recordType field identifies coin, trending_coin, trending_nft, trending_category, trending_rwa or coin_category.

# 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 = {
    "mode": "markets",
    "searchQuery": "bitcoin",
    "coinIds": [],
    "vsCurrency": "usd",
    "order": "market_cap_desc",
    "startPage": 1,
    "maxItems": 3,
    "includeSparkline": false,
    "categoryOrder": "market_cap_desc"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dataspryva/coingecko-coin-rankings-trending-and-categories").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 = {
    "mode": "markets",
    "searchQuery": "bitcoin",
    "coinIds": [],
    "vsCurrency": "usd",
    "order": "market_cap_desc",
    "startPage": 1,
    "maxItems": 3,
    "includeSparkline": False,
    "categoryOrder": "market_cap_desc",
}

# Run the Actor and wait for it to finish
run = client.actor("dataspryva/coingecko-coin-rankings-trending-and-categories").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 '{
  "mode": "markets",
  "searchQuery": "bitcoin",
  "coinIds": [],
  "vsCurrency": "usd",
  "order": "market_cap_desc",
  "startPage": 1,
  "maxItems": 3,
  "includeSparkline": false,
  "categoryOrder": "market_cap_desc"
}' |
apify call dataspryva/coingecko-coin-rankings-trending-and-categories --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dataspryva/coingecko-coin-rankings-trending-and-categories"
        }
    }
}
```

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/JKrGKgqThTb9e8blX/builds/5J9pjVjwAi3y3uqXV/openapi.json
