Import JSON to Google Sheets (Easiest Way in 2024) (2024)

In this article we will show you how to import JSON to Google Sheets in just a few clicks. Simply follow the steps below.

Import JSON to Google Sheets with Lido (Easiest Method)

It has never been easier to import JSON to a spreadsheet thanks to Lido's IMPORTJSON function.

Lido is a spreadsheet software just like google sheets but with the ability to import data from anywhere! You can mport your JSON into lido spreadsheet in under a minute. Simply follow the steps below:

Import JSON to Google Sheets (Easiest Way in 2024) (1)

Import JSON to Google Sheets (Easiest Way in 2024) (2)

1. Create a FREE Lido Account

In order to use Lido's IMPORTJSON function, first sign up for an account at https://www.lido.app/go/signup

2. Write your IMPORTJSON Formula


Open a new Lido spreadsheet once you have made and account.

To import your JSON to Lido we will use the following formula:

=IMPORTJSON(url, output_cell)

Url will be the url you want to import the Json from. You can write the url path in the formula or reference it from a cell in your spreadsheet.

Output_cell will be the cell in the spreadsheet where you want to begin the JSON output.

In our example images above, our formula is:

```=IMPORTJSON(A1,D5)```

And with 1 simple formula your JSON data has now been imported to a Lido spreadsheet.

If you need to use google sheets you can simply copy the data and paste it back into google sheets. However, many users who have tried our IMPORTJSON function have permanently made the switch from google sheets to Lido after seeing how easy it is to import data and automate repetitive spreadsheet tasks wit Lido.

Method 2: Using Apps Script (Hardest Method)

1. Open Google Apps Script

You can open Google Apps Script by clicking Extensions in the main menu, then selecting Apps Script.

Import JSON to Google Sheets (Easiest Way in 2024) (3)

A new tab will be loaded for Apps Script. The right side of the screen is where we will insert a special function to insert JSON files to Google Sheets.

Import JSON to Google Sheets (Easiest Way in 2024) (4)

2. Copy the ImportJSON Script from Github

We then copy the script from paulgambill’s Github:

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

Copy all of the code from line 1 to 392. Hold the left key of your mouse and drag it across all of the code, then either press Ctrl+C or right-click then select Copy.

Import JSON to Google Sheets (Easiest Way in 2024) (5)

3. Paste the script to Google Apps Script

Go back to the Google Apps Script tab. Click on the code area, press Ctrl+A to highlight the default code, then press Delete on your keyboard. That clears the area.

Import JSON to Google Sheets (Easiest Way in 2024) (6)

Afterwards, press Ctrl+V or right-click again then select Paste. This will insert the github code we copied into Google Apps Script.

Import JSON to Google Sheets (Easiest Way in 2024) (7)

4. Save and name the script

Save the script by clicking the Save project icon near the top of the page.

Import JSON to Google Sheets (Easiest Way in 2024) (8)

Afterwards, you can also name the script by clicking the default title Untitled project.

Import JSON to Google Sheets (Easiest Way in 2024) (9)

A small pop-up box will appear where you can rename the project. Type the name you want to give, then click Rename.

Import JSON to Google Sheets (Easiest Way in 2024) (10)

The script is now ready to be used!

Import JSON to Google Sheets (Easiest Way in 2024) (11)

5. Use the script as =IMPORTJSON(“url”) in your sheet

Google Sheets automatically detects the function set in Google Apps Script as a legitimate function to be used in the sheets. When you type =IMPORTJSON, the custom script will appear as a function:

Import JSON to Google Sheets (Easiest Way in 2024) (12)

The IMPORTJSON function has the following syntax:

=IMPORTJSON(url, query, options)

Where

Url: is the URL to a public JSON feed

query: is a comma-separated lists of paths to import

options: is a comma-separated list of options that alter processing of the data

For this tutorial we will import an entire json file. The sample json file will be from the following link:

https://api.nobelprize.org/v1/laureate.json

You can view the json files through your browser. Some browsers, such as Firefox, automatically read the file and format it to a more readable format:

Import JSON to Google Sheets (Easiest Way in 2024) (13)

Type the formula into a cell:

=importjson("https://api.nobelprize.org/v1/laureate.json")

Import JSON to Google Sheets (Easiest Way in 2024) (14)

You can also do the following:

1. Copy the link

2. Go back to Google Sheets

3. Type =importjson(“

4. Paste the link

5. Type “)

6. Press Enter

The JSON file has been imported.

Import JSON to Google Sheets (Easiest Way in 2024) (15)

FAQs

Can you Filter the JSON File Data you Import into Google Sheets?

It is possible to filter the JSON you import into Google Sheets. One way is to check the API of the source database for filtering options. These will be appended to the link to the JSON file.

If you don’t want to read the API documentation, you can combine ImportJSON with the QUERY function. Here are some examples:

Select Only Certain Fields or Columns

=QUERY(IMPORTJSON(“url”),”select ColN1, ColN2”)

Where ColN1 and ColN2 are the column numbers to only import. For our example we only want to import the name columns. They are in the 2nd and 3rd columns.

Import JSON to Google Sheets (Easiest Way in 2024) (16)

We therefore set up the formula as

=query(importjson("https://api.nobelprize.org/v1/laureate.json"),"select Col2, Col3")

The output becomes

Import JSON to Google Sheets (Easiest Way in 2024) (17)

Filter Results By Value

=QUERY(IMPORTJSON(“url”),”where ColN = value”)

Where ColN is the column that we look for the value. For our example we only want to list entries that won the Nobel Prize in 1935. We set up the formula as

