My favorites | English | Sign in

Google Data Protocol

Google Data APIs Samples

This page provides links and information about sample code.

Contents

JavaScript samples

The JavaScript client library can be used from web browsers to interact with the Base Data API, Blogger Data API, Calendar Data API, Contacts Data API, and Finance Data API. Full read/write capabilities are available using the AuthSub authentication method.

Google Calendar

Basic unauthenticated query sample using Google Calendar
This read-only sample demonstrates how to query public calendar feeds.
Managing meeting notes using Google Calendar
This sample demonstrates full read/write capabilities using the JavaScript client library in a web browser to manage meeting notes. The user is authenticated using AuthSub.
Birthday manager using Google Calendar
Keep track of the birthdays of your friends and family. This read/write sample adds birthdays to your primary Google Calendar as Calendar Gadgets and allows you to receive reminders of these important days. A Greasemonkey script is included to easily add the birthdays of your friends in Facebook. Authentication is performed using AuthSub.
CalendBlogger Google Calendar to Blogger publisher
Want to let all your blog readers know what you're up to in the next couple days? This sample allows you to publish events from your Google Calendar to your Blogger blog, using only client-side code and the JavaScript client library.

Google Base

Google Base Items Mapper
A tool for updating and geocoding your personal items using the Google Maps API.

Blogger

Blogged Upon
This sample demonstrates using Google's AJAX Search API to retrieve blog entries of interest and allows you to comment about them on your own Blogger blog. This sample uses the Blogger Data API and the JavaScript client library.
"Blog This" embedded blog editor
Wouldn't it be great if people who read your webpage could post about it on their Blogger blogs without leaving your page? This sample shows how to write code using the JavaScript client library which does just that. It also includes a snippet of code which you can use in your website to enable this functionality.
CalendBlogger Google Calendar to Blogger publisher
Want to let all your blog readers know what you're up to in the next couple days? This sample allows you to publish events from your Google Calendar to your Blogger blog, using only client-side code and the JavaScript client library.
blog.gears offline client for Blogger using Google Gears
One of the major features of Google Gears is the ability to write dynamic webpages which work offline using JavaScript and a local database. This sample uses Gears to allow creating, editing and deleting posts while offline. See this YouTube video/screencast and this presentation about how the JavaScript client library and Google Gears enable this sample.
blog.press JavaScript Blogger client
This sample enables creating, editing and deleting blog posts while online, using only client-side code and the JavaScript client library. The interface for blog.press is very similar to blog.gears above, but works without Google Gears being installed.

Contacts

Friend Picker
This sample demonstrates displaying a list of contacts received from a user's GMail contact list using the Google Data JavaScript client library in conjunction with the Google Contacts Data API.

Google Sideiwki

Fetch entries sample
This sample demonstrates retrieving Sidewiki entries written for a web page or by Sidewiki contributor. This sample uses the Sidewiki Data API and the JavaScript client library.

JSON samples

These are live samples; click to view them. For more information, see Using JSON with Google Data APIs.

Google Calendar

Upcoming events from Calendar
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.
Sample to populate a Simile Timeline widget
This sample shows how to use Google Calendar as an event source for a Simile Timeline widget. Now you can display your calendar data in a snazzy AJAX timeline!

Google Base

Google Base API Query Generator
A tool for learning and understanding the Google Base API query language. You can use the generator to construct test queries for your own application, experiement with the API's search parameters, and then see the results of your search.
Results from Google Base
This sample demonstrates displaying query results from the Google Base API snippets and attributes feeds using the JSON output format.

Blogger

Recent posts from Blogger
This sample demonstrates displaying a list of recent posts from a blog hosted on Blogger Beta using the JSON output format provided by the Blogger Data API.

Spreadsheets

Reading Google Spreadsheets data
This sample demonstrates displaying data from a Google Spreadsheet on a web page using the JSON output format provided by the Spreadsheet Data API.

Gadget samples

For more information on creating Google Data API gadgets, see Creating a Google Data Gadget or the full Writing OAuth Gadgets documentation.

Blogger gadget
YouTube gadget
Google Base Jobs Finder gadget

Java samples

Samples bundled with the client library

These samples can be found in the downloadable Java client library package. For more information, see the Java client library developer's guide, or download the Java client library.

java/sample/authsub/
GData AuthSub proxy, implemented using Java servlets; sample JavaScript client that accesses data through the proxy.
java/sample/calendar/
Simple client that performs several hardwired manipulations on a Google Calendar.
java/sample/codesarch/
Command line client to query the Google Code Search data API.
java/sample/spreadsheet/
Sample apps using Google Spreadsheet API.
java/sample/appsforyourdomain/
Sample apps using Google Apps API.
java/sample/blogger/
Sample apps using Blogger API.
java/sample/contacts/
Sample apps using Google Contacts API.
java/sample/docs/
Sample apps using Google Doclist API.
java/sample/health/
Sample apps using Google Health API.
java/sample/gbase/
Sample apps using Google Base API.
java/sample/photos/
Sample apps using Picasa Web Album API.
java/sample/sidewiki/
Sample apps using Google Sidewiki API.
java/sample/webmastertools/
Sample apps using Webmaster API.
java/sample/youtube/
Sample apps using YouTube API.
YouTubeSample ASP page
Video search and upload sample using the client library.

Other examples

Health JSP sample [ live demo ]
A JSP page that utilizes the Java client library to read a user's Google Health profile.

.NET samples

Samples bundled with the client library

These samples can be found in the downloadable .NET client library package. For more information, see the .NET client library developer's guide, or download the .NET client library.

clients/cs/samples/blogger/
Sample apps using Blogger API.
clients/cs/samples/calendar/
Sample apps using Google Calendar Data API.
clients/cs/samples/codesearch/
Sample apps using Google Code Search API.
clients/cs/samples/gbase/
Sample apps using Google Base API.
clients/cs/samples/spreadsheets/
Sample apps using Google Spreadsheet API.
clients/cs/samples/DocListUploader/
Uploads documents to Google Docs.
clients/cs/samples/DocListExporter/
Exports Google Documents in various formats.
clients/cs/samples/PhotoBrowser/
Sample apps using Picasa Web Album API.
clients/cs/samples/YouTubeSample/
Sample apps using YouTube API.
clients/cs/samples/appsforyourdomain/
Sample apps using Google Apps API.
clients/cs/samples/health/
Sample apps using Google Health API.

Other examples

Contacts Updater
A WPF sample that demonstrates how to read and update your contacts using the Contacts API. A .zip file is also available.
Google Docs PDF Concatenator
Concatenates PDF files together and uploads the result to Google Docs. A .zip file is also available.
Health ASP sample [ live demo ]
Samples that demonstrate reading a user's health profile and posting notices to their profile

Other lanaguages

C++

Documents List API sample
Allows users to view, upload, delete, and search their Google documents, spreadsheets, presentations, and folders. This sample also demonstrates the API's ACL functionality by listing the users who have read/write permissions.

Ruby

DocList Manager [ live demo ]
Ruby on Rails sample that allows users to view and export documents.

Back to top