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.
If you’re more of a video person, check out our new CoinMarketCap video here!
- 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.
- 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. For now we can skip the other parameters as they’re optional.
- 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 parameters and endpoints shown in CoinMarketCap’s API documentation. To create a custom request, add the complete URL into the request URL field. You also need to add a Header, where Key =
X-CMC_PRO_API_KEY, and Value =
To easily convert from a preset request to a custom API URL, tick the Add request URL box before running your preset request (under Output options). This will print out your complete API URL, which you can then copy/paste into the request URL field.
Part 4: Handle Pagination
- CoinMarketCap limits the number of records returned in each request. By default, only 100 records will be returned unless you include
limitparameters. The documentation says you can specify a limit of up to 5000, but in my own tests large limits seemed to produce an error, so I used 1000 in the examples below.
- With API Connector you can either run these paginated request URLs manually or loop through them automatically 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.