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:


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).