Saturday, October 31, 2009

[Gd] Happy Hallo-Wave-een!

| More

Google Wave Developer Blog: Happy Hallo-Wave-een!

I moved down to Australia a year ago, and just a few weeks ago, decided to stay here indefinitely because it's an awesome country. It has beaches, forests, cities, shark-eating-shark, kangaroos, and drop bears. What more could you want? Well, there is one thing: Halloween. I am a huge fan of any holiday that revolves around dressing up in ridiculous outfits and being rewarded with candy for it. Heck, I have two permanent (and really nasty looking) scars from trick-or-treating incidents, and I still love the holiday. (Tip: If your witch cape is held on by a shoestring, make sure you don't get the end of the cape caught under the wheels of a car when it revs up.) So, I've decided to show the Google Wave team what halloween is all about, first by dressing up like a faceless robot avatar (in honor of the recently resolved issue 335), and second by collaborating with Austin, another displaced American, to create a trick-or-treating extension for Google Wave.

The "Tricky" extension uses all of the Wave APIs together to create an interactive Halloween experience. First, the extension installer gives you an option in your New Wave menu to "Go Trick or Treating". When you click that, it creates a new wave and inserts a gadget (try clicking around that to see what surprises await). Then, whenever a user types 'trick or treat', the robot fetches an image from Google Image Search for either a yummy candy bar, or well, something not that yummy. Now, all of you world-wide developers can go trick or treating together, by visiting this sample wave -- and learn the Wave APIs at the same time, by browsing through the code.

Have fun, and let us know in the forum if you found other wave-y ways to celebrate Halloween.

Posted by Pamela Fox, Developer Relations

Friday, October 30, 2009

[Gd] Cleaning Up Our Embeds

| More

YouTube API Blog: Cleaning Up Our Embeds

For the longest time, official YouTube video embed codes have contained embarrassingly malformed URLs; the first URL parameter (at the end of URLs) should always start with a ? character, but our URL parameters begin with &. That looks something like this: (incorrect) (correct)

Fortunately, we've found a way to use correct URLs without breaking old browsers and we can't wait to do it.

Speaking of changes to the embed code, we'll also be tweaking the HTML content. The new YouTube embed code is leaner and still works on everything from ancient desktop browsers to modern smart phones. You won't find another snippet of HTML that's as battle-tested and mother-approved! Here's a preview of the new, streamlined format:

And here's what the HTML looks like:

<object width="425" height="344">
<param name="movie" value="">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src=""
type="application/x-shockwave-flash" allowfullscreen="true"
allowScriptAccess="always" width="425" height="344">

If you grab YouTube embed codes by hand from, or from the YouTube Player APIs or oEmbed, you'll start getting this updated HTML soon. As for all the embeds already on the web: worry not, those will continue to work forever.


[Gd] Google Analytics API on App Engine Treemap Visualization

| More

Google Code Blog: Google Analytics API on App Engine Treemap Visualization

It's Friday, time for some fun!

Here is a captivating way to visualize your Google Analytics data in a Treemap visualization and you can visualize your own data with our live demo.
(note: IE currently not supported for visualization part)

The goal of this example was to teach people how to use the Google Analytics API on App Engine in Java. As well as demonstrating how to use both OAuth and AuthSub along with the App Engine's various services. The code looked great, but the output was a boring HTML table. So I used some open source tools to transform the table into a pretty tree map visualization!

All the code has been open sourced on Google Project hosting. I also wrote an article describing how this application works making it easy for developers to use this example as a starting point for new data visualizations and other Google Data projects.

For the data retrieval part, this example uses the App Engine Java SDK and the Google Analytics Data Export API Java Client Library to retrieve data from Google Analytics. The example code implements both unsigned AuthSub and registered OAuth authorization methods allowing developers to get up and running quickly in development environments and later switch to a secure authorization method in production environments. The application also uses the Model-View-Controller pattern, making it flexible and allowing developers to extend the code for new applications. (like adding support for other Google Data APIs)

