Import CoinGecko API Data to Sheets [2024] | API Connector (2024)

In this guide, we’ll walk through how to pull cryptocurrency market data from the CoinGecko API directly into Google Sheets, using the API Connector add-on for Sheets.

The cool thing about CoinGecko is that they provide a huge amount of well-organized crypto data, including some unique API endpoints like most-searched coins. This tutorial will show how to get an API key before fetching data.

Mixed Analytics users can currently get 20% off any CoinGecko API Plan by subscribing with the offer code MIXEDANALYTICS20.

Contents

  • Before You Begin
  • Part 1: Get Your CoinGecko API Key
  • Part 2: Pull CoinGecko API Data into Sheets
  • Part 3: Create a Custom Request
  • Part 4: Handle Pagination
  • Part 5: CoinGecko Limits
  • Part 6: API Documentation
  • Appendix: CoinGecko Template

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your CoinGecko API Key

  1. To get started, you'll need a CoinGecko account, so, if you haven't already, create an account and log in to coingecko.com.
    Import CoinGecko API Data to Sheets [2024] | API Connector (1)
  2. Once you're logged in, navigate to https://www.coingecko.com/en/api/pricing.
  3. To subscribe to a paid API plan, click one of the Upgrade buttons in the pricing table. Alternatively, get a free API key by clicking Create Demo Account underneath the pricing table.
    Import CoinGecko API Data to Sheets [2024] | API Connector (2)
  4. If you select a paid plan, you'll see the Billing Info form on the left (use the MIXEDANALYTICS20 offer code for 20% off any API plan). If you are creating a free demo account, you'll see the form on the right instead.
    Import CoinGecko API Data to Sheets [2024] | API Connector (3)
  5. Either way, once your account is set up, navigate to the Developer dashboard and click +Add New Key
    Import CoinGecko API Data to Sheets [2024] | API Connector (4)
  6. You'll be prompted to label your key and click Create
    Import CoinGecko API Data to Sheets [2024] | API Connector (5)
  7. Your API key will now be listed on the page. Copy this key and keep it safe as we'll use it shortly!
    Import CoinGecko API Data to Sheets [2024] | API Connector (6)

Part 2: Pull CoinGecko API Data into Sheets

The easiest way to get started with the CoinGecko API is through API Connector’s built-in integration.

  1. In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request)
  2. If you're using a free API key through a Demo Account, selectCoinGeckofrom the drop-down list of applications. If you are using a paid CoinGecko API plan, select CoinGecko Pro. The CoinGecko Pro application contains some unique endpoints that aren't accessible to free users.
    Import CoinGecko API Data to Sheets [2024] | API Connector (7)
  3. UnderAuthorization, enter your API key.
    Import CoinGecko API Data to Sheets [2024] | API Connector (8)
  4. Choose an endpoint. For example, select/coins/markets, which is the endpoint for fetching the latest market data.
    Import CoinGecko API Data to Sheets [2024] | API Connector (9)
  5. In the parameters section, select which "vs_currency" you'd like to use.
  6. Optionally select other parameters, e.g. select specific coin IDs or setper_page to 250 to get more than 100 records.
  7. Choose a destination sheet, name your request, and hitRunto see the response data in your sheet.
    Import CoinGecko API Data to Sheets [2024] | API Connector (10)
  8. Optionally open the field editor to filter out any unnecessary fields from your report.

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 APIdocumentation. Here's an example request setup:

  1. Open up Google Sheets and clickExtensions > API Connector > Open > Create request.
  2. In the request form enter the following. If you're using CoinGecko's paid API, change the base URL to https://pro-api.coingecko.com/api/v3/, and the header key to x-cg-pro-api-key.
    • Application:Custom
    • Method:GET
    • Request URL:https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd
    • Headers:
      • x-cg-demo-api-key: your_key
  3. Create a new tab and clickSet currentto use that tab as your data destination.
  4. Name your request and clickRun. A moment later you’ll see a list of coins populate your sheet.
