For those of us not too familiar with all the technical mumbo jumbo surrounding Glide’s fetchJSON plugin, here is a real no code solution for importing JSON to your Google Sheet and presenting the fetched results in your Glide apps/Pages.

This will not work with Glide Tables. There are a couple of workarounds but we are not interested in those for this exercise. We are keeping things simple.

What I am sharing here with you has already been covered other threads with different use cases in mind). The script I am sharing with you will fetch JSON data from any API (paid/unpaid, public/private).

Our use case

I have a Pages site, and I want:

  • curated headlines from the US.
  • list of some of the members of House of Commons in the UK.
  • 50 daily random inspirational quotes

I don’t have the time to search for these things and add them to my Google Sheet. I need to import a lot of data from several APIs that return data in JSON format. Try doing all of this with Glide’s Fetch JSON Plugin. Not in any way undermining it. Very grateful for it, but the task is fraught with difficulties if you are a no-coder. However, there is an amazing alternative.

What is importJSON?

Imports a JSON feed and returns the results to be inserted into a Google Spreadsheet. The JSON feed is flattened to create a two-dimensional array. The first row contains the headers, with each column header indicating the path to that data in the JSON feed. The remaining rows contain the data.

Installing ImportJSON script

  1. visit
  2. Copy the code on the screen.
  3. Open the new sheet, click Tools > Script editor.
  4. Paste the script in the editor
  5. Rename the script from to Save the file and move back to the sheet. No need to set triggers (the best bit about it!)
  6. Once the script is saved, we are ready to import some data from any API that returns JSON data. Complete doc on this script is maintained at , and ImportJSON/ at master · bradjasper/ImportJSON · GitHub

Things You Need To Know:

“ImportJSON takes 3 parameters:
The URL to a JSON feed.
A comma-separated list of paths to import. Any path starting with one of these paths gets imported.

A comma-separated list of options that alter processing of the data. By default, data gets transformed so it looks more like a normal data import. Specifically: Data from parent JSON elements gets inherited to their child elements, so rows representing child elements contain the values of the rows representing their parent elements. Values longer than 256 characters get truncated. Headers have slashes converted to spaces, common prefixes removed and the resulting text converted to title case. To change this behaviour, pass in one of these values in the parseOptions parameter:

Don’t inherit values from parent elements
Don’t truncate values
Don’t prettify headers
Don’t include headers, only the data
Prepend each value with the row & column it belongs in

For example, to return all the number of shares and comments for the URL from the Facebook Graph API, you could use:
=ImportJSON(CONCATENATE(“”, URLEncode(“”)), “”, “”)

If you wanted to get rid of the headers, you would add a “noHeaders” to the last parameter.
=ImportJSON(CONCATENATE(“”, URLEncode(“”)), “”, “noHeaders”)

As an advanced example, if you wanted to query YouTube for the most popular videos, but only see the data returned relating to the ‘title’ and the ‘content’, you could use:
=ImportJSON(“”, “/feed/entry/title,/feed/entry/content”, “noInherit,noTruncate,rawHeaders”)

The “rawHeaders” allows us to see the full path to each column of data in the spreadsheet.”


This I believe is the one that we will ever need. Since values longer than 256 are truncated, I need to change behaviour to “noTruncate”.

List of some of the members of House of Commons in the UK

For this I will be using a public API. I am grabbing only a few as I am limited to 100 rows on the free tier of Pages.

  1. Visit GitHub - public-apis/public-apis: A collective list of free APIs
  2. Look for “Government” > (Contains live datasets including information about petitions, bills, MP votes, attendance and more)
  3. The link in 2 above is to Dataset Explorer
  4. Scroll down and find “Data formats”. We want this > JSON e.g.
  5. Replace “members” in the URL with any of the following search paths:

commonsmembers All Commons Members
lordsmembers All Lords Members
members All Members
members/{id} Member by ID
commonsregisteredinterests Returns Commons Financial Interests
lordsregisteredinterests Returns Lords Financial Interests
lordsregisteredinterests?member={id} Returns Lords Financial Interests By MemberId

  1. I just want members, so I am not replacing anything (you can though). NOTE: Data is too old and not all links are correct. But that’s not the fault of the Script, but API.
  2. In cell A1 of Members Sheet insert following


Inspiration Quotes

For the 50 daily inspirational quotes, again:

  1. Visit GitHub - public-apis/public-apis: A collective list of free APIs
  2. Look for “Personality” > Zen Quotes (Large collection of Zen quotes for inspiration)
  3. The link in 2 above is
  4. Scroll down to “Sample Requests” > (generates 50 random quotes on each request)
  5. In cell A1 of sheet ZenQuotes enter


Curated USA Headlines

  1. I will import top headlines from USA from NewsAPI ( . Just sign up to get your API (free for developers but you will need to pay once you switch from developer/staging mode to production mode).
  2. I am leaving the ‘query’ parameter empty to import all the paths.
  3. Insert this into cell A1 of sheet named, say, “US Headlines”.


Magic result:

What else did I learn – next time I am struggling with Jquery paths, all I need to do is an importJSON, check the headers in the sheet, replace uppercase with lowercase (but not always the case) in my fetchJSON plugin.

Thank you


Hola @Wiz.Wazeer

Good tip. There are other GS Add-Ons available able to do what you show, I have tested some them before and I’d recommend 2:

They support a kind of custom formula (e.g. =Apipheny()) able to see a cell’s value and fire an API call if it has changed. Also, they can save and schedule API requests, great tool!



Thank you for this :+1::+1::+1:

1 Like

Could someone please help test the IP address plugin on this pages site. I can see mine, but just wanted to confirm it’s working for others.

Thank you

1 Like

It gives the correct result for me.

1 Like


Really appreciate it1

1 Like

Correct for me too.

1 Like


Again, really appreciate it…so it is working…!

1 Like

Wiz, can u message me please.

1 Like