CoinGecko API

Beginner's Pick Cryptocurrency / API Key Beginner HTTPS
30 calls/minute (free tier)
88 A
Measured Score 0 50 100 Speed 28/30 Consistency 17/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

CoinGecko provides comprehensive cryptocurrency market data covering 10,000+ coins across 700+ exchanges, including prices, market caps, trading volume, and developer or community statistics. The free Demo API tier allows up to 30 calls per minute and is sufficient for most hobby projects without a credit card. Historical price data going back years is available through dedicated endpoints.

Beginner Tip

Get started with the free Demo plan at coingecko.com/api/documentation — your free API key goes in the x-cg-demo-api-key header and unlocks all basic endpoints with higher rate limits than the keyless tier.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd
Result
HTTP 200 · application/json · 52 bytes · compressed
Response time
36 ms (median of 3) · fastest 32 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
bitcoin object {1 fields}
ethereum object {1 fields}

Captured Response

Captured from a real request to https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "bitcoin": {
    "usd": 63967
  },
  "ethereum": {
    "usd": 1877.43
  }
}

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
// Get Bitcoin price in USD
const url = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd";

const response = await fetch(url, {
  headers: {
    "x-cg-demo-api-key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();

console.log(`Bitcoin price: $${data.bitcoin.usd}`);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist application/json
{
  "error": "Incorrect path. Please check https://docs.coingecko.com/"
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

429 Too Many Requests Exceeded the free tier rate limit of 30 calls per minute
Add a delay between requests or cache responses; for production use, upgrade to a paid plan or use the bulk /coins/markets endpoint.
Coin not found (404 or empty response) Using the wrong coin ID — CoinGecko uses slugs, not ticker symbols
Call /coins/list to get the full ID mapping; use "shiba-inu" not "SHIB".
vs_currencies parameter error Passing an unsupported fiat or currency code
Check /simple/supported_vs_currencies for the exact list; use lowercase codes like usd, eur, jpy.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 28/30
Consistency 17/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 36ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Beginner
Endpoint last called: 2026-08-10

Alternatives to CoinGecko

Technical alternatives for different use cases.

Read-only market data without exchange account needed

Better For

Executing actual trades and managing portfolios

Trade-off

Price tracking without needing an exchange account

Much larger free tier with more coin coverage

Better For

Apilayer ecosystem integration

Trade-off

Comprehensive crypto data without paid plan

Industry standard for crypto market data and rankings

Better For

Market cap rankings and global crypto metrics

Trade-off

Free tier generosity (CoinGecko has better free plan)

Free crypto data with market overview and exchange info

Better For

Free comprehensive crypto market data

Trade-off

DeFi protocol and NFT data coverage

Extensive historical data with social stats and mining info

Better For

Historical price data and social sentiment metrics

Trade-off

Simple current price lookups

Similar APIs

View All →