Google Blogoscoped

Thursday, May 11, 2006

How to Use Google Co-op

What is Google Co-op?

Of all the announcements on yesterday's press day, Google Co-op seemed to be the most blurred; the webcast was too small to make out details, the Co-op URL didn't work in the beginning, and after it started working, the actual Google search results support didn't work everywhere. Today, however, things work. So what is Co-op exactly? You can compare it to a multitude of things:

What the user sees

Let's start with what the user sees, because the developer (or "contributor") side is definitely not casual tagging. There are three different variants of how Co-op appears in the Google search results at the moment; search refinements on top of results, subscribed links on top of results, and labels below result snippets.

When you've entered your query into, you'll see search refinements for subscribed "feeds" in the results (by default, you're subscribed to the Health topic – other defaults may be added when they become popular subscriptions). I've entered flu and this triggers a Health match:

What you're seeing are search refinements on top (that's the Co-op part), followed by a Google "onebox" results for Google News, followed by the actual organic top result. To the right side, as usual, there's a bunch of AdWords. Now from the existing search refinements – like treatment, symptoms, or for patients – I'm clicking "treatment". This results in another search, this one with the "more:condition_treatment" operator (the operator, even though exposed in the interface, seems too complex-looking for most users; I can't imagine memorizing lots of those):

As you can see, the "organic" top result changed to the e-Medicine site. I'm putting "organic" in quotes because the result is now slightly moderated by the Health community who helped label health-related pages. The e-Medicine site (or pages within that domain) have been labeled with "condition_treatment", "condition_symptoms", and "tests_diagnosis". You can see a portion of the labels listed below the results snippet, and it's these labels that convince Google to make the site rank higher for the chosen refinement.

Also part of Co-op, you will see a "Subscribed links" box for subscriptions on related searches. Here I'm searching for (Windows) Vista, and as I'm subscribed to the Digg "feed" provider, I'm seeing a Digg box on top of the results – and this is probably what's most interesting to webmasters and bloggers, because it's a free way to promote their pages (that is, once you got people to subscribe to your "feed", or make it such a popular subscription that Google adds it as default):

From within the Digg subscribed links box, you can jump straight to specific pages on or click on the title to perform a search for the keyword on Digg.

You can subscribe to any number of additional providers with the help of the Google Co-op directory. However, the directory only shows a number of popular sources (right now, seemingly those who partnered with Google prior to the launch of Co-op). You also have the chance to subscribe to any other provider who points you to their profile page, like Enoch Choi's. Then, the labels of this specific researcher/ expert are added to your search results.

How developers can make this work

Google on their Co-op homepage calls the people who are supposed to provide content for Co-op search results "contributors." I suppose that's meant to be somewhere between users and developers; nothing casual, but no rocket science either. (To get the full Co-op spectrum to work, you need to know about the annotation system, how to create the XMLs, how to use regular expressions to match URLs, and how to distinguish "topics", "contexts", "labels", "annotations" and "facets".)

Let's start with a practical example. I want to add one of those green subscribed links boxes for Google Blogoscoped when you search on Google-specific keywords. To do so, I have to write a little XML for the "Google Subscribed Links API" – I want to trigger my box on a search for google, and I call the file "google.xml":

<?xml version="1.0" encoding="iso-8859-1" ?>

  <ResultSpec id="GoogleMatch">


    <Output name="title">Google Blogoscoped</Output>
    <Output name="more_url"></Output>
    <Output name="text1">Come visit this blog for Google-related infos</Output>
    <Output name="text2">You can also discuss any question in the forum</Output>



Now I'm uploading the file to my server at, and subscribe to this feed via Google's subscription management page. Note that you need to wait some minutes after this step before Google crawled your XML, and integrated this into Google results. And here's what you now get when searching for google on (at least when you're signed in to your Google Account):

So did I just sneak in a free AdWords for the competitive "google" keyword? Well, yeah, but only for those who previously subscribed to my feed, either by finding it on my blog or in the Google Co-op directory (where it will likely only enter when it's popular already). What you really want to do is make the onebox be actually useful. So let's do something a little cooler – let's do a onebox that outputs info on top members of the Google Blogoscoped forum. To do that, I will create a PHP5 file that connects to my database, and then outputs the info in XML form. The XML at looks like this, with a DataObject connected to the Response:

<?xml version="1.0" encoding="iso-8859-1" ?>

<ResultSpec id="MemberMatch1">
  <Query>member [Member]</Query>
    <Output name="title">Member info for [0.fullname]</Output>

    <Output name="more_url"></Output>
    <Output name="text1">[0.fullname] joined on [0.joined_date]</Output>
    <Output name="text2">First comment: "[0.comment]..."</Output>


<DataObject id="Member1" type="Member">
  <QueryName value="carlbanks"/>
  <Attribute name="fullname" value="CarLBanks"/>
  <Attribute name="joined_date" value="2004-06-02"/>
  <Attribute name="comment" value="Gmail isn't creepy. The guy is mainly being parano"/>

... more DataObjects ...


While Google seems to have stopped caring about XML DTDs, you can still check your XML for well-formedness by e.g. dropping it into Firefox (of course, all tags must be closed, IDs are unique, and XML is case-sensitive). Unfortunately, when you screwed up with something else than well-formedness in your XML file you won't notice it until you see a red "Error" in your crawler status table – without any explanation of what's wrong (and you'll have to wait another couple of minutes before your update is crawled).

And here's the result of our work:

Labeling pages

As a developer, you can also label pages. I suppose this helps Google rank them in certain Co-op contexts. My specific URL match is going to be "*" (the wild card character at the end means that any page here is relevant to this topic). I'm calling my XML file "google-annotations.xml" and enter the following:

<Annotations file="google-annotations.xml">

  <Annotation about="*">

    <Label name="blog"/>



Note that the file attribute on top of the XML must exactly match the file name. I did not use the label "google" as Google says this isn't necessary – "google" is already contained in pages of Google Blogoscoped, so I'm rather providing structural information with a word that may not be on every page (Google Blogoscoped is a blog, but that's not necessarily clear from analyzing the keywords). Another label, for example, would be "for_educators". Additional to creating topics, you can also create search refinements.


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!