For the visualization part, I used the open-sourced Protovis SVG Visualization Library to create the Treemap. This JavaScript library is maintained by the Stanford Visualization Group and excels at creating brand new visualizations from a data set (in this case a boring HTML table). To handle all of the interactions, including rollover, tooltips and slider controls, I used JQuery. Here is the JavaScript source to the visualization part of the sample.


By Nick Mihailovski, The Google Analytics API Team

P.S. If you have created any cool new visualizations using the Google Analytics Data Export API, email us so we can highlight them as well.

[Gd] [Libraries][Update] - Scriptaculous 1.8.3

| More

Google AJAX API Alerts: [Libraries][Update] - Scriptaculous 1.8.3

Scriptaculous was updated to version 1.8.3

Thursday, October 29, 2009

[Gd] Using RSS/Atom feeds to discover new URLs

| More

Official Google Webmaster Central Blog: Using RSS/Atom feeds to discover new URLs

Webmaster Level: Intermediate

Google uses numerous sources to find new webpages, from links we find on the web to submitted URLs. We aim to discover new pages quickly so that users can find new content in Google search results soon after they go live. We recently launched a feature that uses RSS and Atom feeds for the discovery of new webpages.

RSS/Atom feeds have been very popular in recent years as a mechanism for content publication. They allow readers to check for new content from publishers. Using feeds for discovery allows us to get these new pages into our index more quickly than traditional crawling methods. We may use many potential sources to access updates from feeds including Reader, notification services, or direct crawls of feeds. Going forward, we might also explore mechanisms such as PubSubHubbub to identify updated items.

In order for us to use your RSS/Atom feeds for discovery, it's important that crawling these files is not disallowed by your robots.txt. To find out if Googlebot can crawl your feeds and find your pages as fast as possible, test your feed URLs with the robots.txt tester in Google Webmaster Tools.

Written by Raymond Lo, Guhan Viswanathan, and Dave Weissman, Crawl and Indexing Team

Wednesday, October 28, 2009

[Gd] Asynchronous requests with the BulkMutateJobService

| More

AdWords API Blog: Asynchronous requests with the BulkMutateJobService

Delegation of tasks: we use this concept in our everyday lives when we pay someone to make us coffee, ask a colleague to take care of something while we run to the dentist, or tell our kids or younger siblings to handle a chore. What's common in all these situations? Well, you assign someone a task, possibly consisting of several parts, and then you wait for it to be completed. You can focus on other things while the task is being worked on, but you can still periodically ask what the status is (not too often, or they'll think you're annoying). Eventually they'll tell you it's done, and let you know whether it was successful or not. It's a simple process, and we intuitively know what to expect from it.

Well, you can now delegate complex tasks via the AdWords API! v2009 introduced a unified interface across all services for performing changes: the mutate method. This unification allowed us to develop the BulkMutateJobService, where you can provide a list of mutate operations to be performed for a number of different services, by scheduling a job which gets executed asynchronously. Much like the v13 ReportService, you can then poll for the job status, and once you get back the signal that it's been completed, you can ask for the results.

Let's dive into the details. BulkMutateJobs consist of the following:
  • BulkMutateRequests: these are the different parts of the job. The first one you submit should include a count of how many parts your job has; you submit one at a time, and once the last one is submitted, the job automatically starts. This helps build very large jobs, by avoiding the sending of a single, gigantic request.
  • OperationStreams: a BulkMutateRequest contains one or more OperationStreams, which can be executed in parallel (only in certain conditions, namely if their scopes target different campaigns).
  • Operations: each OperationStream contains a list of Operations, which are performed sequentially.
