Google Blogoscoped

Thursday, July 12, 2007

Yahoo Search Suggest Query Inspector
By Tony Ruscoe

As reported earlier, a “suggest” feature has been added to Yahoo’s home page. Being a curious developer, I wanted to know how Yahoo was pulling in these suggestions.

Using the LiveHTTPHeaders add-on for Firefox, I was able to easily find the address of the suggestion file used by Yahoo Search Suggest. Here it is using [google] as the sample query:

As expected, this file shows that Yahoo uses JSON to return suggestions to the browser. If we break down the URL, we can understand what the parameters mean:

With URLs like this, you can often change the output parameter to return a different output format. By trying a few simple alternatives, we are able to view 30 suggestions (which appears to be the default maximum) in the following common formats:

And also these two formats, which appear to be more specific to Yahoo:

What’s more interesting is that changing the output parameter to text gives you full access to a crude interface for something called “Query Inspector” which allows you to try some of the more advanced features of Yahoo Search Suggest.

A screenshot of the basic Query Inspector interface and a cache just in case the page disappears.

After playing with the results, I’m assuming some of the more advanced parameters can be used as follows:

Ever wanted to know what Yahoo would suggest as the top 1000 phrases containing the word “google"? Here’s your answer!

The six links provided beneath the form fields – Home, Queries, 5 Min Stats, Hourly Stats, Daily Stats and Help – all currently lead to Yahoo’s 404 page, but these were presumably there to view live traffic and statistics during development.

It’s unusual for a company to expose an interface like this. Competitors could potentially use it to gain an insight into how the suggestion algorithms work and developers could screenscrape the data to use it in their own applications. If Yahoo doesn’t mind people doing that, perhaps they’ll release this in future as one of their many web services.

Update: Yahoo have now removed the Query Inspector interface. Applying the output=text parameter now returns the same as output=fxjsonp. They’ve also restricted the number of suggestions returned to 10 and disabled some of the advanced parameters.


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


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