Gadgets API

Frequently Asked Questions


Getting Started

What are gadgets?
Gadgets are small web applications that run on web pages. Gadgets are written in a module language using XML that wraps HTML and JavaScript.
What's the difference between gadgets and Desktop Gadgets?

What you can do with gadgets:

  • Write in HTML; for dynamic behavior add JavaScript, Flash, or Silverlight.
  • Get started quickly: no downloads necessary, no libraries to learn, and no webserver required.
  • Create gadgets that run online in various sites — such as OpenSocial containers, Maps, and Calendar — as well as in third-party platforms and any webpage.

What you can do with Desktop gadgets:

  • Write in XML and JavaScript, optionally using C, C++, C#, or VB.net
  • Use advanced functionality, such as:
    • Free-form shapes and transparency
    • Client libraries
    • Responses to user actions outside the gadget (such as when the user opens iTunes or starts reading an email message)

Notes:

  • Google Desktop must be installed on the user's computer.
  • Not all gadgets can be added to a user’s desktop
Where do gadgets exist?
Gadgets are simply externally hosted XML files. They can be stored anywhere that normal web sites can be hosted. Google offers a free hosting service that you can use to host your gadgets: Google Code Hosting.

Google fetches the XML specification when the gadget is displayed and caches it for approximately a few hours to prevent web hosting providers from being overloaded with requests.
How do I create gadgets?
Start by visiting the documentation and read through the "Getting Started" guide. Gadgets are externally hosted XML files that must be publicly accessible on the Internet. You can create a gadget XML using any text editor and upload to your hosting provider.

Gadgets re-use existing web technologies such as HTML, JavaScript, Flash, CSS, etc. if you have questions on gadget development, post your questions to the discussion group, and check out the gadgets support pages for additional resources.

Using the API

What is the gadgets API?
The gadgets API is a simple way to create content and applications that run on many sites, including OpenSocial containers. Gadgets don't require any downloads, and were designed to be flexible and easy to use.

Learn more or go directly to the gadgets Developers Guide.
What is XML?
XML is a data format which allows content to be "tagged", allowing both people and computers to easily understand its structure and meaning. Gadgets use XML because it lets people easily write gadgets using one of the many XML editing tools that are available.
Which version of the API should I use?
There are two versions of the gadgets API. The one you should use depends on where you're planning to deploy the gadget. The gadgets Developers Guide offers details on the differences between the versions and links to their respective documentation.
Where can I host my gadgets?
Gadgets are stored anywhere that normal web sites can be hosted. This includes normal web hosting environments, Google Code hosting. The location must be accessible from the Internet, so that Google can fetch the gadgets and display them to users.
What kind of content can I include in my gadget display?
Since gadgets are essentially web pages, you can include anything that you could include in a normal web page — HTML, CSS, JavaScript, Flash, music, games, and even video. Using the external data fetching methods of the gadgets API, your gadget can even retrieve information from other sites or interact with third-party APIs. See these sections of the gadgets Developers Guide for more information:
How do I fetch remote content and display it inside a gadget?
The gadgets API provides a number of methods for fetching various kinds of external content. See the section of the gadgets Developers Guide on Working with Remote Content for more details.

Troubleshooting

One of my gadgets has messed up my homepage. How I can start over?
You can use http://www.google.com/ig/resetprefs.html to reset your iGoogle page back to its original appearance.
Bandwidth has exceeded on my gadgets hosting server. What happened and what should I do?
Popular gadgets can put a huge strain on your web hosting service if the gadget requests content (such as images, feeds, flash, or other data types) directly from your hosting provider. Since this can quickly cause a problem, Google provides a "caching proxy". This allows Google to temporarily store resources used by the gadget so that your web hosting only receives a few hundred hits per day, regardless of its popularity. This can greatly reduce the amount of bandwidth used by your web hosting provider. Please see the gadgets Developers Guide section on Remote Content.
I updated my gadget, but I can't see my changes. What's going on?
Since gadgets can become very popular very quickly, they can put a large strain on web hosting providers. In order to alleviate this strain and provide a more consistent experience for gadget users, we "cache", or temporarily store, the gadget XML spec whenever a user loads a gadget. If you update your gadget XML file, you may not see the change until the cache expires — typically after one hour.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.