So to create a job with two parts, you would simply do:
BulkMutateJob job = new BulkMutateJob();
and fill in the details for the first part:
BulkMutateRequest part1 = new BulkMutateRequest();
Then create an operation stream, consisting of several operations (they can even use different operators) and use it in the part:
OperationStream adStream = new OperationStream();
adStream.setOperations(new Operation[] {
new AdGroupAdOperation(Operator.ADD, null, adGroupAd1, null),
new AdGroupAdOperation(Operator.ADD, null, adGroupAd2, null)});
part1.setOperationStreams(new OperationStream[] {adStream});
Once we're done with that, we can create the JobOperation and submit the first part to the service:
JobOperation jobOperation = new JobOperation();
job = bulkMutateJobService.mutate(jobOperation);
Long jobId = job.getId();
Submitting the second part is similar, but now we must use the SET operator, since we're adding to an existing job, not creating a new one. Also, we must provide the job ID, so that the system knows which job we're submitting a new part for.
BulkMutateRequest part2 = new BulkMutateRequest();
// ... OperationStream code goes here ...
job = new BulkMutateJob();
job.setId(jobId); // Here we set the ID to the one we got from
// the response to the first part

job = bulkMutateJobService.mutate(new JobOperation(Operator.SET, null, job));
Once all the parts are submitted, the system automatically starts the job. Querying the status is easy, just perform a get with the job ID:
BulkMutateJobSelector selector = new BulkMutateJobSelector();
selector.setJobIds(new long[] {jobId});
BulkMutateJob[] jobs = bulkMutateJobService.get(selector);
job = jobs[0];
Don't query too often, though, or you may run trigger a rate-limiting protection! We recommend 30 seconds as a good value to wait between queries. Once the response comes back with a COMPLETED status, we can retrieve the results for both parts, by setting the resultPartIndex:
jobs = bulkMutateJobService.get(selector);
job = jobs[0];
OperationResult[] operationResults1 =

jobs = bulkMutateJobService.get(selector);
job = jobs[0];
OperationResult[] operationResults2 =
The BulkMutateResult object in the result field of the response includes a list of OperationStreamResults, which themselves are an array of OperationResults. Going through this hierarchy allows you to see which operations were successful and which ones failed, and act accordingly.

Note: If you're looking for a more complete example of using the BulkMutateJobService, please check the examples/demo folder in the client library of your choice. Also check Performing Bulk Jobs with BulkMutateJobService in the API documentation.

With the BulkMutateJobService you can provide as much work as possible to the API in one go and let it do its processing, without worrying about timeouts or broken connections. It won't affect your error handling, either, since the responses detail exactly what happened to all of the operations you performed. It's just an efficient way of getting a lot of work done in a single task. Come in and have a seat, the AdWords API is ready to take your order!

--Sérgio Gomes, AdWords API Team

PS - Come back next week, when we'll tell you all about getting ideas from the new TargetingIdeaService!

Tuesday, October 27, 2009

[Gd] Happy Holidays! Enjoy more API units

| More

AdWords API Blog: Happy Holidays! Enjoy more API units

We know the holiday season is a busy time for you and often means a number of updates to your campaigns. We'd once again like to help out by providing you with more API units.

Starting now and extending through January 15th of next year, all developers will receive a bonus of 20% more API units at no additional cost.
  • Developers can purchase API units at the rate of 1250/$0.25, up from 1000/$0.25, from now through January 15th, 2009.
  • Advertisers who are eligible for free API units will receive credit at the rate 300/$ of AdWords spend, up from 250/$ of AdWords spend. They will be credited the holiday bonus based on their spend in previous months.
You can view your API usage in your MCC account, by clicking the AdWords API Center link under the My Account tab.

As always, we encourage you to use the API as efficiently as possible. See our blog post on efficiency best practices to learn about ways to get more out of your API units. For more general API best practices, see our previous post dedicated to just that topic. Finally, we encourage developers to take advantage of the efficiencies and cost savings associated with API v2009.

Happy Holidays,
-Shreyas Doshi, Product Manager

[Gd] Announcing Android 2.0 support in the SDK!

