# Crypto Market Data API — prices, market cap, charts (no key) (`synthetic.ia/coingecko-crypto`) Actor

Real-time crypto prices, market data, historical charts and coin search for thousands of coins, via CoinGecko. No API key. Clean HTTP API + MCP. Pay per query.

- **URL**: https://apify.com/synthetic.ia/coingecko-crypto.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 crypto queries

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

## Crypto Market Data API — prices, market cap, charts (no key)

Get **crypto market data over a clean HTTP API** — real-time prices, market cap, volume, 24h/7d change, historical charts and coin search — for **thousands of coins** in any currency. Powered by CoinGecko, wrapped into tidy JSON. No API key, no signup. Pay per query.

- 💰 **Prices** — real-time price, market cap, 24h volume & change for any coins at once
- 📊 **Markets** — ranked table (top coins or specific ids) with price, cap, volume, 24h/7d change, ATH
- 📈 **Charts** — historical prices (days or full history)
- 🔎 **Search** — find a coin by name or symbol
- 🌍 **Any currency** — USD, EUR, ARS, BTC… and thousands of coins
- ⚡ HTTP API (Standby) + usable from AI agents (MCP)

### Sample output (price)

```json
{
  "ok": true,
  "prices": {
    "bitcoin": { "usd": 76497, "usd_market_cap": 1536000000000, "usd_24h_vol": 28000000000, "usd_24h_change": 0.52 },
    "ethereum": { "usd": 2451.2, "usd_market_cap": 299000000000, "usd_24h_change": 1.8 }
  }
}
```

### How to use

#### HTTP API (Standby — recommended)

Base URL: `https://synthetic-ia--coingecko-crypto.apify.actor` with header `Authorization: Bearer <APIFY_TOKEN>`.

| Endpoint | Body | Does |
|---|---|---|
| `POST /price` | `{ ids: "bitcoin,ethereum", currencies?: "usd,eur" }` | Prices + market cap + 24h change |
| `POST /markets` | `{ currency?: usd, ids?, perPage?: 1-250, page? }` | Ranked market table |
| `POST /chart` | `{ id: "bitcoin", days?: 1-3650 \| max, currency? }` | Historical prices |
| `POST /search` | `{ q }` | Find coins |
| `GET /` | — | Endpoint list |

`GET /price?ids=bitcoin,ethereum` also works (query-string form).

```bash
## Prices for several coins
curl -X POST ".../price" -H "Authorization: Bearer $APIFY_TOKEN" \
  -d '{"ids":["bitcoin","ethereum","solana"],"currencies":"usd,eur"}'

## Top 50 coins by market cap
curl -X POST ".../markets" -H "Authorization: Bearer $APIFY_TOKEN" -d '{"currency":"usd","perPage":50}'

## 30-day chart
curl -X POST ".../chart" -H "Authorization: Bearer $APIFY_TOKEN" -d '{"id":"bitcoin","days":30}'
```

### Input (one-shot run)

- **operation** — `price`, `markets`, `chart` or `search`.
- **ids** — coin ids for Price/Markets (bitcoin, ethereum, solana…). **id** — a single coin for Chart.
- **currency** — vs currency (usd, eur, ars…). **days** — chart history (number or `max`).
- **perPage** — markets page size. **q** — search text.

### Pricing

**Per query** from **$0.01** (drops to $0.003 on higher tiers). Platform usage included. One `/markets` call returns hundreds of coins for a single query fee.

### Related Actors

- **[Yahoo Finance API](https://apify.com/synthetic.ia/yahoo-finance-api)** — stocks, ETFs & FX with the same clean-API approach.
- **[Weather API](https://apify.com/synthetic.ia/open-meteo-weather)** & **[Sports Data API](https://apify.com/synthetic.ia/sports-data-api)** — more no-key data APIs.

### FAQ

**Do I need a key?** No. We wrap CoinGecko's public API for you.

**How many coins?** Thousands — pass CoinGecko coin ids (e.g. `bitcoin`, not `BTC`). Use `/search` to find an id from a name or symbol.

**Rate limits?** The upstream free API is rate-limited by IP; the Actor retries transient limits, but very high volume may need caching on your side.

### Legal

Data by [CoinGecko](https://www.coingecko.com). Use is subject to their terms; attribute CoinGecko where appropriate. Market data only — **not investment advice**. You are responsible for how you use it.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/coingecko-crypto/changelog.md

# Actor input Schema

## `operation` (type: `string`):

What to fetch.

## `ids` (type: `array`):

Coin ids for Price/Markets, e.g. bitcoin, ethereum, solana.

## `id` (type: `string`):

A single coin id for Chart, e.g. bitcoin.

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

vs currency, e.g. usd, eur, ars.

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

Chart history: number of days (1-3650) or 'max'.

## `perPage` (type: `integer`):

1-250.

## `q` (type: `string`):

Search coins by name or symbol.

## Actor input object example

```json
{
  "operation": "markets",
  "ids": [
    "bitcoin",
    "ethereum"
  ],
  "id": "bitcoin",
  "currency": "usd",
  "days": "30",
  "perPage": 20
}
```

# Actor output Schema

## `result` (type: `string`):

The query result JSON.

## `runs` (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 = {
    "ids": [
        "bitcoin",
        "ethereum"
    ],
    "id": "bitcoin",
    "days": "30",
    "perPage": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/coingecko-crypto").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 = {
    "ids": [
        "bitcoin",
        "ethereum",
    ],
    "id": "bitcoin",
    "days": "30",
    "perPage": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/coingecko-crypto").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 '{
  "ids": [
    "bitcoin",
    "ethereum"
  ],
  "id": "bitcoin",
  "days": "30",
  "perPage": 20
}' |
apify call synthetic.ia/coingecko-crypto --silent --output-dataset

```

## MCP server setup

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

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/6W0tg4cNR2GbvQNfc/builds/AHkuUZ3dZ9LrxMVgx/openapi.json
