Click here to see your recently viewed pages and most viewed pages.

Simple example of retrieving JSON feeds from Spreadsheets Data API

Warning: This page is about Google's older APIs, the Google Data APIs; it's relevant only to the APIs that are listed in the Google Data APIs directory, many of which have been replaced with newer APIs. For information about a specific new API, see the new API's documentation. For information about authorizing requests with a newer API, see Google Accounts Authentication and Authorization.


This sample demonstrates displaying a list or cells feed for a particular worksheet in a spreadsheet using the JSON output format provided by the Spreadsheets Data API. This allows you to query a spreadsheet's public list or cell feed and get the resulting entries returned as JSON objects. To use the new JSON feed, create a script element whose src value is

where feed is the type of feed, key is the key of the spreadsheet you want to retrieve, the worksheet is the positional or unique identifier of the worksheet, and myFunc is the name of your callback function that is passed the JSON object. For more information on JSON output support for Google Data APIs please see our JSON output support documentation.

Note: Retrieving a feed without authentication is only supported for published spreadsheets.

Note: Other feed types and visibility and projection values may be used with JSON output support. For more information on other feed types, and visibility and projection values please see the Spreadsheets Data API documentation.