| More

Android Developers Blog: Announcing Android 2.0 support in the SDK!

I am excited to announce that the Android SDK now supports Android 2.0 (also known as Eclair).

Android 2.0 brings new developer APIs for sync, Bluetooth, and a few other areas. Using the new sync, account manager and contacts APIs, you can write applications to enable users to sync their devices to various contact sources. You can also give users a faster way to communicate with others by embedding Quick Contact within your application. With the new Bluetooth API, you can now easily add peer-to-peer connectivity or gaming to your applications. To get a more complete list of the new capabilities you can add to your applications, please go to the Android 2.0 highlights page.

Current developers can use the SDK Manager to add Android 2.0 support to their SDK as well as update their SDK Tools to revision 3. New developers can download the Android SDK from the download site. After the download, Android platforms must be added using the SDK Manager

The SDK Manager allows you to add new Android platforms to your SDK.

Android SDK Tools, revision 3 is required to develop for Android 2.0. It includes support for code coverage through the Ant build system, as well as Mac OS X 10.6 (Snow Leopard) support for the SDK and related tools. For those of you who develop using Eclipse, we are releasing ADT version 0.9.4 through the usual Eclipse update mechanism.

Over the next few months, we expect to see more and more Android devices being released. These devices will be running Android 1.5, 1.6, or 2.0. We are also planning a minor version update of Android 2.0 towards the end of the year, and that will be the last update for 2009. Below are some of the things you can do to be better prepared:

  • Download the Android 2.0 platform and make sure your existing apps continue to work on new devices running Android 2.0.

  • Make sure that your apps work when using the WVGA (800x480) & FWVGA (854x480) emulator skins. We expect devices with these types of screen, running Android 2.0 to be launched soon.

Checkout the video below for more information about Android 2.0.


Monday, October 26, 2009

[Gd] Task Queue Quota Increases

| More

Google App Engine Blog: Task Queue Quota Increases

Since the Task Queue API launched in June, we've been thrilled with
how many developers have started using the API.
Many developers have asked for more quota so that they can better utilize the API within their apps. We're pleased that we can now address these requests by
significantly increasing the Task Queue quotas and are happy to
announce the following changes, effective from today:

  • Free quota increased from 10K to 100K task insertions per day.

  • For billing enabled apps, quota increased from 100K to 1M (one million) task insertions per day.

  • Total execution rate (across all queues for a given app) increased from 10 to 20 task invocations per second.

Stay tuned for more enhancements to the Task Queue system in the coming months.


[Gd] Three birthday candles for Custom Search

| More

Google Custom Search: Three birthday candles for Custom Search

Last Friday was the third anniversary of Custom Search! Here's a photo of our celebratory cake, baked by John Skidgel, our multitalented Senior Interaction Designer. Our cake was baked in between code reviews for our brand new Look and Feel tab. The magnifying glass was a chocolate cake and the handle and cubes are made from marshmallow and rice cereal squares. Luckily, the local cooking store had ready-made fondant in Google colors. :-)

Thanks to you, our users, the Custom Search platform has grown over the last three years: We now have millions of registered Custom Search engines globally, and are serving many tens of millions of search queries per day. Custom Search, now among the top two widgets on the web, powers websites ranging from the New York Times, MacWorld and Orbitz to individual and topical websites. Since the launch of the Blogger gadget a few months back, hundreds of thousands of bloggers use it to help people find information on their sites. Many applications, such as Community Help within Adobe Creative Suite 4 and topical search on, make use of our unique features, such as label refinements, promotions and Linked Custom Search.

In addition to focusing on ranking, on-demand indexing, customizability, ease of use, language support and scalability, we've tried to serve your business needs too — AdSense for Search and Site Search are built on top of the Custom Search platform. These products offer you choice — you can share revenue with Google with topical ads or further control presentation and branding options with the use of XML. We've also developed APIs for our developers and partners.

