Home > Google, PHP > Google search result in XML format

Google search result in XML format

March 17th, 2007 Leave a comment Go to comments

Many people would love to have feeds on Google search results, like they do on Google news or Google blog search. You can do many thing with this, for example you can build Google search like in your website or blog.

But Google doesn’t show any interest on giving away this feature. Instead they gave us Ajax search API which of course has limitation in number of queries.

It’s just a matter of time until somebody finally hacked this out. All you need is three additional parameters in your query:

here is the example. And you can see the demo how to use this feeds on you website here. You can also grab the source code here.

This hack is basically derived from previous hack on Google Toolbar which is an extension in Firefox. Someone has figured out the algorithm to generate checksum by looking at the source, and all you have to do is to add output=xml to get the results in xml format.

I have to warn you though, this hack may conflict with Google Term of Services, but it’s still interesting enough to know it.

Categories: Google, PHP Tags:
  1. March 17th, 2007 at 14:52 | #1

    Makasih infonya, tapi ngeri juga mau pake kalo misalnya berbenturan ama TOS-nya.

  2. October 23rd, 2008 at 16:15 | #2

    This is not working anymore. Any other suggestions??

    Freddie

  3. January 10th, 2009 at 06:39 | #3

    Here is a web service that provides RSS results for Google Search

    http://www.ecubicle.net/gsearch_rss.asmx

    Since the returned XML is RSS 2.0 compliant, the web service can also be called in a feed reader like this:

    http://www.ecubicle.net/gsearch_rss.asmx/GetSearchResults?searchPage=0&gQuery=tutorial+asp+net&numOfResults=15

    You need to change the searchPage, gQuery and numOfResults querystring parameters to your choice. gQuery parameter accepts all standard Google Search Operators.