17

There is IMPORTXML function to import data from any of various structured data types including XML, HTML, CSV, TSV, and RSS and ATOM XML feeds.

Is there any similar solution to import data in JSON format?

13

Currently there is no any Add-on which offer this functionality, so you have to create or import custom functions by Script Editor available in Tools menu (for Spreadsheet). Then re-paste the content of ImportJSON.gs from bradjasper's GitHub page and save it.

After that, you can use ImportJSON function, for example:

=ImportJSON("http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?v=2&alt=json", "/feed/entry/title,/feed/entry/content", "noInherit,noTruncate,rawHeaders")

Here is another example:

=split(concatenate(ImportJSON("https://api.binance.com/api/v1/klines?symbol=BTCUSDT&interval=1m&limit=1")), ",")

Read more:

  • 1
    is there a way to do this in new google sheets? how do i get this running? – rcphq May 31 '15 at 19:12
  • 1
    is there a way to paste the json object in the argument, instead the url? – catch22 Oct 18 '17 at 10:22
  • I've tested these steps today (as of 2018) and they still work in the latest Sheets (Tools->Script editor) and import the functions. – kenorb Jul 30 '18 at 20:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.