We wanted to celebrate this week, not just with customized cake, but by treating you to something special. Website owners have always asked about more power and more customization of search results, so we're happy to introduce Custom Search Themes, Structured Custom Search and the Custom Search Wikipedia skin. You can read details about these new features right here on the Custom Search blog. And, starting today, you can follow us at our new Twitter account @googlecse.

Custom Search Themes — Now, with the ultra-configurable Element, you can pick from among a set of convenient layouts and slick styles for your search results. Themes enable well-designed interactive results that you can use instantly on your website and also offer maximum flexibility to further customize every aspect of results presentation. There's also a compact layout for a great mobile experience when using an Android-powered phone, iPhone, iPod Touch or Palm Pre. When you create a Custom Search engine, a mobile home page is automatically created for you.

Structured Custom Search — You know your website and data better than anyone. We already return Rich Snippet metadata attributes in XML results if you provide structured metadata through markup on your pages. Starting today, special attributes, such as Thumbnails and Actions, will be rendered in Custom Search results. More exciting, you can now restrict your search results by specific attributes, based on the metadata that you provide. Custom metadata attributes and custom query restricts will make your searches truly structured.

Wikipedia Custom Search Skin — If you use Wikipedia for research, the Custom Search Wikipedia skin provides highly contextual search results when you search within Wikipedia. You get Google search across all Wikipedia articles as well as topical results based on the links on the Wikipedia article you are currently reading. We think this makes for faster research.

Search is now an expected way to quickly find and navigate information, but there are still many millions of websites out there that don't even have a search box. We hope that these powerful Custom Search tools will help get high-quality search quickly enabled on these websites. After all, you can configure a Custom Search box for your website in minutes!

Posted by: Rajat Mukherjee, Group Product Manager and Nicholas Weininger, Software Engineer

[Gd] Plug-n-play with Custom Search Themes

| More

Google Custom Search: Plug-n-play with Custom Search Themes

Besides great results relevance, one of the most popular features of Custom Search is the ability for you to customize the look and feel of the results to match your website. Our users have always requested more control over results presentation. What's Custom Search without customization?

Today, we're launching Custom Search Themes, which make customized presentation a blast!

You can now select from among a set of slick styles that make the search results look awesome. If you love a style, but need to tweak it, you can customize it further by changing fonts, colors, backgrounds, promotion settings, as well as interactive features such as tabbing and mouseovers. The preview function shows you the effects of your changes instantaneously - WYSIWYG.

You can also select from among a set of convenient layouts for full flexibility on the location of the search box and results - contiguous or in 2 columns - you decide! We've even added a compact layout (with only 4 results) that is useful for websites where space is at a premium and search results will not occupy the whole page. Mobile Custom Search, launched last week, uses the compact layout for rendering results on high-end mobile devices e.g., Android phones, the iPhone, iPod touch and Palm Pre. We automatically create a Google-hosted home page for every Custom Search engine, so you can redirect mobile visitors to this page, since we automatically serve up mobile-optimized results.

There are several results hosting options. The most flexibility is offered by the Element, which renders results inline on a webpage -- your users can quickly review results, narrow results to specific categories with a simple tabbed interface, and dismiss results, all without leaving your webpage. We believe this will make it easier and faster for your website's users to find the information they are looking for. The Element now renders special structured data, e.g., Thumbnails and Actions, that you can provide via structured markup on the page.

With Themes, we're providing great look and feel options for your results out-of-the-box. If you want even more control, you can directly download and manipulate the Cascading Style Sheet (CSS) files that control results styling. You can also refer to the documentation on the AJAX Search API that the Element is built with. Remember - not all customization is pretty, so choose wisely!

We'd love to hear your feedback about Custom Search Themes. If you build out a great customized theme that you'd like to share with us and other Custom Search users, we'd love to see it.

Posted by: Radu Cornea, Software Engineer and John Skidgel, Senior Interaction Designer

