Skip to main content

TL;DR

Use the CoinGecko MCP Server for plug-and-play agent integration, /simple/price for real-time price lookups, /coins/markets for bulk market context, /search/trending for trending signals, and /coins/{id} for deep-dive coin research.

AI agents and LLM-powered applications need reliable, structured crypto data to answer user questions, execute workflows, and generate insights - whether you’re building a conversational trading assistant, a market research copilot, or an autonomous agent pipeline that reacts to real-time market signals. This guide walks you through the CoinGecko API endpoints and integration methods that matter most for AI agent workflows, and ties them together into a complete workflow at the end:
  • MCP Server to connect live crypto data directly to your agent pipeline
  • Trending coins and market data to populate your LLM’s context window with timely signals
  • Onchain token and pool data across 250+ networks for DeFi-native agent capabilities
  • Structured coin metadata for grounding agent responses with accurate fundamentals
Estimated reading time: 10 minutes
Want to get started even faster?
Copy the contents of this page from ai-agents-llm-apps.md and paste it directly into your AI tool for instant context.

Navigate the API faster with AI

Install the CoinGecko SKILL to give your AI coding agent built-in knowledge of every endpoint, parameter, and workflow. Setup takes less than 3 minutes.

Endpoint Overview

EndpointWhat It Gives YouBest For
/simple/priceReal-time prices with optional market cap, volume, and 24h changeQuick price lookups in agent responses
/coins/marketsBulk market data for multiple coins in a single callPopulating LLM context with market overview
/coins/{id}Full coin metadata, supply, ATH, volume, community, and developer dataDeep-dive coin research for agent queries
/coins/listComplete list of all supported coins with IDs and symbolsResolving coin names to API IDs in agent pipelines
/search/trendingTrending coins, NFTs, and categories in the last 24 hoursAnswering “what’s trending?” queries
/globalTotal market cap, BTC dominance, volume, and active coinsGrounding agents with macro market context
/onchain/simple/networks/../token_price/..Onchain token prices by contract address across any networkPricing DEX tokens not listed on CoinGecko
/onchain/networks/trending_poolsTrending liquidity pools across all networksSurfacing onchain DeFi momentum for agents
/onchain/networks/../tokens/../infoToken metadata, socials, websites, and analytics scoreResearching onchain tokens for agent responses
Replace YOUR_API_KEY in the examples below with your actual CoinGecko API key.
Don’t have one yet? Get your API key here.

Connecting via MCP Server

The fastest way to give your AI agent access to CoinGecko data. The MCP (Model Context Protocol) Server lets LLM clients like Claude Desktop, Cursor, and Gemini CLI query CoinGecko directly - no custom API code needed. Public server (keyless) - great for testing and quick prototyping:
{
  "mcpServers": {
    "coingecko_mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.api.coingecko.com/mcp"
      ]
    }
  }
}
Authenticated server - for production apps with higher rate limits and 76+ tools:
{
  "mcpServers": {
    "coingecko_mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.pro-api.coingecko.com/mcp"
      ]
    }
  }
}
Add either config to your client’s mcp_config.json and your agent can immediately query prices, trending coins, onchain data, and more - all through natural language.
For full setup instructions, including video walkthroughs and client-specific config paths, see the CoinGecko MCP Server page.

Real-Time Prices for Agent Responses - /simple/price

🔗 More endpoint details here The go-to endpoint when your agent needs to answer “What’s the price of X?” - fast, lightweight, and supports batching multiple coins in a single request. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd&include_market_cap=true&include_24hr_change=true" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
ids / symbolsQuery by CoinGecko ID or ticker symbol - batch multiple coins in one call
vs_currenciesReturn prices in multiple currencies simultaneously (e.g., usd,eur,btc)
include_market_capAdd market cap context alongside price
include_24hr_changeInclude 24h change for trend-aware responses
precisionControl decimal places for cleaner agent output
Response highlights:
{
  "bitcoin": {
    "usd": 67432.51,
    "usd_market_cap": 1326789012345,
    "usd_24h_change": 2.34567
  },
  "ethereum": {
    "usd": 3456.78,
    "usd_market_cap": 415678901234,
    "usd_24h_change": 1.23456
  }
}
This response is compact and structured - ideal for injecting into an LLM context window without consuming excessive tokens.

