Google Data APIs

Google Data APIs Samples

Warning: This page is about Google's older APIs, the Google Data APIs; it's relevant only to the APIs that are listed in the Google Data APIs directory, many of which have been replaced with newer APIs. For information about a specific new API, see the new API's documentation. For information about authorizing requests with a newer API, see Google Accounts Authentication and Authorization.

This page provides links and information about sample code.

Contents

  1. JavaScript samples
  2. JSON samples
  3. Gadget samples
  4. Java samples
  5. .NET samples
  6. Other languages

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.

Note: The samples that were previously in this section have been removed because they relied on APIs and/or authentication methods that are no longer available.

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.

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

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

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

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.

Other languages

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
Ruby on Rails sample that allows users to view and export documents.

Back to top

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.