Fetch CoinMarketCap Crypto Data
Purpose
Retrieve live cryptocurrency market data from CoinMarketCap — coin/token prices, market caps, supply, percent-change windows (1h/24h/7d/30d/60d/90d/YTD/1y), global market metrics (total market cap, BTC/ETH dominance, DeFi/stablecoin/derivatives volumes), trending/most-searched coins, and the latest crypto news articles. Read-only; never logs in, trades, or writes. The CoinMarketCap web UI is a thin client over a public, no-auth JSON API at https://api.coinmarketcap.com (distinct from the key-gated commercial pro-api.coinmarketcap.com). Lead with that API; the rendered site is a costly fallback.
When to Use
- Look up the current price, market cap, rank, supply, or recent performance of one or more coins/tokens.
- Pull the top-N coins by market cap (the homepage price table) in one request.
- Get a single coin's full profile (description, tags, links, statistics).
- Read global crypto market metrics (total market cap, 24h volume, BTC/ETH dominance, DeFi/stablecoin volume).
- Get trending / most-searched coins.
- Fetch the latest crypto news headlines, optionally filtered to a specific coin.
Workflow
CoinMarketCap's website fetches everything from a public JSON API at https://api.coinmarketcap.com — no API key, no cookies, no session, no anti-bot stealth, and no residential proxy required. All endpoints below returned 200 OK from a bare datacenter IP with no --verified/--proxies. Do not use pro-api.coinmarketcap.com unless you have a paid CMC API key — that is the separate commercial product and is key-gated. Lead with the API path; the browser flow at the bottom is a ~100× more expensive fallback because the price table is fully JS-rendered.
All endpoints accept a plain HTTP GET. No headers are required (no Referer, no Origin).
-
Top coins (the homepage price table — prices, market cap, supply, % changes):
GET https://api.coinmarketcap.com/data-api/v3/cryptocurrency/listing ?start=1&limit=100&convert=USDReturns
data.cryptoCurrencyList[], each withid,name,symbol,slug,cmcRank,circulatingSupply,totalSupply,maxSupply,tags[], and aquotes[]array (one entry perconvertcurrency) holdingprice,marketCap,volume24h, andpercentChange1h/24h/7d/30d/60d/90d,ytdPriceChangePercentage,percentChange1y,dominance,turnover. Paginate withstart(1-based) andlimit(observed working up to several hundred; keep ≤ 200/req to be safe). -
Resolve a ticker/name → CMC
idorslug(needed because the quote/detail endpoints rejectsymbol):GET https://api.coinmarketcap.com/data-api/v3/topsearch/rankReturns
data.cryptoTopSearchRanks[](trending/most-searched) withid,name,symbol,slug— useful for trending and as a cheap id lookup for popular coins. For arbitrary coins, the most reliable mapping is to scan thelistingresponse (step 1) for the matchingsymbol/name, or use the human-readable slug directly (e.g.bitcoin,ethereum) which equals the URL path segment oncoinmarketcap.com/currencies/{slug}/. -
Quote for a specific coin (price + all % changes), by
slugorid:GET https://api.coinmarketcap.com/data-api/v3/cryptocurrency/quote/latest ?slug=ethereum&convert=USD(or
?id=1027). Returnsdata[]withquotes[]containingprice,marketCap,volume24h, and the fullpercentChange*set.symbol=is rejected with"value" must contain at least one of [id, slug]— always passslugorid. -
Lite detail (fast single-coin snapshot):
GET https://api.coinmarketcap.com/data-api/v3/cryptocurrency/detail/lite?slug=ethereumReturns
data.statistics(price,priceChangePercentage24h,marketCap,circulatingSupply,totalSupply,rank) pluswatchCountandvolume. Cheapest call for "what's X worth right now." -
Full coin profile (description, links, metadata):
GET https://api.coinmarketcap.com/data-api/v3/cryptocurrency/detail?id=1&range=1D(or
?slug=bitcoin). Returns a richdataobject including a markdowndescription,category,tags, and statistics.rangeaccepts1D,7D,1M,1Y,ALLfor the chart window. -
Global market metrics:
GET https://api.coinmarketcap.com/data-api/v3/global-metrics/quotes/latest?convert=USDReturns
datawithbtcDominance,ethDominance,activeCryptoCurrencies,totalCryptoCurrencies,activeExchanges,defiVolume24h,defiMarketCap,stablecoinVolume24h,stablecoinMarketCap,derivativesVolume24h, and aquotes[]block withtotalMarketCap/totalVolume24H. -
Latest news:
GET https://api.coinmarketcap.com/content/v3/news?coins=1&page=1&size=20Returns
data[]of articles; each hasslug,cover,assets[](tagged coins, withcoinId), and ametaobject withtitle,subtitle,sourceName,sourceUrl,releasedAt/createdAt/updatedAt. Omitcoinsfor the general feed, or pass a CMC coinidto filter to news mentioning that coin. (coinstakes a numeric id, not a symbol.)
Browser fallback
Only if the API is unreachable. Open the page directly (no stealth needed — homepage returned 200 with full price table from a bare session):
- Price table:
https://coinmarketcap.com/ - Single coin:
https://coinmarketcap.com/currencies/{slug}/(e.g./currencies/bitcoin/) - Trending:
https://coinmarketcap.com/trending-cryptocurrencies/
The page is fully JS-rendered, so wait ~3s after navigation, then use browse get markdown body to extract the rendered table/values. Expect ~100× the cost of the API call and noisier output — prefer the API.
Site-Specific Gotchas
- Two different API hosts — use the right one.
api.coinmarketcap.com(the website's backend, paths under/data-api/v3/...and/content/v3/...) is public and key-free.pro-api.coinmarketcap.comis the separate commercial product and requires anX-CMC_PRO_API_KEYheader — don't confuse them. - No auth, no proxy, no stealth needed. Every endpoint returned
200from a bare datacenter IP with no headers. The 2026-06-02 anti-bot probe reported "none detected," confirmed in testing.--verified/--proxiesare unnecessary. quote/latestanddetailrejectsymbol. They requireidorslug(error:"value" must contain at least one of [id, slug]). Resolve a ticker to a slug/id first (step 2), or just use the lowercase slug (often equals the coin name, e.g.bitcoin,ethereum,solana).convertcurrency-name field is inconsistent across endpoints. Inlistingandquote/latest?convert=EURthe per-quotenameis the string"EUR"/"USD". Butquote/latest?convert=USDsometimes labels the quote"name":"2781"—2781is CMC's internal currency id for USD. Don't key offname; trust thepricefield and theconvertyou requested.- Numbers come back as ultra-high-precision decimal strings/numbers.
marketCapandpricecan have 20+ digits (e.g.marketCap: 14149685.17433656064643257546400000000000). Round/parse defensively; treat as decimal, not native float, if precision matters. selfReportedCirculatingSupplyvscirculatingSupply. Some tokens report their own supply (often inflated); theselfReported*fields are project-supplied and may differ wildly from CMC's verifiedcirculatingSupply/totalSupply. Prefer the non-self-reported fields for valuations.- News
coinsfilter is a numeric CMC id, not a symbol.?coins=1= Bitcoin. Theassets[]in each article also usecoinId(numeric). content/v3/news/aggregatedis flaky. It intermittently returnserror_code:"500" "The system is busy". Usecontent/v3/newsinstead./data-api/v3/cryptocurrency/searchdoes not exist (returns a 404 HTML page). For lookup usetopsearch/rankor scanlisting.robots.txtdisallows/headlines/*,/community/*/...,/dexscan/*for the rendered site, but the JSON API endpoints above are not listed there and are what the site itself calls. Keep request rate modest (≤ a few req/s) to avoid CloudFront throttling.- Data freshness.
lastUpdatedtimestamps update roughly once per minute; prices are near-real-time but not tick-level.
Expected Output
Top-coins listing (step 1):
{
"convert": "USD",
"coins": [
{
"id": 1,
"name": "Bitcoin",
"symbol": "BTC",
"slug": "bitcoin",
"cmc_rank": 1,
"price": 68008.354355674140,
"market_cap": 1362740523242.30,
"volume_24h": 46899326789.99,
"circulating_supply": 20037840.0,
"max_supply": 21000000.0,
"percent_change_1h": -1.19,
"percent_change_24h": -4.66,
"percent_change_7d": -11.60,
"last_updated": "2026-06-02T14:58:00.000Z"
}
]
}
Single-coin lite detail (step 4):
{
"id": 1027,
"name": "Ethereum",
"symbol": "ETH",
"slug": "ethereum",
"price": 1937.7813994588,
"price_change_percentage_24h": -1.2636,
"market_cap": 233861416438.24,
"circulating_supply": 120685138.43,
"total_supply": 120685138.43,
"rank": 2,
"watch_count": 4012473,
"volume": 18505169003.30
}
Global metrics (step 6):
{
"btc_dominance": 58.05,
"eth_dominance": 9.96,
"active_cryptocurrencies": 8267,
"total_cryptocurrencies": 37621,
"active_exchanges": 947,
"total_market_cap": 2351085688273.32,
"total_volume_24h": 110448447597.09,
"defi_market_cap": 69937669472.81,
"stablecoin_market_cap": 289756032634.40
}
Latest news (step 7):
{
"articles": [
{
"title": "Capital B's Ambitious Bitcoin Agenda Stirs Global Markets",
"subtitle": "The Bitcoin strategy of France's publicly traded firm, Capital B...",
"slug": "capital-bs-ambitious-bitcoin-agenda-stirs-global-markets",
"source_name": "BH NEWS",
"source_url": "https://coinmarketcap.com/community/articles/6a1eeec61ba4ca25cde17a17",
"cover": "https://en.bitcoinhaber.net/wp-content/uploads/2026/06/bitcoin-14-6a1eede1de220.webp",
"released_at": "2026-06-02T14:51:12.000Z",
"coins": [{ "coinId": 1, "name": "Bitcoin" }]
}
]
}