There is now a convenient way to query free-busy information from Google Calendar. The new Google Calendar free-busy feed allows you to query blocks of busy time for one or multiple users, or for all the users subscribed to a Google Group in a single request.
This new Google Data feed is accessible through the URL pattern
userID” is the email of the calendar you’d like to request the free-busy information of. The response will be an entry containing temporal blocks indicating the periods when the user is marked as busy in their Google Calendar. Visit our Developer’s Guide for more details and code samples about the free-busy feed.
You can also query free-busy information for multiple users in a single query using a batch request. The URL to use for such a batch request is:
Below is a sample batch request, requesting free-busy information for Liz, Bob and Luke:
http://www.google.com/calendar/feeds/default/freebusy/busy-times/liz%40example.com http://www.google.com/calendar/feeds/default/freebusy/busy-times/bob%40example.com http://www.google.com/calendar/feeds/default/freebusy/busy-times/luke%40example.com
This allows you, for example, to find common free time between multiple users in one single request to the Google Calendar API, which was not possible with previously existing feeds.
For example, the response from the batch request above would look like:
https://www.google.com/calendar/feeds/default/freebusy/batch/1234 2010-03-13T00:00:00.000Z http://www.google.com/calendar/feeds/default/freebusy/liz%40example.com … updated, category, self link, author and batch info ... http://www.google.com/calendar/feeds/default/freebusy/bob%40example.com … Free-busy entry content for Bob ... http://www.google.com/calendar/feeds/default/freebusy/luke%40example.com … Free-busy entry content for Luke ...
The response contains an entry for each requested calendar’s free-busy feed. Each of these entries contains blocks of time where the user is marked as busy in his Calendar for the next 24 hours.
Google Apps for Business domain users are also able to query free-busy information for all the members of a given Google Group in a single request. This feature is available through the following URL pattern:
https://www.google.com/calendar/feeds/default/freebusy/group/groupID/busy-times Where “
groupID” is the email of the Google Group.
The response will be a feed containing the free-busy entries of each member of the group. To learn more about querying free-busy for groups please visit our Developer’s Guide.