Import Github Data to Google Sheets – Step by Step Guide

Import Github Data to Google Sheets – Step by Step Guide

Last Updated On June 03, 2019
You are here:
< Back

In this guide, we’ll walk through how to pull data from the Github API directly into Google Sheets, using the free API Connector add-on. We’ll first get a personal access token (aka API key) from Github, and then set up a request to pull in code repository details from Github to your spreadsheet.


  1. Log in to Github and navigate to Click either “Generate a personal access token” or the “Generate new token” button.
  2. This will take you to a screen to set up scope details for your token. For our purposes here we don’t need any additional scopes, so just enter a description into the required Note field and scroll to the bottom.
  3. Click the “Generate token” button at the bottom of the page:
  4. Your GitHub personal access token is now ready:
  5. One last step: Basic Access Authentication requires us to encode our authentication info to base 64. You can do this opening up Developer Tools in your browser (F12 on Windows/Linux or option + ⌘ + J on OSX). In the console, type in the following and click enter:
    Substitute your own Github username and personal access token values from above.  It should look like this (don’t forget the plus sign in the middle):
  6. Copy the output that appears in Developer Tools to your clipboard as we’ll need it shortly. (If you have any problems with the above, you can also try a tool like Basic Authentication Header Generator to generate your header.)
  7. Congrats, you’re done! You’re now ready to access the Github API, and can start pulling Github data into Google Sheets.


We’re going to follow the Github API documentation to search for repositories matching a specific search term.

  • API root:
  • Endpoint: /search/repositories
  • Parameters: q={search term}
    Parameters Example: q=google tag manager

Putting it all together, we get the full API Request URL: tag manager

We can now enter all our values into API Connector and start importing Github data into Google Sheets.

  1. Open up Google Sheets and click Add-ons > API Connector > Create New API Request.
  2. In the Create Request interface, enter the Request URL we just created
  3. Under Headers, enter a key-value pair like this:
    AuthorizationBasic {your encoded API token}

    You should be able to paste in the value you got in step 6 above.

    It should look like this:

  4. Create a new tab. You can call it whatever you like, but here we’ll call it ‘Github’. While still in that tab, click ‘Set’ to use that tab as your data destination.
  5. Name your request. Again we’ll call it ‘Github’
  6. Click Run and a moment later you’ll see Github data populate the Github tab in your Google Sheet:
  7. Experiment with endpoints as described in the documentation to see other types of Github data. For example, you can change the API URL path to to see a list of users.

Following the above steps, you will now be able to import data from the Github API directly into Google Sheets.


Leave a Reply

Your email address will not be published.