The Well-Formed Web

Exploring the limits of XML and HTTP

Google2Atom

Welcome to the Google2Atom web service. Just enter your search and your Google key below. Once you press "Search" you will get an Atom feed of the search results.

Google Key:


Note: The Google Key is no longer mandatory, if it's not supplied it will use my own key. In light of that please feel free to use my key for experimentation, but if you start making heavy use of this service please get your own Google API Key to avoid limiting others use of this service.

This is a REST based reformulation of the Google API. As such it uses query parameters in a GET based HTTP request to do the search. That is, it works just like the regular google web page, but this form returns a well-formed XML document instead of a web page. Why is this better?

Simplicity
It works just like the google web page, so it is conceptually easier to understand.
Composability
Since the request is just a simple GET the results of a query can be composed with other web services. For example, the results could be transformed using XSLT or fed into a validator.

Bonus Features

One feature found in this interface that is not found in the original Google API is the well-formedness of the results content. PyTidy is used to transform the HTML snippets from the Google API into well-formed XML and place those into 'content' elements with type='text/html' and mode='xml'.

Colophon

Google2Atom is written in Python and uses both the pyTidy and pyGoogle libraries.

2003-11-22 01:18 Comments (0)