Google Co-op has been around a little while but Google has just released in its full glory Google Custom Search engines(Site|Blog) for a full review on its features try Matt Cutts blog What I’m particularly interested in is the search api allowing results to be shown directly on your site as briefly explained here on Google ajax search blog they also have a couple of examples but they are long winded so I thought I would do the1 minute run through so here goes.
- If you haven’t already get a Google Ajax search API
- Sign up for Custom Search engine
- complete both registrations and you now have a search engine and an API key
- Google Ajax search API give you a get started script and we will use that to add your search engine.
- Find the following piece of code within the script
searchControl.addSearcher(new GwebSearch());
This is what calls a normal web search now on a new line add the following code
var siteSearch = new GwebSearch();
siteSearch.setSiteRestriction(”CX“);
searchControl.addSearcher(siteSearch);The bold CX in the above code is where you put your unique CX code for example the Venture Skills code is 018314970598463061220:mkie-g1xuv8 yours will be different.
- Thats it no really thats all there is to it view your web page.
Make sure the page sits within the directory or sub directory you hold a key for
To see this in action check out this example which is just the above code or as you would see it if you have followed the above here, note your search engine is the second one down.
There is loads more you can do check out the API docs for more ideas, or visit zooie’s blog for some more general coop hacks.
Related or useful posts
If you are working on a test machine this quick tip on getting API keys may be helpful
Adding open search to your site for auto discovery of your custom search engine
Other Articles on the Venture Skills Network about Google Custom Search
Open Search and Google Custom Search Engine - Using the two
Google Custom Search Engine & Ajax a winning combo? - Our advance Implementation
Like what you see try these articles on the Venture Skills Network
What’s the future for Google Hosted Applications - Is the future Bright?
Firefox 2.0 experience and Extension round up - Why I’m an extension junkie
Skype vs the World - Is Skype scalable?

Subscribe to our Odiogo Audio Feed



October 27, 2006 at 7:51 am
This integration tutor may be helpful . Thanx
iNvaderX
http://www.theinvader.co.nr
November 14, 2006 at 3:20 pm
[...] Like what you see try these articles on the Venture Skills Network Information mining the social way - Using del.icio.us to mine your competitors Google Custom Search Engine - Using Ajax Search with the new CSE [...]
November 16, 2006 at 4:27 pm
[...] Some other Articles on the Venture Skills Network about Google Google Apps for your Domain Part 1 - Mail What’s the future for Google Apps for your Domain - A wish List Open Search and Google Custom Search - How TO Google Custom Search Engine - Using Ajax Search with the new CSE [...]
November 30, 2006 at 4:53 pm
[...] Like what you see try these articles on the Venture Skills Network Google Custom Search Engine - Using Ajax Search with the new CSE Information mining the social way - Using del.icio.us to mine your competitors What’s the future for Google Apps for your Domain - A wish List [...]
December 1, 2006 at 10:53 pm
[...] Like what you see try these articles on the Venture Skills Network Google Custom Search Engine - Using Ajax Search with the new CSE Information mining the social way - Using del.icio.us to mine your competitors What’s the future for Google Apps for your Domain - A wish List [...]
April 25, 2007 at 7:37 pm
Try google custom search hosting below