Import BscScan Data To Google Sheets

How to import BscScan data to Google Sheets
Reading Time: 6 minutes

Quick guide
A quick guide on how to import BscScan data to Google Sheets:
1. Sign up to BscScann and generate a key token
2. Get the endpoint of the data to import
3. Launch Amigo Data in Google Sheets
4. Select Custom API→Paste the endpoint URL
5. Preview and then import

BscScan is the leading blockchain explorer for the BNB Smart Chain, developed by the team behind Etherscan. A blockchain explorer is a search engine that allows users to quickly lookup, confirm and validate transactions that have taken place on the BSC blockchain.

BscScan is an analytics platform developed for the Binance Smart Chain (BSC) network and has many useful features. BscScan has data to track cryptocurrency and other decentralised finance (DeFi) projects on the BNB Smart Chain. An overwhelming amount of data can be extracted from the BSC using BSCScan.

BscScan has many useful features and applications such as the following:

  • searching for transactions and checking their status;
  • view the latest blocks added to the chain;
  • checking the balance of wallets and any completed transactions;
  • searching, reading and interacting with smart contracts deployed on the blockchain;
  • studying the offer of tokens and other cryptocurrencies.

All this information is available publicly and can be accessed for free–but it does require a bit of digging.

In this tutorial, we’ll learn how to import BscScan data to Google Sheets in a few steps without hassle.

Steps to import BscScan data to Google Sheets

Step 1: Create a BscScan account

Head over to https://bscscan.com/register and create an account

Create an account to import BscScan data to Google Sheets

Fill in the details and confirm the email address. Upon logging in, you’ll be taken to the overview of your profile.

Account section in BscScan

Step 2: Create an API key

From the My Profile page, click API-KEYS.

Generating API key in BscScan

Then click the Add button beside My API Keys. Give it a name (or you may not) and click Continue.

Naming the app

The API key has been created and you’ll see it shown under API-Key Token.

The generated API key

Note the key and keep it confidential.

Step 3: Get the endpoint of the data to import

The base endpoint is https://api.bscscan.com/. All the API endpoints must start with this. Queries for different datasets are appended to this endpoint.

To get the list of all the different endpoints available, navigate to More and click API Documentation under the heading Developer.

API documentation page

Then click the category under which the data set that you want to import falls under the API ENDPOINTS.

List of API endpoints in BscScan

For this tutorial, we’ll get the list of blocks validated by address. We go to Accounts, then scroll down to the relevant section.

Sample of block endpoint

The endpoint shown is an example. We can change the query parameters for the result we want to fetch.

To make changes to the endpoint to our preferred query parameters, we can either copy the endpoint by hovering the mouse pointer over the and clicking the copy button at the top right corner; or clicking the “Try this endpoint in your browser” option and editing from the browser URL bar.

We’ll use the second option.

On opening the endpoint in the browser, we get the result as shown below.

Result in browser

In the URL, we need to replace the address, page, and offset parameters with our own; and YourApiKeyToken with our own key we have created.

For the validator’s address, we can go to the validators page and choose any of the validators. For this tutorial, we’ll use the address of the validator named Neptune.

Validator's page

Click on the name of the validator. Then copy the address.

Copying the validator's address

Now go to the endpoint URL tab and change the address by replacing the characters between the equal sign (=) and the ampersand (&). The address is the highlighted part of the URL shown below.

Editing the endpoint URL

We need to also change the page number and the offset. Change the page query parameter to 10 and offset to 0.

Finally, enter the key by replacing YourApiKeyToken with your key.

The final endpoint should look something like this:

https://api.bscscan.com/api?module=account&action=getminedblocks&address=0xAAcF6a8119F7e11623b5A43DA638e91F669A130f&blocktype=blocks&page=10&offset=0&apikey=UA8E839P9STB8QTJA9583QFTC6R859PFUVDDDXJ

Do note that the key in the above endpoint is a representational one and will not work. You must replace it with a genuine key.

Hit Enter.

If your queries are right, you should see the result displayed on your browser.

Copy the URL. We’ll use it to import the data into Google Sheets.

Step 4: Install Amigo Data add-on for Google Sheets

Now, to import BscScan data to Google Sheets, we’ll need a tool. For this we’ll use Amigo Data add-on for Google Sheets–a simple but powerful tool that can pull data from various sources into Google Sheets.

Install it from the Google Workspace Marketplace. Here’s the installation link: https://workspace.google.com/marketplace/app/amigo_data/274781802717

Alternatively, you can get it from Google Sheets itself.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

    Once installed, follow the steps given below to import BscScan data to Google Sheets.
  • Launch Amigo Data

    Extensions→Add-ons→Amigo Data→Connect
Launching Amigo Data
  • Choose Custom API from the list of sources
Select Custom API from the list of sources
  • Paste the API endpoint in the API URL bar.
Paste the endpoint in the API URL bar
  • Click PREVIEW. Then flatten and expand all the data. Then click the IMPORT button.
Preview of the data

The data will be from BscScan will be imported into Google Sheets in a moment.

Shown below is a snippet of the imported data.

The imported data

Setting refresh schedule

To get the information updated periodically, click the report you want to update automatically, toggle on the Refresh Schedule and select the schedule–hourly, daily, weekly or custom days.

Then click Save & Run

Alerts via email or Slack

You can get the report sent to your email or a Slack channel if you want to.

To set up an alert, click Get Alerts→Add alert data+. Edit the details and click Set Alert.

Conclusion

Using Amigo Data you can easily import BscScan data to Google Sheets. And not just import them but get them updated automatically without having to repeat the process and get alerted periodically so that you can stay up to date with any changes.

There are also several sources from which you can use Amigo Data to import data into Google Sheets. Few examples are, data from open government data platforms of the US, UK, and India; Google Search Console, Google Trends, Snowflake, Spotify; etc.

You can find the articles on them as well as tutorials and tips on Google Sheets that can help you make the most from data on our blog.

See also

Here are some similar articles that you may like:

https://blog.tryamigo.com/import-data-from-binance-to-google-sheets/

https://blog.tryamigo.com/import-yahoo-finance-data-into-google-sheets/

https://blog.tryamigo.com/export-data-from-google-trends-to-google-sheets/