[Gd] Structured Custom Search

| More

Google Custom Search: Structured Custom Search

Earlier this year, we announced support for Rich Snippets in Custom Search results. If you provide in-page metadata markup, via RDFa, Microformats, or PageMaps, the Custom Search platform extracts the metadata attributes and returns these as PageMaps in your XML results, so you can render these structured attributes in your search results.

Now, our metadata support just got a whole lot better!

Thumbnails and Actions

If you use the Custom Search Element, you can now add publisher-provided links to your search results based on specific metadata markup in your web pages. These special structured data objects, such as Thumbnails and Actions, are generated from the PageMaps you provide. For example, Scribd, one of our partners, provides both Thumbnails and Actions in PageMaps on their pages, so we display both of these in our sample Custom Search engine, as shown below. The Actions in this case are "Download" and "Fullscreen View", but each publisher can provide customized actions, which they can also style via CSS.

In the case of the above document, the PageMap markup for the Thumbnails and Actions is as follows:

<DataObject type="thumbnail">
<Attribute name="src" value=""/>
<Attribute name="width" value="100"/>
<Attribute name="height" value="130"/>

<DataObject type="action">
<Attribute name="label" value="Download"/>
<Attribute name="url" value=""/>
<Attribute name="class" value="download"/>

<DataObject type="action">
<Attribute name="label" value="Fullscreen View"/>
<Attribute name="url" value=""/>
<Attribute name="class" value="fullscreen"/>
If you markup your own pages, as shown above, the Element will render your Thumbnails and Actions in your own Custom Search engine.

Structured Search

The above example shows how easy it is for you to add valuable metadata to your pages for use in display in Custom Search results. So, in the sample engine that we used above, here's what the result looks like when you type the query [halloween]. We see a set of nicely formatted results that match the query.

Wouldn't it be nice to use these metadata attributes in your search? We think so too, so we've enabled a way for you to restrict your search results via use of a special operator. Let's say that we wanted to restrict the results to those results that were authored by a specific author, e.g., "lisamorton" (author of the second result above). We can easily do this by adding the following restriction in our search query: [halloween more:pagemap:document-author:lisamorton]. This gives us exactly what we want - documents authored by "lisamorton":

Let's break down the more:pagemap:document-author:lisamorton restriction. The more: operator is what we use for refinement labels. The pagemap: tells us to refine results by specific attributes in the indexed PageMaps. The document-author: qualifier tells us to look for the specific attribute of interest - the document DataObject in the PageMap with child attribute called author. This is followed by lisamorton, which is just the actual value that we are using for the restriction. You can use this open-ended syntax for querying the appropriate DataObjects in your own documents.

The PageMap that represents the document and author information in the markup of the above pages is as follows:

<DataObject type="document">
<Attribute name="title">The Five Scariest Traditional Halloween Stories</Attribute>
<Attribute name="author">lisamorton</Attribute>
You can provide hooks in your application to filter results by attributes that are important for your users, so users will not have to type these restriction qualifiers directly.

Rich Snippet Preview Tool

Check out the Rich Snippet preview tool. This tool allows you to view not only the Rich Snippets markup recognized for Google web search, but also the additional customized markup that we support in Custom Search. You can immediately see how your web page will be processed after indexing, and what metadata attributes will be returned in PageMaps in your Custom Search results. If there are any errors in your markup, you can fix them right away! Remember - you need to add the &view=cse parameter to this tool to review the additional metadata extracted by Custom Search.

Here's a screenshot from the tool for one of the above results, showing all the PageMap markup recognized by Custom Search:

Many customers have asked for additional structured capabilities, richer snippet presentation and filtering and drill-down capabilities in Custom Search. We'd love to hear feedback from you on these structured data features that offer you more power and flexibility to help users find what they are looking for on your site.

Posted by: Anthony Francis and David Gibson, Software Engineers

[Gd] A contextual search experience for Wikipedia

