APIs / Finance / CoinGecko

1 credit per call7 endpoints5 datapointsChecked working 25 Nov 2026

CoinGecko API

CoinGecko API for coin search, coin details, price history, listings, markets, exchanges and trending coins as JSON. 1 credit per successful call.

CoinGecko
GET/v1/coingecko/search?q=bitcoin
{
  "success": true,
  "data": {
    "query": "bitcoin",
    "search": [
      {
        "id": "bitcoin",
        "name": "Bitcoin",
        "symbol": "btc",
        "image": "https://coin-images.coingecko.com/coins/images/1/large/bitcoin.png",
        "rank": 1
      },
      {
        "id": "bitcoin-cash",
        "name": "Bitcoin Cash",
        "symbol": "bch",
        "image": "https://coin-images.coingecko.com/coins/images/780/large/bitcoin-cash-circle.png",
        "rank": 23
      },
      {
        "id": "bitcoin-cash-sv",
        "name": "Bitcoin SV",
        "symbol": "bsv",
        "image": "https://coin-images.coingecko.com/coins/images/6799/large/BSV.png",
        "rank": 123
      }
    ],
    "pagination": {
      "page": 1,
      "per_page": 100,
      "total": 25,
      "total_pages": 1,
      "has_more": false
    }
  },
  "meta": {
    "endpoint_family": "search",
    "source": "coingecko",
    "request_id": "req_21ed862f82f6429dbc64faa5211564f3",
    "credits_charged": 1,
    "credits_remaining": 999
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of search: the fields and shapes you will get, shortened to 3 items.

#idstringnamestringsymbolstringimageurlrankinteger
1bitcoinBitcoinbtchttps://coin-images.coingecko.com/coins/images/1/large/bitcoin.png1
2bitcoin-cashBitcoin Cashbchhttps://coin-images.coingecko.com/coins/images/780/large/bitcoin-cash-circle.png23
3bitcoin-cash-svBitcoin SVbsvhttps://coin-images.coingecko.com/coins/images/6799/large/BSV.png123

Recorded from our API · 3 items shown · 5 datapoints per itemGET /v1/coingecko/search?q=bitcoin

5 datapoints

Identity

  • idstring
  • namestring

Reputation

  • imageurl

Other

  • symbolstring
  • rankinteger

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/coingecko/search?q=bitcoin" \
  -H "X-API-Key: $API_KEY"

CoinGecko · 7 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/coingecko/coin
id+1 optional
coin
1 credit
GET/v1/coingecko/exchanges
none+2 optional
idnamecountryurlimagetrust_score+3 more
1 credit
GET/v1/coingecko/history
id+2 optional
iddayscurrencypointshistory
1 credit
GET/v1/coingecko/listings
none+5 optional
idsymbolnameimagerankprice+16 more
1 credit
GET/v1/coingecko/markets
id+2 optional
idmarketspagination
1 credit
GET/v1/coingecko/search
q+2 optional
idnamesymbolimagerank
1 credit
GET/v1/coingecko/trending
none+1 optional
idcoin_idsymbolnameimagerank+4 more
1 credit

Overview

About the CoinGecko API

What you can get

The CoinGecko API returns CoinGecko crypto market data as JSON through 7 endpoints.

  • Search: search takes a q, with page and per_page.
  • One coin: coin takes an id, with currency (USD, EUR, GBP or BTC).
  • Price history: history takes an id, with days and currency.
  • Listings: listings takes page, per_page, currency, category and order (market_cap_desc, volume_desc, volume_asc, id_asc or id_desc).
  • Markets: markets takes an id, with page and currency, and lists the trading pairs for that coin.
  • Exchanges and trending: exchanges takes page and per_page; trending takes an optional currency.

The recorded search for "bitcoin" returns query, search and pagination. Each result has id, name, symbol, image and rank, and pagination reports a total of 25 matches on one page. The first result is bitcoin at rank 1, followed by bitcoin-cash and bitcoin-cash-sv.

How a call works

Search, then read the coin: GET /v1/coingecko/search?q=bitcoin, with your key in the X-API-Key header, returns each coin's id. Pass that to coin, history or markets, for example GET /v1/coingecko/history?id=bitcoin&days=30, which returned 31 points, each with timestamp, price, market_cap and volume. Check has_more in pagination before asking for the next page. Every successful call costs 1 credit; failed calls cost nothing.

FinanceJSONRESTMCP

More finance APIs

Use cases

Rank coins by market cap or volume with `listings`

Use the CoinGecko API to rank coins by market cap or volume with `listings`

Chart a coin's price, market cap and volume over `days`

Use the CoinGecko API to chart a coin's price, market cap and volume over `days`

Compare a coin's price and volume across trading pairs with `markets`

Use the CoinGecko API to compare a coin's price and volume across trading pairs with `markets`

Watch which coins are trending

Use the CoinGecko API to watch which coins are trending

FAQ

Questions

How much does the CoinGecko 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.

Which currencies can prices come back in?

`coin`, `history`, `listings`, `markets` and `trending` take a `currency` of `USD`, `EUR`, `GBP` or `BTC`.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Do I need a CoinGecko account?

No. You call this CoinGecko API with your Perceptlayer key in the `X-API-Key` header, with no CoinGecko login.

Is this the official CoinGecko API?

No. Perceptlayer is an independent service and is not affiliated with CoinGecko. It returns CoinGecko data as JSON with a Perceptlayer key, so there is no CoinGecko developer account, app review or partner approval to get first. It only reads data: if CoinGecko has an official API and you need to act on your own CoinGecko account, such as posting, managing orders or reading private data, use that one.

Should I build a CoinGecko scraper instead?

You can, but a CoinGecko scraper is code you maintain: page changes break it, requests get blocked, and CoinGecko's terms govern how you collect data. The CoinGecko 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 CoinGecko API with 100 free credits

No credit card. Failed calls are never billed.