How To Import JSON In Google Sheets (With & Without Code)
Tags: googlesheets, googleappsscript, api, dataanalysis
Published: 2020-03-28 05:18:09

# 2 Different Methods of Importing JSON in Google Sheets

In this article we'll discuss a couple different ways you can consume <a href="https://www.json.org/json-en.html">JSON</a> in <a href="https://www.google.com/sheets/about/">Google Sheets</a>.

## 1. Use a Google Sheets Add-on

There's a Google Sheets add-on called Apipheny that you can use to <a href="https://apipheny.io">import JSON into Google Sheets</a>.

Here's the steps:

A. <a href="https://gsuite.google.com/marketplace/app/apipheny/966163326746">Install Apipheny in the G-Suite Marketplace</a>
B. Open a Google Sheet
C. Click "Add-ons" > Apipheny > Import API
D. In the sidebar, enter your JSON API URL and headers/key
E. Click "Run"

Your JSON data will then import into your Google Sheet.

Demo video: <a href="https://www.youtube.com/watch?v=KE71XJP6o2E">Pull API into Google Sheets</a>

{% youtube KE71XJP6o2E %}

Pros:
* Easy to use
* No scripts/code required
* GET and POST requests
* Advanced features and functionality

Cons:
* Costs money but has a free trial

### Tutorials

Here's some tutorials showing you how to use the Apipheny add-on to connect various APIs to Google Sheets:

<a href="https://apipheny.io/youtube-api-google-sheets/">Connect Youtube API to Google Sheets</a>
<a href="https://apipheny.io/quickbooks-api-google-sheets/">Connect Quickbooks API to Google Sheets</a>
<a href="https://apipheny.io/coinmarketcap-api-google-sheets/">Connect Coinmarketcap API to Google Sheets</a>
<a href="https://apipheny.io/surveymonkey-api-google-sheets/">Connect Surveymonkey API to Google Sheets</a>
<a href="https://apipheny.io/paypal-api-google-sheets/">Connect Paypal API to Google Sheets</a>
<a href="https://apipheny.io/github-api-to-google-sheets/">Connect Github API to Google Sheets</a>
<a href="https://apipheny.io/facebook-pages-api-google-sheets/">Connect Facebook Page API to Google Sheets</a>
<a href="https://apipheny.io/binance-api-google-sheets/">Connect Binance API to Google Sheets</a>
<a href="https://apipheny.io/facebook-ads-api-google-sheets/">Connect Facebook Ad API to Google Sheets</a>
<a href="https://apipheny.io/hubspot-api-google-sheets/">Connect Hubspot API to Google Sheets</a>
<a href="https://apipheny.io/trello-api-google-sheets/">Connect Trello API to Google Sheets</a>
<a href="https://apipheny.io/asana-api-google-sheets/">Connect Asana API to Google Sheets</a>
<a href="https://apipheny.io/harvest-api-google-sheets/">Connect Harvest API to Google Sheets</a>
<a href="https://apipheny.io/worldtradingdata-api-google-sheets/">Connect WorldTradingData API to Google Sheets</a>
<a href="https://apipheny.io/mailchimp-api-google-sheets/">Connect Mailchimp API to Google Sheets</a>
<a href="https://apipheny.io/typeform-api-google-sheets/">Connect Typeform API to Google Sheets</a>
<a href="https://apipheny.io/shopify-api-google-sheets/">Connect Shopify API to Google Sheets</a>
<a href="https://apipheny.io/coinapi-google-sheets/">Connect CoinAPI to Google Sheets</a>

## 2. Use a publicly available script from Github + Google Apps Script

You can import JSON into Google Sheets using a publicly available script from <a href="https://github.com/">Github</a>.

To import JSON data into Google Sheets using Google Apps Script, follow these steps:

A. Open a Google Sheet
B. In the menu, choose "Tools" > "Script Editor"
C. Delete the content that's in the editor
D. Copy and paste a script from Github <a href="https://gist.github.com/paulgambill/cacd19da95a1421d3164">such as this one</a> into the editor
E. Choose "File" > "Save"
F. Title the code "ImportJSON"
G. Close Script Editor and go back to the Google Sheet
H. In the A1 cell, type ImportJSON("X") but replace X with your API endpoint
I. Press enter and the JSON will be imported into your Google Sheet

Pros:
* Free

Cons:
* Limited in functionality
* Requires some coding

Disclosure: I am the co-founder of Apipheny