| More

Google Custom Search: A contextual search experience for Wikipedia

Wikipedia users can now configure a Custom Search skin to customize their Wikipedia search experience. Once configured, the skin helps you to search Wikipedia, and for contextually relevant articles, from any Wikipedia page. This can make it easier to find relevant information, especially on Wikipedia pages with many links, and where the topics you are researching are ambiguous. You can find instructions to configure the Custom Search skin at Wikipedia. It works with Wikipedia's Monobook and the Beta Vector skins, and should work on Wikipedia domains globally. Remember that you need a user account and must log in to Wikipedia to use it.

With the skin configured, if you are reading the Wikipedia page on NASA, and do a search for the query [mars], you are presented inline results organized into 3 tabbed groups: All Wikipedia pages, Linked Wikipedia pages, and Linked non-Wikipedia pages. The first tab shows all Wikipedia articles that match, including those about the candy (Mars Bars) and the television series (Veronica Mars). The next 2 tabs provide contextually relevant results that are linked from the NASA page, such as information about various Mars rovers, orbiters, and space labs, as shown in the screenshot.

Here's what's going on under the covers:

Linked Custom Search enables the creation of dynamic search experiences, where the content being searched can be defined on the fly, and can change over time as new information becomes relevant. The Custom Search skin creates a Linked Custom Search engine on demand for every Wikipedia page that you navigate to.

The results from the current Wikipedia domain, as well as the results from the per-page dynamic search engine, are presented inline in tabbed categories via the AJAX search API. You can refine results by the category of choice, and quickly review the results without having to open a new browser window or tab. This happens through the Javascript code in the skin. The skin's CSS defines the look and feel of the results.

As for the page-specific Linked Custom Search engine, it computes the contextual results within the Linked Wikipedia pages (on-domain) and Linked non-Wikipedia pages(off-domain) categories. These two tabs are technically very similar, so we'll just describe how one of them works.

Suppose you're visiting the NASA article and search for [mars]. The Linked Wikipedia tab sends the search query to Google Custom Search, along with a parameter that indicates that the search engine specification is at:

Google picks up this Linked CSE request and uses the above specification and the supplied query. You can simulate this process by visiting:

A different specification is generated for every Wikipedia page (based on url) by a tiny AppEngine application at The specification defines a search engine with two facets, labeled "internal" (Linked Wikipedia pages) and "external" (Linked non-Wikipedia pages). The list of "internal" (and "external") webpages to search over is provided by this line in the specification:

<Include href="" type="Annotations"/>

