tags:

views:

72

answers:

4

Is there any way to add google search results into your site such that the results appear under your domain (and the page doesn't get redirected to google.com)? I know about google cse but this is not a free solution. Is paying for CSE the only way? Thanks.

+5  A: 

Use the Google AJAX Search API (my emphasis):

The Google AJAX Search API lets you put Google Search in your web pages with JavaScript. You can embed a simple, dynamic search box and display search results in your own web pages or use the results in innovative, programmatic ways.

You just need JavaScript - nothing server-side.

Vinay Sajip
is there a way to do this so that it is not AJAX? i.e. standard form POST, refresh page, and get results?
es11
Well, you can POST the data to a page which will have JavaScript which calls AJAX to update the returned page. What does it matter if that page uses AJAX? The user will see a new page of search results, regardless.
Vinay Sajip
well the page would already have content..so if it didn't post to a new page, I would have to clear the content so that the google results are all that is displayed on the page
es11
also I figured that if the overall flow of my website is not ajax driven, it would be more natural to simply load a new search result page
es11
A: 

What about this? http://code.google.com/apis/ajaxsearch/web.html And there should be even API for PHP etc.

martin.malek
+1  A: 

I've never used this but if you're into python check out Python Library for Google Search from Peteris Krumins’ blog.

A: 

You could use Google Search API.

You could also query Google search engine through a Web Service. Here's the WSDL and here's the FAQ. But I think this will be discontinued in favor of the first suggestion I gave.

Pablo Santa Cruz