bradjasper / ImportJSON

Import JSON into Google Sheets, this library adds various ImportJSON functions to your spreadsheet
GNU Lesser General Public License v3.0
2.11k stars 1.06k forks source link
cryptocurrencies google-sheets importjson parsing spreadsheet

ImportJSON

NOTE: This repo is currently unmaintained and looking for a new developer. If you are interested please reach out to contact@bradjasper.com

Import JSON from any URL directly into your Google Sheets. ImportJSON.gs adds an =ImportJSON() function to your spreadsheet, allowing quick and easy JSON importing. To use go to Tools > Script Editor and add the ImportJSON.gs file. Now in your spreadsheet you can access the ImportJSON() function. Use it like this:

=ImportJSON("https://mysafeinfo.com/api/data?list=bestnovels&format=json&rows=20&alias=cnt=count,avg=average_rank,tt=title,au=author,yr=year", "/title")

Here are all the functions available:

Function Description
ImportJSON For use by end users to import a JSON feed from a URL
ImportJSONFromSheet For use by end users to import JSON from one of the Sheets
ImportJSONViaPost For use by end users to import a JSON feed from a URL using POST parameters
ImportJSONBasicAuth For use by end users to import a JSON feed from a URL with HTTP Basic Auth
ImportJSONAdvanced For use by script developers to easily extend the functionality of this library

Review ImportJSON.gs for more info on how to use these in detail.

Version

How can you help?

Website archive

This code base used to be hosted at http://blog.fastfedora.com/projects/import-json and contained a lot of useful information. It has been archived at https://rawgit.com/bradjasper/ImportJSON/master/archive/blog.fastfedora.com/projects/import-json.html

Alternatives

Some of this if possible internally with Google App Scripts External APIs, like UrlFetch: https://developers.google.com/apps-script/guides/services/external

These require a Google account and an explicit permission, but in some cases may be a good fit.