=query(importjson("https://api.nobelprize.org/v1/laureate.json"),"where Col13 = '1935'")

The output is as follows:

Import JSON to Google Sheets (Easiest Way in 2024) (18)

We hope this article has helped you and given you a better understanding of how to import JSON to Google Sheets. You might also like our articles on how to integrate WhatsApp with Google Sheets and how to export Airtable to Google Sheets.

To optimize your workflow, we recommend reading our guide on how to create a Google Sheets email list and trying our software for tracking due dates.

Import JSON to Google Sheets (Easiest Way in 2024) (2024)

FAQs

How do I import data from JSON to Google Sheets? ›

Installation
  1. Copy or download the script available here.
  2. With the Google Sheet open, navigate to Extensions > Apps Script.
  3. An Apps Script tab will open with the Code.gs file contents. ...
  4. Click on the Save project icon to save the file (you can use shortcuts like CTRL+S or ⌘-S)

How do I populate a Google Sheet from JSON? ›

Back in your Google Sheet, use the custom function =IMPORTJSON("URL") in a cell, replacing "URL" with the JSON source URL. This method allows for customization and direct integration without external tools, but requires some basic scripting knowledge.

How to import a JSON file to a spreadsheet? ›

To do this:
  1. Navigate to the Data tab.
  2. Click on Get Data.
  3. From the drop-down menu, choose From File and then select From JSON.
Apr 12, 2024

How do I pull data from API to Google Sheets? ›

Substitute own file ID and API key into the request URL.
  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. Create a new tab and click Set current to use that tab as your data destination.
  3. Name your request and click Run. A moment later you'll see your file in Google Sheets.
Jan 3, 2024

How do I automatically import data into Google Sheets? ›

Import Live Data to Google Sheets: Top Methods and Tools
  1. Step 1 – Install Coefficient. Install the Coefficient app to Google Sheets by clicking Extensions > Add-ons > Get add-ons on the top menu.
  2. Step 2 – Import Live Data. ...
  3. Step 3 – Schedule Automatic Data Refreshes.
Jun 16, 2023

Can Google Sheets parse JSON? ›

For example, you can create your own =IMPORTJSON() formula for Google Sheets to parse JSON data. However, this use is limited to the Google ecosystem, plus you need to know how to code in JavaScript. Here's how to use a script in Google Sheets: In your Google Sheet, select Extensions > Apps Script.

How to use importdata? ›

Use IMPORTDATA to Pull a CSV File from a Website

First, copy the URL you want to pull the CSV data from. For our example, we'll use this URL, an annual balance sheet in CSV file format. Next, open the Google spreadsheet you want to pull the data into. Enter the IMPORTDATA formula and paste the URL inside.

How to convert JSON to CSV file? ›

How to Use the JSON to CSV Converter
  1. Convert JSON to CSV using this online tool.
  2. Upload your JSON file by clicking the blue button or paste your JSON text / URL into the textbox.
  3. Download the resulting CSV file when prompted.
  4. Open your CSV file in Excel or Open Office.

How do I automate a data collection in Google Sheets? ›

Smart Fill will detect patterns and make suggestions to help automate data entry. You can use Smart Fill for tasks like extracting the first name from a given list of full names or finding values in a range or table.

How to convert JSON file into readable format? ›

You can convert JSON to TXT with MConverter in three easy steps:
  1. Choose JSON files from your device. At the top of this page, drag and drop your JSONs. ...
  2. Click or tap on TXT from the list of target formats. ...
  3. Download your TXT files, after MConverter has finished processing them.

Can we import data from JSON? ›

The JSON import feature allows you to import issues from external issue trackers that cannot be exported to CSV files. Please note that the import format used by the Jira Importers plugin is more basic than the import format available when using the Jira REST API.

How do I open a JSON file on Google? ›

Steps to open JSON files on Web browser (Chrome, Mozilla)
  1. Open the Web store on your web browser using the apps option menu or directly using this link.
  2. Here, type JSON View in search bar under the Extensions category.
  3. You will get the various extensions similar to JSON View to open the JSON format files.

Is Google Sheet API free? ›

All use of the Google Sheets API is available at no additional cost.

Is there an API for Google Sheets? ›

The Google Sheets API is a RESTful interface that lets you read and modify a spreadsheet's data. The most common uses of this API include the following tasks: Create spreadsheets. Read and write spreadsheet cell values.

How do I enable API in Google Sheets? ›

Enable an API
  1. Go to the API Console.
  2. From the projects list, select a project or create a new one.
  3. If the APIs & services page isn't already open, open the console left side menu and select APIs & services, and then select Library.
  4. Click the API you want to enable. ...
  5. Click ENABLE.

How to get data from a JSON file? ›

Follow these steps to read the JSON file using the fetch API method:
  1. Create a JSON file and add data to it.
  2. Open the JavaScript file.
  3. In the fetch method pass the path of the JSON file.
  4. Use the . json() method to parse the data in JSON format.
  5. Display the content in the console.
Feb 23, 2024

Top Articles
Latest Posts
Article information

Author: Foster Heidenreich CPA

Last Updated:

Views: 5937

Rating: 4.6 / 5 (56 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Foster Heidenreich CPA

Birthday: 1995-01-14

Address: 55021 Usha Garden, North Larisa, DE 19209

Phone: +6812240846623

Job: Corporate Healthcare Strategist

Hobby: Singing, Listening to music, Rafting, LARPing, Gardening, Quilting, Rappelling

Introduction: My name is Foster Heidenreich CPA, I am a delightful, quaint, glorious, quaint, faithful, enchanting, fine person who loves writing and wants to share my knowledge and understanding with you.