Search API Connector Documentation
Import CoinMarketCap Data to Google Sheets
In this guide, we’ll walk through how to pull cryptocurrency data from the CoinMarketCap API directly into Google Sheets, using the API Connector add-on for Sheets.
We'll first get an API key from CoinMarketCap, and then set up a request to pull in crypto data to your spreadsheet.
- Before You Begin
- Part 1: Get your CoinMarketCap API Key
- Part 2: Pull Data from CoinMarketCap into Sheets
- Part 3: Create a Custom Request
- Part 4: Handle Pagination
- Part 5: API Documentation
- Appendix: CoinMarketCap Crypto Portfolio Template
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Get Your CoinMarketCap API Key
- If you haven't already, navigate to https://coinmarketcap.com/api/ and click Get Your API Key Now
- Fill out your details and click Create My Account
- A moment later you'll receive an email. Click on the email to verify your account, and you'll be redirected into your new CoinMarketCap dashboard. Congrats! You now have access to the CoinMarketCap API. Hover over the API Key box in the top left and copy the key to your clipboard.
Part 2: Pull Data from CoinMarketCap into Sheets
The easiest way to get started with the CoinMarketCap API is through API Connector’s built-in integration.
- In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request)
- Select CoinMarketCap from the drop-down list of applications
- Under Authorization, enter your API key.
- Choose an endpoint. We’ll start with
/v1/cryptocurrency/listings/latest, which is the endpoint for fetching the latest market data.
- In the parameters section, select auxiliary fields to retrieve.
- Optionally select other parameters, e.g.
limitto get more than 100 records.
- Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
Part 3: Create a Custom Request
Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the API URLs shown in the API documentation. Here's an example request setup:
- Request URL:
Part 4: Handle Pagination
- CoinMarketCap limits the number of records returned in each request. By default, only 100 records will be returned unless you set the
limitparameter to 1000. (The documentation says you can specify a limit of up to 5000, but in my own tests limits > 1000 may produce an error).
- With API Connector you can loop through multiple pages of 1000 with offset-limit pagination handling (paid feature), like this:
- Pagination type:
- Offset parameter:
- Limit parameter:
- Limit value:
- Run until: choose when to stop running the request
- Pagination type:
Part 5: API Documentation
Official API documentation: https://coinmarketcap.com/api/documentation/v1/
Appendix: CoinMarketCap Template
Here is the template link.