APIs / Finance / CoinMarketCap
1 credit per call7 endpoints6 datapointsChecked working 25 Nov 2026
CoinMarketCap API
CoinMarketCap API for crypto search, coin details, OHLC history, listings, markets, exchanges and trending coins as JSON. 1 credit per successful call.
{
"success": true,
"data": {
"query": "bitcoin",
"search": [
{
"id": 1,
"name": "Bitcoin",
"symbol": "BTC",
"slug": "bitcoin",
"rank": 1,
"type": 1
},
{
"id": 3717,
"name": "Wrapped Bitcoin",
"symbol": "WBTC",
"slug": "wrapped-bitcoin",
"rank": 7764,
"type": 1,
"contract_address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
},
{
"id": 1831,
"name": "Bitcoin Cash",
"symbol": "BCH",
"slug": "bitcoin-cash",
"rank": 20,
"type": 1,
"contract_address": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf"
}
],
"pagination": {
"page": 1,
"per_page": 100,
"total": 259,
"total_pages": 3,
"has_more": true
}
},
"meta": {
"endpoint_family": "search",
"source": "coinmarketcap",
"request_id": "req_e681b75b2c484e73adcdf6d32f62d194",
"credits_charged": 1,
"credits_remaining": 998
}
}Sample data
What one call returns
A recorded run of search: the fields and shapes you will get, shortened to 3 items.
| # | idinteger | namestring | symbolstring | slugstring | rankinteger | typeinteger |
|---|---|---|---|---|---|---|
| 1 | 1 | Bitcoin | BTC | bitcoin | 1 | 1 |
| 2 | 3717 | Wrapped Bitcoin | WBTC | wrapped-bitcoin | 7764 | 1 |
| 3 | 1831 | Bitcoin Cash | BCH | bitcoin-cash | 20 | 1 |
[
{
"id": 1,
"name": "Bitcoin",
"symbol": "BTC",
"slug": "bitcoin",
"rank": 1,
"type": 1
},
{
"id": 3717,
"name": "Wrapped Bitcoin",
"symbol": "WBTC",
"slug": "wrapped-bitcoin",
"rank": 7764,
"type": 1,
"contract_address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
},
{
"id": 1831,
"name": "Bitcoin Cash",
"symbol": "BCH",
"slug": "bitcoin-cash",
"rank": 20,
"type": 1,
"contract_address": "0x8fF795a6F4D97E7887C79beA79aba5cc76444aDf"
}
]id,name,symbol,slug,rank,type 1,Bitcoin,BTC,bitcoin,1,1 3717,Wrapped Bitcoin,WBTC,wrapped-bitcoin,7764,1 1831,Bitcoin Cash,BCH,bitcoin-cash,20,1
Recorded from our API · 3 items shown · 6 datapoints per itemGET /v1/coinmarketcap/search?q=bitcoin
6 datapoints
Identity
- idinteger
- namestring
- slugstring
- typeinteger
Other
- symbolstring
- rankinteger
Playground
Run this API
curl "https://api.perceptlayer.com/v1/coinmarketcap/search?q=bitcoin" \
-H "X-API-Key: $API_KEY"CoinMarketCap · 7 endpoints
Endpoints
Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.
| Endpoint | Required parameters | Returns | Cost |
|---|---|---|---|
GET/v1/coinmarketcap/coin | none+3 optional | coin | 1 credit |
GET/v1/coinmarketcap/exchanges | none+4 optional | idnameslugscorevolume_24hcurrency+4 more | 1 credit |
GET/v1/coinmarketcap/history | id+3 optional | idrangeintervalpointscurrencyhistory | 1 credit |
GET/v1/coinmarketcap/listings | none+5 optional | idnamesymbolslugrankmarket_pair_count+13 more | 1 credit |
GET/v1/coinmarketcap/markets | id+5 optional | idmarketspagination | 1 credit |
GET/v1/coinmarketcap/search | q+2 optional | idnamesymbolslugranktype+1 more | 1 credit |
GET/v1/coinmarketcap/trending | none+4 optional | idnamesymbolslugrankprice+7 more | 1 credit |
Overview
About the CoinMarketCap API
What you can get
The CoinMarketCap API returns CoinMarketCap crypto market data as JSON through 7 endpoints.
- Search:
searchtakes aq, withpageandper_page. - One coin:
cointakes anidor aslug, withcurrency(USD). - Price history:
historytakes anid, withrange,interval(dailyor1h) andcurrency(USD). - Listings:
listingstakespage,per_page,sort(market_cap,volume_24h,percent_change_24h,priceorcirculating_supply),order(descorasc) andcurrency(USD,EUR,GBP,BTCorETH). - Markets:
marketstakes anid, withpage,per_page,sort(volume),categoryandcurrency. - Exchanges:
exchangestakespage,per_page,sort(volumeorscore) andorder. - Trending:
trendingtakespage,per_page,interval(24h) andcurrency.
The recorded search for "bitcoin" returns query, search and pagination. Each result has id, name, symbol, slug, rank and type, and pagination reports a total of 259 matches over 3 pages. The first result is Bitcoin with id 1 and slug bitcoin.
How a call works
Search, then read the coin: GET /v1/coinmarketcap/search?q=bitcoin, with your key in the X-API-Key header, returns each coin's numeric id. Pass that to coin, history or markets, for example GET /v1/coinmarketcap/history?id=1&range=30d&interval=daily, which returned 30 points, each with open, high, low, close, volume, market_cap and circulating_supply. Check has_more in pagination before asking for the next page. Every successful call costs 1 credit; failed calls cost nothing.
More finance APIs
Use cases
Rank coins by market cap, volume or 24-hour change with `listings`
Use the CoinMarketCap API to rank coins by market cap, volume or 24-hour change with `listings`Pull daily or hourly OHLC candles for a coin
Use the CoinMarketCap API to pull daily or hourly OHLC candles for a coinCompare a coin's price and liquidity across exchanges and pairs with `markets`
Use the CoinMarketCap API to compare a coin's price and liquidity across exchanges and pairs with `markets`Rank exchanges by `volume` or `score`
Use the CoinMarketCap API to rank exchanges by `volume` or `score`FAQ
Questions
How much does the CoinMarketCap API cost?
Each successful call costs one credit, whichever endpoint you call, and each page is one call. New accounts get free credits to start, and credit packs bring the price down as you scale.
Can I look up a coin by name instead of number?
Yes. `coin` takes either a numeric `id`, such as 1, or a `slug`, such as `bitcoin`. `history` and `markets` need the numeric `id`, which `search` returns.
What format are responses in?
Every endpoint returns JSON, with no HTML parsing on your side.
Do I need a CoinMarketCap account?
No. You call this CoinMarketCap API with your Perceptlayer key in the `X-API-Key` header, with no CoinMarketCap login.
Is this the official CoinMarketCap API?
No. Perceptlayer is an independent service and is not affiliated with CoinMarketCap. It returns CoinMarketCap data as JSON with a Perceptlayer key, so there is no CoinMarketCap developer account, app review or partner approval to get first. It only reads data: if CoinMarketCap has an official API and you need to act on your own CoinMarketCap account, such as posting, managing orders or reading private data, use that one.
Should I build a CoinMarketCap scraper instead?
You can, but a CoinMarketCap scraper is code you maintain: page changes break it, requests get blocked, and CoinMarketCap's terms govern how you collect data. The CoinMarketCap API gives you 7 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.
Try the CoinMarketCap API with 100 free credits
No credit card. Failed calls are never billed.