An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to

November 19, 2006

Secret Google JSON API

Google already offers feeds for Google News, Blog Search, Google Video, so you can use the search results in your applications or sites. There's also a Google API for web search that uses SOAP, but it's limited to 1000 queries per day.

For the first time, Google offers a new kind of API, unified for web search, image search, blog search and video search. The API uses JSON, so creating applications in JavaScript is easy. You must know that this API is unofficial, so the details can change.

Google JSON API is the foundation of SearchMash, an experimental site created by Google.

So how do you get the search results using this API? You just load this page:[query]. You just have to replace [query] with the actual query. If you use this format:[query]?i=11&n=10, you request 10 search results, starting with the result number 11. The formats for image search, blog search and video search are:[query][query][query]

The JSON object you get from Google has a list of members that are very easy to understand, like: estimatedCount (the number of search results) or results, which is an array that describes the search results. To make cross-domain requests, you may need to create a web proxy, like shown here.

This blog is not affiliated with Google.