CoinGecko's public API at https://api.coingecko.com/api/v3 covers prices, market data, and history for thousands of coins. Coins are addressed by id (bitcoin, ethereum), not ticker. Every example below runs as-is.
None for the public API, which is tightly rate-limited. A free Demo key raises the limit — send it as the x-cg-demo-api-key header.
Full reference: https://docs.coingecko.com/reference/introduction
Several coins in several currencies in one call.
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd,eur"
{
"bitcoin": {
"usd": 84307,
"eur": 74052
},
"ethereum": {
"usd": 2671.63,
"eur": 2346.65
}
}
Price, market cap, rank, and 24-hour change — the data behind a leaderboard.
curl "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=3&page=1"
[
{
"id": "bitcoin",
"symbol": "btc",
"name": "Bitcoin",
"current_price": 84308,
"market_cap": 1694224192739,
"market_cap_rank": 1,
"price_change_percentage_24h": -2.30894,
"last_updated": "2026-09-23T20:31:30.000Z"
},
{
"id": "ethereum",
"symbol": "eth",
"name": "Ethereum",
"current_price": 2671.63,
"market_cap": 326225221059,
"market_cap_rank": 2,
"price_change_percentage_24h": -3.03463,
"last_updated": "2026-09-23T20:31:30.000Z"
}
]
What's being searched most on CoinGecko in the last 24 hours.
curl https://api.coingecko.com/api/v3/search/trending
{
"coins": [
{
"item": {
"id": "astronaut-2",
"name": "astronaut",
"symbol": "ASTRO",
"market_cap_rank": 839,
"score": 0
}
},
{
"item": {
"id": "edel",
"name": "Edel",
"symbol": "EDEL",
"market_cap_rank": 922,
"score": 1
}
},
{
"item": {
"id": "uniswap",
"name": "Uniswap",
"symbol": "UNI",
"market_cap_rank": 23,
"score": 2
}
}
]
}
Price, market cap, and volume over time as [unix ms, value] pairs.
curl "https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=1&interval=daily"
{
"prices": [
[
1790121600000,
86183.29442787907
],
[
1790195560000,
84307.46416891081
]
],
"market_caps": [
[
1790121600000,
1731252948699.2454
],
[
1790195560000,
1693622513582.9373
]
],
"total_volumes": [
[
1790121600000,
43496653159.936775
],
[
1790195560000,
44429988336.84008
]
]
}