Import CoinGecko API Data to Sheets [2024] | API Connector (11)

Part 4: Handle Pagination

  1. For several endpoints, CoinGecko limits the number of records returned in each response. By default, only 100 records will be returned unless you set the per_page parameter to 250:
    Import CoinGecko API Data to Sheets [2024] | API Connector (12)
  2. If you need more than 250 records, you can loop through multiple pages automatically with page parameter pagination handling, like this:
    • Pagination type: page parameter
    • Page parameter: page
    • Run until: choose when to stop running the request
      Import CoinGecko API Data to Sheets [2024] | API Connector (13)

Part 5: CoinGecko Limits

Update: As of October 2023, CoinGecko now supports API keys. You can now get your own personal API key to avoid running into shared rate limits!

CoinGecko does allow access to their API without a key. However, if you run requests through Google Sheets without an API key, you'll probably come across error messages like these:

  • API server responded with an error (429), error code: 1015
  • API server responded with an error (403): error code: 1020

This is because CoinGecko applies rate limits, as shown in their terms & conditions.

When you run your requests through API Connector / Google Sheets, you’re more likely to hit these rate limits because all requests running through Google Sheets share the same pool of IP addresses from Google’s servers. Therefore, get a key first to avoid running into issues.

Part 6: API Documentation

Official API documentation: https://www.coingecko.com/en/api/documentation

Appendix: CoinGecko Template

In this template, everything is configured for you to simply type in whatever coins you’re interested in and get a dashboard like below:

Import CoinGecko API Data to Sheets [2024] | API Connector (14)

You can jump right to a copy of the template here. Happy data grabbing!

Import CoinGecko API Data to Sheets [2024] | API Connector (2024)

FAQs

Import CoinGecko API Data to Sheets [2024] | API Connector? ›

Open up Google Sheets and click Extensions > API Connector > Open > Create request. In the request form enter the following. If you're using CoinGecko's paid API, change the base URL to https://pro-api.coingecko.com/api/v3/ , and the header key to x-cg-pro-api-key .

How to use CoinGecko API in Google Sheets? ›

Step 3: Pull CoinGecko API Data into Google Sheets
  1. In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request).
  2. If you're using a free API key through a Demo Account, select 'CoinGecko' from the drop-down list of applications. ...
  3. Under Authorization, enter your API key.
Apr 8, 2024

How do I import API data into sheets? ›

API Integration: How to Import Data From API to Google Sheets
  1. Step 1: Open a New Sheet.
  2. Step 2: Go to the Apps Script Editor.
  3. Step 3: Name Your Project.
  4. Step 4: Add API Example Code.
  5. Step 5: Run Your Function.
  6. Step 6: Authorize Your Script To Import Data From API to Google Sheets.
Jul 26, 2023

How do I add CoinGecko API to excel? ›

On your new Excel workbook, navigate to Data > Data from Web. Upon clicking Data from Web, a 'From Web' dialog box will appear. If you're on our Demo API plan, stay on the Basic toggle and paste the URL accordingly. Depending on the current global call usage, it may take a while to establish a connection.

How do I connect to CoinGecko API? ›

How do I connect to CoinGecko API? You can connect or call the API through its RESTful JSON endpoints using HTTP requests. Select the relevant endpoints as listed on the API documentation, for your query.

How do I import CoinGecko data into Google Sheets? ›

How to import data from Coingecko into Google Sheets
  1. Install the Apipheny Add-on.
  2. Obtain an API key.
  3. Choose a Coingecko API endpoint.
  4. Enter your Coingecko API request into Apipheny.
  5. Run the Coingecko API request in your Google Sheet.

How do I link API to Google Sheets? ›

Connect API to Google Sheets in 7 Easy Steps
  1. Step 1: Open a new Sheet.
  2. Step 2: Open Apps Script Editor.
  3. Step 3: Name the Project.
  4. Step 4: Add API example code.
  5. Step 5: Run the Function.
  6. Step 6: Authorize your Script.
  7. Step 7: View the Logs.