Bulk Market Data for LLM Context - /coins/markets

🔗 More endpoint details here When your agent needs broader market awareness - top coins by market cap, price movers, or a full market snapshot to ground its reasoning. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=20&page=1&price_change_percentage=1h,24h,7d" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
orderSort by market_cap_desc or volume_desc to surface what’s most relevant
per_pageUp to 250 coins per page - one call can populate an entire context window
price_change_percentageInclude 1h,24h,7d for multi-timeframe momentum context
categoryFilter by sector (e.g., decentralized-finance-defi, layer-1) for domain-specific agents
Response highlights:
{
  "id": "bitcoin",
  "symbol": "btc",
  "name": "Bitcoin",
  "current_price": 67432.51,
  "market_cap": 1326789012345,
  "market_cap_rank": 1,
  "total_volume": 28394567890,
  "price_change_percentage_24h_in_currency": 2.34,
  "price_change_percentage_7d_in_currency": 5.67
}
For agents that need to stay within token limits, request only the top 10-20 coins and omit sparkline=true to keep the response compact.

/search/trending

🔗 More endpoint details here Surfaces the coins, NFTs, and categories trending on CoinGecko in the last 24 hours. Essential for agents that need to answer “What’s hot right now?” or detect emerging market interest. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/search/trending" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Response highlights:
{
  "coins": [
    {
      "item": {
        "id": "pepe",
        "name": "Pepe",
        "symbol": "PEPE",
        "market_cap_rank": 46,
        "data": {
          "price": 0.0000082,
          "price_change_percentage_24h": { "usd": 15.67 },
          "market_cap": "$3,456,789,012",
          "total_volume": "$1,234,567,890"
        }
      }
    }
  ],
  "categories": [
    {
      "name": "Meme",
      "data": {
        "market_cap_change_percentage_24h": { "usd": 8.45 }
      }
    }
  ]
}

/coins/list

🔗 More endpoint details here Returns the complete list of all supported coins with their CoinGecko IDs, names, and symbols. This is a critical lookup table for agent pipelines - when a user says “tell me about Solana”, your agent needs to resolve that to the ID solana before calling other endpoints. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/coins/list?include_platform=true" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
include_platformInclude contract addresses per platform - useful for resolving tokens by address
Response highlights:
[
  {
    "id": "bitcoin",
    "symbol": "btc",
    "name": "Bitcoin",
    "platforms": {}
  },
  {
    "id": "usd-coin",
    "symbol": "usdc",
    "name": "USDC",
    "platforms": {
      "ethereum": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "solana": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    }
  }
]
Cache this list locally and refresh periodically. It’s a lightweight call that saves your agent from making redundant lookups on every user query.

Deep-Dive Coin Research - /coins/{id}

🔗 More endpoint details here The most comprehensive endpoint for when your agent needs to provide a thorough answer about a specific coin - ATH, supply metrics, community data, developer activity, and more in a single call. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/coins/ethereum?localization=false&tickers=false&community_data=true&developer_data=true" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
localizationSet to false to reduce response size and token usage
tickersSet to false if exchange data isn’t needed - significantly reduces payload
community_dataIncludes Twitter followers, Reddit subscribers, and Telegram members
developer_dataIncludes GitHub commits, stars, forks, and contributors
Response highlights:
{
  "id": "ethereum",
  "symbol": "eth",
  "name": "Ethereum",
  "description": { "en": "Ethereum is a decentralized platform for applications..." },
  "links": {
    "homepage": ["https://www.ethereum.org/"],
    "subreddit_url": "https://www.reddit.com/r/ethereum"
  },
  "market_data": {
    "current_price": { "usd": 3456.78 },
    "market_cap": { "usd": 415678901234 },
    "ath": { "usd": 4878.26 },
    "circulating_supply": 120234567,
    "total_supply": 120234567
  },
  "community_data": {
    "twitter_followers": 3456789,
    "reddit_subscribers": 2345678
  },
  "developer_data": {
    "commit_count_4_weeks": 234
  }
}
Set tickers=false and localization=false to keep the response under 5KB - important when injecting coin data into LLM context windows with token limits.

Global Market Context - /global

