How to connect the Blockchain.com API to Google Sheets

Crypto API Tutorials:

Binance API | Bitfinex API | Bitmex API | BscScan API | Cardano API | Coinbase API | Coingecko API | Coinmarketcap API | CoinAPI | Etherscan API | Glassnode API | Messari API | Nomics API | OpenSea API | PancakeSwap API | Rarible API

You might also like:

  • CoinStats: a portfolio manager app for tracking crypto holdings from multiple wallets and exchanges
  • Best Crypto APIs: a comprehensive list of the best APIs for cryptocurrency traders, hodlers, and devs

Blockchain.com API

Blockchain.com is a popular crypto wallet and exchange and a full-stack crypto services platform. We can use the Blockchain.com API to import data from Blockchain.com into Google Sheets. In this tutorial, we’ll show you how to connect the Blockchain REST API to Google Sheets in 4 steps:

  1. Install the Apipheny add-on
  2. Choose a Blockchain endpoint
  3. Enter your Blockchain API request into Apipheny
  4. Run the Blockchain API request in your Google Sheet

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Choose a Blockchain.com API endpoint

In this section, we’ll show you how to browse the Blockchain API documentation to find the endpoint that retrieves the data you need from the API. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 3.

First, open the Blockchain.com API documentation page: https://www.blockchain.com/api

This page contains multiple Blockchain APIs, each having one or more endpoints:

Blockchain API documentation page
Blockchain API documentation page

Many of these APIs don’t require authentication.

An example API is Simple Query API. Click the View Documentation button to see its endpoints:

Example API - Simple Query
Example API – Simple Query

The base URL for this API is:

https://blockchain.info/q/

An example endpoint is getdifficulty, which returns the current difficulty target, as a decimal number.

The endpoint’s documentation only contains a short description of the endpoint’s purpose.

The HTTP method is GET and the URL is:

https://blockchain.info/q/getdifficulty
GetDifficulty endpoint URL
GetDifficulty endpoint URL

The base URL for all Blockchain.com APIs is:

https://blockchain.info/

Step 3.) Enter your Blockchain API request into Apipheny

Once you have chosen an endpoint, go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 2, we explained how you can find the Blockchain REST API endpoint that you need. Now copy and paste your complete Blockchain API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

Once you’ve entered your URL into Apipheny, just click the Run button to run your request and get the data back into your sheet.

Two example endpoints

Example 1.) Blockchain Data API – Single Address endpoint

This is what the whole URL of this endpoint looks like:

https://blockchain.info/rawaddr/bitcoin_address

If you’re following this example, don’t forget to replace bitcoin_address with a real bitcoin address, and then copy and paste the URL into Apipheny like this:

Blockchain API request entered into Apipheny
Blockchain API request entered into Apipheny

Once you enter the URL, next just click the Run button at the bottom of Apipheny and you’re request will be processed:

Blockchain data imported into Google Sheets
Blockchain data imported into Google Sheets

Example 2.) Exchange Rates API – Ticker endpoint

The URL of this endpoint is:

https://blockchain.info/ticker
Exchange Rates API request entered into Apipheny
Exchange Rates API request entered into Apipheny

Just copy and paste the URL into Apipheny and click the Run button to run your request:

Exchange Rates data imported into Google Sheets
Exchange Rates data imported into Google Sheets

That’s it! You’ve successfully connected the Blockchain.com API to Google Sheets using the Apipheny add-on.

After making a successful request to the Blockchain API, try querying a different Blockchain API endpoint, or try using one of the more advanced features in the Apipheny add-on.


Crypto API Tutorials:

Binance API | Bitfinex API | Bitmex API | BscScan API | Cardano API | Coinbase API | Coingecko API | Coinmarketcap API | CoinAPI | Etherscan API | Glassnode API | Messari API | Nomics API | OpenSea API | PancakeSwap API | Rarible API

You might also like:

  • CoinStats: a portfolio manager app for tracking crypto holdings from multiple wallets and exchanges
  • Best Crypto APIs: a comprehensive list of the best APIs for cryptocurrency traders, hodlers, and devs


API Tutorials



API Knowledge

What is an API?
What is an API URL?
What are parameters?
What is an endpoint?
What is an API key/token?
What is basic authentication?
What are headers?
What is a GET request?
What is a POST request?