Google Calendar is a collaborative, web-based application designed to manage all of life's important events in one place. The Google Calendar APIs and Tools provide a framework for developers to programatically interface with and extend Google Calendar.
The Calendar Data API lets you perform most of the operations a normal Google Calendar user can on the Google Calendar website. CalDAV provides access to most Calendar data in an industry-standard format suitable for use in traditional calendar applications. The Gadget APIs allow developers to directly extend the Google Calendar web interface, while the Publishing Tools allow developers to extend their own websites with pieces of pre-built functionality from Google Calendar.
First, you should decide which of our APIs and tools best suits your needs and skills. If you're looking to embed Google Calendar on your website or allow users to add an event to their calendar, the easiest solution is to use the publishing tools. The Calendar Data API and CalDAV provide programatic access to Google Calendar, but require programming experience. If your application will be running inside of Google Calendar, then use the Gadget APIs. The table below provides a summary of these options:
| Event Publishing | Data Access | Extensibility |
|---|---|---|
| Publishing Tools | Calendar Data API and CalDAV | Gadget APIs |
The Publishing Tools provide pre-built elements that can be embedded on your website. These tools are best suited for users who are familiar with HTML but may not be familiar with JavaScript or server-side programming, and are looking for the simplest way to embed Google Calendar functionality into their website. Currently, the tools we offer are Embeddable Calendars and the Event Publisher.
|
|
Embeddable Calendars are self-contained versions of Google Calendar that can be added to any website with a few lines of HTML. These calendars are read-only copies of Google Calendar's familiar interface, embedded within an iframe. You can customize the color, size, controls, and list of calendars to fit your needs. |
|
|
The Event Publisher is a tool that creates buttons which can be embedded in HTML pages. When clicked, these buttons add content to a user's Google Calendar account — either individual events or entire calendars. Publishing events requires no programming experience. |
|
|
The Calendar Data API allows a program to perform many of the operations available via Google Calendar web interface. Using this API, it is possible to search for and view public calendar events. Authenticated sessions can access private calendars, as well as create, edit, and delete both events and the calendars that contain them. This is primarily for developers who are have programming experience. It is useful for sites or applications that wish to have a deeper integration with Google Calendar. This integration could be a web application that creates or displays Calendar data. It could be a desktop application that synchronizes a user's Calendar with an existing desktop application. It could even be a device that brings the Calendar experience to a new platform. The Calendar Data API gives you programmatic access to all of the user data available within Google Calendar. With this, you can personalize your site or application with the user's existing information as well as perform actions on their behalf (like creating events and sending out email invitations.) If you are curious about how the Data APIs work at the basic level using XML and HTTP, you can read the Protocol Guide. This guide details the requests and responses that the Data API servers expect and return. To learn more about the structure of these requests and responses, read the Reference Guide. This guide defines the API's feed types, HTTP request parameters, HTTP response codes, and XML elements. You may also want to read about the Google Data Protocol and the Atom Publishing Protocol, which are the standards upon which the Data APIs are built. To make working with the API easier, we have a number of client libraries that abstract the API into a language-specific object model. These client libraries are open source and can be used and modified under the Apache License 2.0. There are Developer's Guides for Java, JavaScript, .NET, PHP, and Python as well as sample code. |
|
|
The CalDAV interface provides desktop applications with read/write access to a users' Calendar data. CalDAV is an Internet standard protocol for the exchange of scheduling information between a server and client applications. Using this protocol, it is possible to store and synchronize event data from a user's private calendars for editing outside of the Calendar web interface. This is primarily for developers who are intimately familiar with the design of scheduling applications, particularly those that use the iCalendar format. Other developers are encouraged to use the Calendar Data API, which is easier to work with and provides additional functionality. |
Gadgets are custom HTML and JavaScript components that run within an iframe and can be embedded within various web pages. Google Calendar includes support for embedding Gadgets within the Google Calendar web interface, creating content-rich data displays and extending Calendar with additional functionality.
Gadgets can be used to create daily status icons, such as Google Calendar's built-in weather calendar. They can be use to embed web pages that are associated with a given date, such as a movie showtimes calendar that displays trailers inside of each event's description. They can also be used to add new controls, such as the "Jump To Date" and "Next Meeting" features in Calendar Labs.
Google Calendar provides two APIs for embedding Calendars:
|
|
Event Gadgets allow web content to be embedded within a calendar. This calendar can be specific to a single user, shared with many users. These events can appear as normal events, events with icons, or standalone icons without an event "chip". When clicked, the gadget will load a specified URL inside of an iframe instead of the normal event bubble. Event gadgets are useful when importing importing events into Google Calendar, and these events have additional information stored outside of Calendar that the user may be interested in. Some examples would be weather data, birthday reminders, movie showtimes, and other recurring, generated events. However, they offer limited JavaScript support, and do not provide access to control the Calendar UI. |
|
|
Sidebar Gadgets are small, portable web applications that live in the left-hand side of the calendar UI. Supporting the gadgets.* API, these are an excellent choice whenever implementing complex functionality. They also have access to event data and Calendar user-interface controls, which also allows them to act as plugins for the Google Calendar interface. Many of the Calendar Labs features are implemented as sidebar gadgets, including the "Jump To Date", "Next Meeting", and "World Clock" experiments. Additionally, existing Gadgets from other sites can often be converted into Sidebar Gadgets with little or no modification. |