Search API Connector Documentation

Print

Import BscScan Data to Google Sheets

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

We’ll first get an API key from BscScan, and then set up a request to pull in data to your spreadsheet.

Contents

Before You Begin

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

Part 1: Get Your BscScan API Key

  1. While logged into BscScan, open the Account menu dropdown and click API Keys
    bscscan-apikey
  2. In the API Keys menu click Add
    bscscan-apikey-add
  3. Name your API key and click Continue.
    bscscan-apikey-create
  4. You will now see your API key, copy it down and keep it safe as we’ll need it shortly.
    bscscan-apikey-success

Part 2: Fetch Data from BscScan

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

  1. Select BscScan from the drop-down list of applications
    bscscan-application
  2. Choose an endpoint. We’ll start with the endpoint for fetching ‘normal’ transactions.
    bscscan-endpoints
  3. In the parameters section, enter your API key and the address of interest.
  4. Choose a destination sheet, name your request, and hit Run to see the response data in your sheet.
    bscscan-response
  5. That’s it! If you like, you can double-check that the data in your sheet matches the data you see when you search BscScan’s search box by address. It should be exactly the same:
    bscscan-results-compare

Part 3: Create a Custom API Request

Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration. When you create a custom request, you add your complete URL into the request URL field.

Part 4: API Documentation

Official API documentation: https://docs.bscscan.com/

Previous Import Binance Data to Google Sheets
Next Import Chargebee Data to Google Sheets

24 thoughts on “Import BscScan Data to Google Sheets”

  1. Hi Ana, What i’m trying to do is to extract all the data in a specific period (like from 01/12/2021 to 10/12/2021) from a specific contract without restriction of 5000 records for example if try to do it there is a limitation (for example –> https://bscscan.com/exportData?type=address&a=0x6d6ba21e4c4b29ca7bfa1c344ba1e35b8dae7205)

    Resuming – >I need to analyze all the transactions from a specific contract without limit of 5000 records max.

    I’ve seen the API also has a limit of 10.000 records..

    Thanks in advance!

    Reply
    • Hey Paul, a request URL Like https://api.bscscan.com/api?module=account&action=txlist&address=0x6d6ba21e4c4b29ca7bfa1c344ba1e35b8dae7205&startblock=0&endblock=99999999&sort=desc&apikey=YOUR_KEY should get you what you’re looking for. It will send 10,000 records into your sheet.

      Reply
  2. bom eu gostaria de um script mais simples
    eu tenho algumas moedas de jogo que possuo
    queria listas essas moedas e cota-las apenas
    em USDT, ETH, BNB e BRL
    Seria possível, um scrip para encerrir as moedas que preciso nessas 4 cotações

    Reply
    • Their documentation says “This API endpoint returns a maximum of 10000 records only.” I tested and confirmed that you can’t get more than 10k transactions, even if you apply pagination parameters. Can you split up your request to ensure each request is below their limit?

      Reply
  3. This is a very well made instructions, thank you for sharing the knowledge.
    However, I can’t get the token transfer table (BEP-20) from a specific address. When I try to run your example (replacing the addres and API), it gives me “no transactions found”

    https://api.bscscan.com/api?module=account&action=txlist&address=0x00000000000000000000000000000&startblock=0&endblock=99999999&sort=desc&apikey=APIHERE

    Any idea?

    Reply
    • You’ll need to use the “Get a list of ‘BEP-20 Token Transfer Events’ by Address” endpoint as described here. Basically you just need to use an action of tokentx instead of txlist, so this URL should work: https://api.bscscan.com/api?module=account&action=tokentx&address=0x569d67ab8Bf133f3aC6D97D3322bEc7972F2A69B&startblock=0&endblock=999999999&sort=asc&apikey=111111111111111

      Reply
  4. Good afternoon Anna, great article!!

    I’m starting my studies, I’m interested in doing a project for college, in it I want to study on the purchase and sale data of a certain currency. Can you tell me if in the API I can have access in addition to HASH, purchase, sale and quantity, I want to have access to the portfolios to build an investor profile.

    Sorry, my english is not the best

    Reply
    • I’m not sure I totally understand your question, but I think you might be asking how to get the token holdings of a particular wallet?
      In that case you could run a request URL to get token balances, specifying the contract token address and the address you’re interested in, like this:
      https://api.bscscan.com/api?module=account&action=tokenbalance&contractaddress=0xe9e7cea3dedca5984780bafc599bd69add087d56&address=0x89e73303049ee32919903c09e8de5629b84f59eb&tag=latest&apikey=1111111111111

      You would need to repeat that for each token contract address.

      Reply
  5. Hi there! Thank you for your time making this.
    I am having a problem to use it in a way that i see the METHOD column of this contract: https://bscscan.com/address/0xc8cd1ea30510c744850bd5c3551784707402dc60
    Basically i would like to know how many FEED per day it has, with the VALUE of it.
    My goal is to have a total amount of BNB used with FEED at the end of the day/week, knowing that the project has 3 types (values) of FEED: 0.005 BNB, 0.035 BNB and 1 BNB.
    Thank you so much!!

    Reply
  6. Good afternoon. Im studying API Keys to retrieve data of my transactions for the govern-tax report. I would like to obtain an excel sheet with the various transactions with the following columns format: Timestamp, Asset amount, Asset price, Asset obtained amount, asset obtained price, gas fee, gas price ($). Do you know if i can do this with thistool, or should i check other options? In the 2nd case, do you know where could i obtain this info in this way?

    Thanks a lot!! 🙂

    Reply
    • I believe you can get this data through the API, but it will take multiple calls as the data doesn’t come out in the format you’re looking for. Also, since it’s for your taxes, I’d use a specialized service for this to make sure you get everything you need. If you Google ‘binance smart chain taxes’ you’ll find a few solutions.

      Reply
  7. Hi Ana,
    I want to download all the transactions of a coin involved in a scam for my thesis and stumbled upon this page. I see you mentioned a couple of times that this method limits the download to 10k records. Is there a way to download all of the records of a coin for a given date range? Thanks!

    Reply
    • I don’t think all endpoints have that limit. But either way, you can always limit the date range such that each pull has less than 10K records in it.

      Reply

Leave a Comment

Table of Contents