This causes Google to visit the webapp at a new URL ( Our webapp now collects links from the NASA article, classifies them as "internal" or "external", and returns the annotations in an XML format. You can see the result at

Now Google can finish building the Custom Search engine for the NASA article, and compute the results for [mars]. The results are returned to your web browser and displayed in the appropriate tab.

But wait! Our little AppEngine webapp doesn't have the CPU horsepower or bandwidth to scan Wikipedia pages on-demand or in nearly-real-time for thousands of Wikipedia users. Instead, the webapp asks Google to scan the page, via a Custom Search tool called makeannotations. The request looks something like this:

After makeannotations returns the list of links in the NASA article in XML, the webapp simply rewrites the XML according to the domain of each link.

Since we are creating the per-page search engines on demand, there can sometimes be a short delay in the creation of the search engine, e.g., for new or obscure pages. However, for popular Wikipedia pages, these definitions should be cached, and you should see no delays. In fact, we use a ping method to load up the Custom Search engine in advance before you search. Remember that if there are not many links on the Wikipedia page you are searching from, you may sometimes find no matches for linked pages.

We've open sourced the code for this application. Feel free to work with it. Feel free to extend the skin beyond Monobook and Vector. We built this skin with the help of Wikipedia, and hope that you will provide feedback on your experience. You can also provide your feedback directly to Wikipedia.

Posted by: Paul Komarek, Software Engineer and Jeffrey Scudder, Developer Programs Engineer

[Gd] Customize your results snippets with structured data

| More

Google Code Blog: Customize your results snippets with structured data

Custom Search themes make it easy for you to customize the look and feel of your search results pages. And if you want to take the customization gig further, you can also customize the result snippet—a small sample of content that gives search users an idea of what's in the webpage—by using structured data.

When you are reading a webpage that reviews a film, you can figure out what the title is, what reviewers thought of the film, and how they rated it. You can even search for stores with the best prices for the DVD. Structured data can convey the meaning of such key information to computers.

Structured data formats—such as microformats, RDFa, and PageMaps—are semantic markup that you add to your HTML page. Structured data make web content more meaningful to machines. These attributes do not change the formatting of your website, they just make the text enclosed within the XHTML tags "understandable" by computers and influence what shows up in the result snippets.

When you tag your webpages with structured data, Custom Search indexes them and sends the metadata back in the XML results for your page. You can then take this XML feed and transform it into HTML results that showcase key information—such as image thumbnails, summaries, dates, authorship, ratings, and prices. Having the most relevant information in your search results makes the webpages in your site more compelling to your users.

You can, for example, create the following kind of rich snippets:

You can even add thumbnails and actions that let your users download files or make purchases.

To learn more, read the Custom Search Developer's Guide.

By Kevin Griffin Lim, Custom Search Team

[Gd] Customize your search results page with themes

| More

Google Code Blog: Customize your search results page with themes

If you can select headgear for your LEGO ® action figures, your search engine should let you customize the theme for your search results page, right? Darn tooting!

True, Custom Search already lets you customize the look and feel of your search results page, but we're making it easier. You can now go to the control panel and select one of the predefined themes that broadly matches the look and feel of your website.

If the standard themes are not quite what you want, you can make further changes. You can tinker with the page layout (Why stick with a single column of results, when you can have two?) and play with the font colors and types. The standard themes paired with the "Compact" layout option are optimized for mobile devices, so they work well on iPhone, Android devices, and Pre.

If you want a greater level of control than that, you can download the CSS, tweak it in a text editor, and host the CSS in your website. You can make your search results page blend with the style of the rest of your website.

To learn more, read the Custom Search Developer's Guide.

By Kevin Gnome Lim, Custom Search Team

[Gd] Help us make the web better: An update on Rich Snippets

| More

Official Google Webmaster Central Blog: Help us make the web better: An update on Rich Snippets

Webmaster Level: All

In May this year we announced Rich Snippets which makes it possible to show structured data from your pages on Google's search results.

We're convinced that structured data makes the web better, and we've worked hard to expand Rich Snippets to more search results and collect your feedback along the way. If you have review or people/social networking content on your site, it's easier than ever to mark up your content using microformats or RDFa so that Google can better understand it to generate useful Rich Snippets. Here are a few helpful improvements on our end to enable you to mark up your content:

Testing tool. See what Google is able to extract, and preview how microformats or RDFa marked-up pages would look on Google search results. Test your URLs on the Rich Snippets Testing Tool.

Google Custom Search users can also use the Rich Snippets Testing Tool to test markup usable in their Custom Search engine.

Better documentation. We've extended our documentation to include a new section containing Tips & Tricks and Frequently Asked Questions. Here we have responded to common points of confusion and provided instructions on how to maximize the chances of getting Rich Snippets for your site.

Extended RDFa support. In addition to the Person RDFa format, we have added support for the corresponding fields from the FOAF and vCard vocabularies for all those of you who asked for it.

Videos. If you have videos on your page, you can now mark up your content to help Google find those videos.

As before, marking up your content does not guarantee that Rich Snippets will be shown for your site. We will continue to expand this feature gradually to ensure a great user experience whenever Rich Snippets are shown in search results.

Written by Kavi Goel, Pravir Gupta, and Othar Hansson