🔗 More endpoint details here Gives your agent the big-picture view - total crypto market cap, BTC dominance, volume, and active coin count. Use this to ground agent responses with macro context before diving into specifics. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/global" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Response highlights:
{
  "data": {
    "active_cryptocurrencies": 15234,
    "markets": 1089,
    "total_market_cap": { "usd": 2678901234567 },
    "total_volume": { "usd": 89012345678 },
    "market_cap_percentage": {
      "btc": 52.34,
      "eth": 16.78
    },
    "market_cap_change_percentage_24h_usd": 1.23
  }
}
A compact response that gives your agent everything it needs to open with “The total crypto market cap is $2.67T, with BTC dominance at 52.3%…” before answering specific questions.

Onchain Token and Pool Data

For agents that need to work with DeFi protocols, DEX tokens, and onchain analytics across 250+ supported networks.

/onchain/simple/networks/{network}/token_price/{addresses}

🔗 More endpoint details here Get real-time prices for any onchain token by contract address - including tokens not yet listed on CoinGecko’s main platform. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/onchain/simple/networks/eth/token_price/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
network (path)The blockchain network (e.g., eth, solana, base, arbitrum)
addresses (path)Token contract address(es) to price
Response highlights:
{
  "data": {
    "id": "eth_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "type": "simple_token_price",
    "attributes": {
      "token_prices": {
        "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "1.0"
      }
    }
  }
}

/onchain/networks/trending_pools

🔗 More endpoint details here Surfaces the hottest liquidity pools across all networks - a powerful signal for agents tracking DeFi momentum and new token activity. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/onchain/networks/trending_pools?include=base_token&duration=24h" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Key parameters:
ParameterWhy It Matters
includeAdd base_token, quote_token, dex, network for richer context
durationFilter by 1h, 6h, or 24h trending window
Response highlights:
{
  "data": [
    {
      "type": "pool",
      "attributes": {
        "name": "USDC / WETH",
        "base_token_price_usd": "3456.78",
        "reserve_in_usd": "234567890",
        "volume_usd": { "h24": "123456789" },
        "price_change_percentage": { "h24": "2.34" },
        "transactions": { "h24": { "buys": 12345, "sells": 10234 } }
      }
    }
  ]
}

/onchain/networks/{network}/tokens/{address}/info

🔗 More endpoint details here Get rich metadata for any onchain token - description, socials, websites, and GeckoTerminal analytics score. Perfect for agents that need to provide context about lesser-known tokens. Example request:
curl -X GET "https://pro-api.coingecko.com/api/v3/onchain/networks/eth/tokens/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/info" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
Response highlights:
{
  "data": {
    "attributes": {
      "name": "USD Coin",
      "symbol": "USDC",
      "coingecko_coin_id": "usd-coin",
      "description": "USDC is a fully collateralized US dollar stablecoin...",
      "websites": ["https://www.circle.com/en/usdc"],
      "gt_score": 92.34,
      "twitter_handle": "circle"
    }
  }
}
The coingecko_coin_id field bridges onchain data to CoinGecko’s main API - use it to cross-reference with /coins/{id} for a complete research profile.

Putting It All Together

Here’s how these endpoints fit into a typical AI agent workflow:
  1. Connect via MCP - Set up the CoinGecko MCP Server for instant, natural-language access to all endpoints
  2. Build a coin lookup table - Cache /coins/list to resolve user queries (names, symbols, addresses) to CoinGecko IDs
  3. Set macro context - Query /global to ground your agent with overall market conditions
  4. Answer price questions - Use /simple/price for fast, lightweight price lookups in real time
  5. Populate market context - Fetch /coins/markets to give your LLM awareness of top coins and movers
  6. Surface trending signals - Pull /search/trending to keep your agent up to date on market momentum
  7. Deep-dive on demand - Query /coins/{id} when users ask for detailed research on a specific coin
  8. Go onchain - Use onchain endpoints for DEX token pricing, trending pools, and token metadata across 250+ networks

Integrate with CoinGecko MCP Server

Connect your AI agent directly to CoinGecko’s API using our MCP server - enabling real-time crypto data queries from tools like Claude Desktop, Cursor, and more.

Have feedback or need help? Reach out to eason.lim@coingecko[dot]com