Feb 6, 2023

How do I automatically import data into Google Sheets? ›

Import Live Data to Google Sheets: Top Methods and Tools
  1. Step 1 – Install Coefficient. Install the Coefficient app to Google Sheets by clicking Extensions > Add-ons > Get add-ons on the top menu.
  2. Step 2 – Import Live Data. ...
  3. Step 3 – Schedule Automatic Data Refreshes.
Jun 16, 2023

What is the data connector for Google Sheets? ›

Data Connector is powerful, yet easy-to-use and lets you pull data from any API into your Google Sheets™ worksheet. Just enter your API key or connect via OAuth2. Data Connector is the API connector of choice!

How do I import into sheets? ›

Import Excel data into Sheets
  1. In Sheets, create a new or open an existing spreadsheet.
  2. Click File. Import.
  3. Choose the Excel file and click Select.
  4. Choose an import option: Create new spreadsheet. Insert new sheet(s) Replace spreadsheet.
  5. Click Import data.
  6. If prompted, click Open now.

Is CoinGecko API free? ›

CoinGecko API is a freemium, public API that provides developers with access to data about cryptocurrencies and their market prices, trading volumes, market capitalization, and other related information.

What is the difference between CoinMarketCap and CoinGecko API? ›

Data Depth: While CoinMarketCap provides comprehensive market data for a vast number of cryptocurrencies, CoinGecko stands out for its focus on DeFi, NFTs, and additional metrics that go beyond the basics.

How do I add API data to Excel? ›

Go to the Data Tab and click on Get Data. Select the option From Other Sources > From Web. 3. Paste the URL created based on your API key, and select OK.

How do I connect CoinMarketCap API to excel? ›

Connecting Excel to the Coinmarketcap API
  1. From the data ribbon, select From Web which can be found in the Get and Transform group of commands. ...
  2. Select Advanced.
  3. Enter the API URL endpoint to the first URL parts box.

What is CoinGecko API? ›

The CoinGecko data market APIs are a set of robust APIs that developers can use to not only enhance their existing apps and services but also to build advanced crypto market apps. The team is also responsive to feedback and the occasions that we did these were quickly implemented into their api services.

What can you do with CoinMarketCap API? ›

With the CoinMarketCap API, you can:
  • Get the latest prices for all cryptocurrencies.
  • Get the 24-hour volume for all cryptocurrencies.
  • Get the market capitalization for all cryptocurrencies.
  • Get the list of all cryptocurrencies.

How do I use Yahoo Finance API in Google Sheets? ›

Connect Yahoo Finance To Google Sheets [API Integration]
  1. Install the Apipheny Google Sheets add-on.
  2. Obtain an API key.
  3. Choose a Yahoo Finance API endpoint.
  4. Enter the Yahoo Finance API request into Apipheny.
  5. Run the Yahoo Finance API request in your Google Sheets.

How do I link CoinMarketCap to Google Sheets? ›

CoinMarketCap API Google Sheets Script
  1. Open Google Sheets and create a new spreadsheet.
  2. Click on Extensions in the menu, then select Apps Script.
  3. In the Apps Script editor, define a function to call the CoinMarketCap API. ...
  4. Include your CoinMarketCap API key in the request header for authentication.

How to track cryptocurrency in Google Sheets? ›

In your Google Sheet, type the formula '=GOOGLEFINANCE("BTC-USD")' where you want the live Bitcoin price to appear.
  1. Press Enter, and the cell will display "Loading" before showing the current Bitcoin price. ...
  2. In the 'Settings for this spreadsheet' box, go to the 'Calculation' tab. ...
  3. Click 'Save settings'.

Top Articles
Latest Posts
Article information

Author: Patricia Veum II

Last Updated:

Views: 6181

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.