Google Data APIs

Sample Using Google Calendar API JSON Output

This sample demonstrates displaying a list of upcoming calendar events from a Google Calendar on a web page using the JSON output format provided by the Calendar Data API.

The <script> element is used to retrieve a public calendar feed as a JSON object which is used as the sole parameter to a callback function defined in the URL.

The src for the script is:

http://www.google.com/calendar/feeds/developer-calendar@google.com/public/full?alt=json-in-script&callback=insertAgenda&orderby=starttime&max-results=15&singleevents=true&sortorder=ascending&futureevents=true

This retrieves the full projection of the public feed for the developer-calendar@google.com calendar in JSON format (alt=json-in-script) with a callback function called insertAgenda. A maximum of 15 events is returned (max-results=15), recurring events are represented as individual events (singleevents=true) and all events in the future (futureevents=true) are returned in ascending order (sortorder=ascending).

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.