I recently started using the "New Google Sheets" (spreadsheets) and they changed the URL to a shared public spreadsheet and I am unsure how to obtain a JSON feed of the spreadsheet data.
Based on data from this URL: https://developers.google.com/gdata/samples/spreadsheet_sample
I can obtain the JSON data from an older version spreadsheet using the key parameter found in a URL of this format: http://spreadsheets.google.com/feeds/feed/key/worksheet/public/basic?alt=json-in-script&callback=myFunc
However, the new sheets have a URL like this: https://docs.google.com/spreadsheets/d/SOME-IDENTIFIER/pubhtml
Using "SOME-IDENTIFIER" in place of the key does not work, I'm not sure how I can pull the JSON feed from a new spreadsheet... Anyone have any experience with this?
The format you should use is this :
https://spreadsheets.google.com/feeds/cells/ SHEET-IDENTIFIER/ SHEET_INDEX/ public/basic?alt=json-in-script&callback=JSON_CALLBACK
You can find SHEET_INDEX by looking at the end of the URL while editing the sheet.
...SHEET-IDENTIFIER/edit#gid=SHEET_INDEX
Make sure the spreadsheet is published (not only shared).
File/Pulish to the web...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With