# Crypto Price API | CoinGecko Scraper & Market Data (`andok/coingecko-scraper`) Actor

Scrape real-time crypto prices, market caps, and trading volumes. A high-speed CoinGecko API alternative for trading bots and portfolio trackers.

- **URL**: https://apify.com/andok/coingecko-scraper.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 5 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.47 / 1,000 price fetcheds

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

## CoinGecko Crypto Price & Market Data Scraper

Scrape real-time crypto prices and market data from CoinGecko to power portfolio trackers, price alerts, and AI trading agents. Feed it a list of coin IDs and get back current prices, market caps, 24h volume, price changes, and circulating supply — all from the public CoinGecko API in a single request. Schedule it on Apify for continuous market monitoring without managing API keys.

### Features

- **Bulk coin lookup** — fetch market data for hundreds of cryptocurrencies in a single run
- **Real-time pricing** — returns current price, 24h change percentage, and last-updated timestamp
- **Market fundamentals** — includes market cap, trading volume, and circulating supply
- **Multi-currency support** — price against any fiat currency (USD, EUR, GBP, JPY, etc.)
- **No API key required** — queries the free CoinGecko API endpoint directly
- **Batch optimization** — processes up to 250 coins per API call for maximum efficiency
- **Pay-per-result pricing** — only pay for coins returned, with charge-limit safety built in

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `coins` | `array` | Yes | — | List of CoinGecko coin IDs to look up (e.g. `bitcoin`, `ethereum`, `solana`) |
| `currency` | `string` | No | `usd` | Fiat currency to display prices in (e.g. `usd`, `eur`, `gbp`) |
| `timeoutSeconds` | `integer` | No | `15` | API request timeout in seconds (1-120) |

#### Input Example

```json
{
  "coins": ["bitcoin", "ethereum", "solana"],
  "currency": "usd",
  "timeoutSeconds": 15
}
```

### Output

Each dataset item represents one cryptocurrency. Key fields:

- `id` (`string`) — CoinGecko coin ID
- `symbol` (`string`) — ticker symbol (e.g. `btc`, `eth`)
- `name` (`string`) — full coin name
- `currentPrice` (`number`) — current price in the selected fiat currency
- `marketCap` (`number`) — market capitalization
- `totalVolume` (`number`) — 24h trading volume
- `priceChangePercentage24h` (`number`) — price change over the last 24 hours in percent
- `circulatingSupply` (`number`) — circulating token supply
- `lastUpdated` (`string`) — ISO timestamp of the last data update

#### Output Example

```json
{
  "id": "bitcoin",
  "symbol": "btc",
  "name": "Bitcoin",
  "currentPrice": 104250.00,
  "marketCap": 2058000000000,
  "totalVolume": 38500000000,
  "priceChangePercentage24h": 2.34,
  "circulatingSupply": 19742000,
  "lastUpdated": "2025-01-20T12:05:30.000Z"
}
```

### Pricing

| Event | Cost |
|-------|------|
| Price Fetched | Pay-per-event (see actor pricing page) |

### Use Cases

- **Portfolio tracking** — build crypto portfolio dashboards with scheduled price snapshots
- **Price alerts** — trigger notifications when coins cross price thresholds via webhooks
- **Market research** — collect historical price snapshots for trend analysis and reporting
- **AI agent tools** — supply live crypto context to LLM agents, trading bots, and financial chatbots
- **Spreadsheet automation** — export daily prices to Google Sheets via Apify integrations
- **DeFi monitoring** — track token prices and market caps for DeFi protocol analysis

### Related Actors

| Actor | What it adds |
|-------|-------------|
| [Yahoo Finance Scraper](https://apify.com/andok/yahoo-finance-scraper) | Add stock, ETF, and index data alongside crypto prices |
| [Binance Ticker Scraper](https://apify.com/andok/binance-ticker-scraper) | Get exchange-specific trading data directly from Binance |
| [CoinMarketCap Trending](https://apify.com/andok/cmc-trending-scraper) | Discover which coins are trending right now on CoinMarketCap |

### Notes

- CoinGecko's free API has a rate limit (approximately 10-30 calls/minute). For large coin lists, the actor batches requests to stay within limits.
- Coin IDs must match CoinGecko's identifier format (e.g. `bitcoin`, not `BTC`). Check the CoinGecko website for the correct ID.

# Actor input Schema

## `coins` (type: `array`):

List of CoinGecko coin IDs to look up. Use the CoinGecko ID format (e.g. bitcoin, ethereum, solana), not ticker symbols. Find IDs at coingecko.com.

## `currency` (type: `string`):

Fiat currency to display prices in. Supports standard currency codes (e.g. usd, eur, gbp, jpy).

## `timeoutSeconds` (type: `integer`):

API request timeout in seconds. The free CoinGecko API may be slow during high traffic periods.

## Actor input object example

```json
{
  "coins": [
    "bitcoin",
    "ethereum"
  ],
  "currency": "usd",
  "timeoutSeconds": 15
}
```

# Actor output Schema

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

No description

## `resultsCsv` (type: `string`):

No description

## `run` (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 = {
    "coins": [
        "bitcoin",
        "ethereum"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/coingecko-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 = { "coins": [
        "bitcoin",
        "ethereum",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("andok/coingecko-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 '{
  "coins": [
    "bitcoin",
    "ethereum"
  ]
}' |
apify call andok/coingecko-scraper --silent --output-dataset

```

## MCP server setup

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