Instructions for importing JSON into Google Sheets

JSON is a standard protocol for sending data between applications. In this tutorial, TipsMake.com.com will show you how to import JSON data into Google Sheets using a free, open source script available on Github.

Then at the end, the article will show you an easier method to import JSON data into Google Sheets with more advanced features.

Use the free ImportJSON script

1. Open Google Sheets

Open a new or existing Google Sheets page.

Tip : You can go to sheet.new page in your browser if you want to create new Google Sheets

2. Open the script editor

On Google Sheets, in the menu at the top, click Extensions > Apps Script.

Instructions for importing JSON into Google Sheets Picture 1Instructions for importing JSON into Google Sheets Picture 1

3. In the script editor, remove the placeholder content

If any placeholder code is entered into the script editor, you can delete it.

Instructions for importing JSON into Google Sheets Picture 2Instructions for importing JSON into Google Sheets Picture 2

4. Copy and paste the open source code

Visit: https://gist.github.com/paulgambill/cacd19da95a1421d3164

Copy all the code for 'import_json_appsscript.js' and paste the code into the Google Sheets script editor.

This is a free, open source script created by someone to import JSON into Google Sheets.

Instructions for importing JSON into Google Sheets Picture 3Instructions for importing JSON into Google Sheets Picture 3 Instructions for importing JSON into Google Sheets Picture 4Instructions for importing JSON into Google Sheets Picture 4

There are also other free importjson scripts available online if you are looking for them.

5. Save and name the script

After you copy and paste all the scripts into the editor, click the save button and give your project a name.

Instructions for importing JSON into Google Sheets Picture 5Instructions for importing JSON into Google Sheets Picture 5 Instructions for importing JSON into Google Sheets Picture 6Instructions for importing JSON into Google Sheets Picture 6

You can name the project whatever you want, but something like 'ImportJSON' will make it easier to remember.

6. Back to Google Sheets

After saving your project in the script editor, you can now close the script editor tab in your browser and return to your Google Sheets.

Now, in any cell on your Google Sheets, start typing '=import' (without the quotes) and you'll see an 'ImportJSON' pop-up as an option. This is the script you saved in the editor.

Click the 'ImportJSON' option.

Instructions for importing JSON into Google Sheets Picture 7Instructions for importing JSON into Google Sheets Picture 7

7. Add JSON API URL

After opening the JSON input formula, you will need to add your JSON API URL.

If you want to use the free JSON API URL for testing, you can use one of the following URLs:

  1. Chuck Norris Jokes: https://api.chucknorris.io/jokes/random
  2. Current price of Ethereum: https://api.coinbase.com/v2/prices/ETH-USD/buy

Enter your URL like this:

=ImportJSON("https://api.example.com")

There should be "double quotes" around the URL and single quotes around the quotes.

In the URL is where you will specify your endpoint and add any other parameters to fetch the data you need.

8. Import JSON data

The final step to enter JSON, after entering the JSON URL, into your Google Sheets is to press the Enter button on your keyboard and wait for the JSON data to populate the spreadsheet.

Instructions for importing JSON into Google Sheets Picture 8Instructions for importing JSON into Google Sheets Picture 8 Instructions for importing JSON into Google Sheets Picture 9Instructions for importing JSON into Google Sheets Picture 9

Import JSON into Google Sheets demo

4 ★ | 1 Vote