Complete Guide to Google Ajax Search API Explained by Rohit Ghatol [email_address]
Why use Google Ajax Search API? <ul><ul><li>Allow user to search on your site </li></ul></ul><ul><ul><li>Allow user to get...
Getting Started <ul><ul><li>Get a Google Ajax Search API Key for your domain </li></ul></ul><ul><ul><li>Code for Categorie...
Get the Key from this  Page
Code for Categorized Search Result GSearchControl GwebSearch   div with id “searchcontrol ”
Code for Categorized Search Result <html> <head> <script src=&quot;../../api?file=uds.js&amp;v=1.0&quot; type=&quot;text/j...
Code for Categorized Search Result <script type=&quot;text/javascript&quot;> //<![CDATA[ function OnLoad() { // Create a s...
Upcoming SlideShare
Loading in...5
×

Complete Guide to Google Ajax Search API

1,381

Published on

Published in: Technology, News & Politics
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total Views
1,381
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Complete Guide to Google Ajax Search API

  1. 1. Complete Guide to Google Ajax Search API Explained by Rohit Ghatol [email_address]
  2. 2. Why use Google Ajax Search API? <ul><ul><li>Allow user to search on your site </li></ul></ul><ul><ul><li>Allow user to get categorized search results </li></ul></ul><ul><ul><li>Allow the search results to be restricted to a domian </li></ul></ul><ul><ul><li>Help user with recommended search key words </li></ul></ul><ul><ul><li>Show Video Bar, Book Bar, Blog bar and News Bar </li></ul></ul>
  3. 3. Getting Started <ul><ul><li>Get a Google Ajax Search API Key for your domain </li></ul></ul><ul><ul><li>Code for Categoried search results </li></ul></ul><ul><ul><li>Code for chaning look and feel and position of search results </li></ul></ul><ul><ul><li>Code for restricting Search results to a Domain </li></ul></ul><ul><ul><li>Code for adding Map Search, Video Search </li></ul></ul><ul><ul><li>How to use wizards for Book/Blog/Video/News Bar </li></ul></ul><ul><ul><li>How to setup a Custom Search Engine </li></ul></ul><ul><ul><li>Using the Custom Search Engine to refine search results </li></ul></ul>
  4. 4. Get the Key from this Page
  5. 5. Code for Categorized Search Result GSearchControl GwebSearch div with id “searchcontrol ”
  6. 6. Code for Categorized Search Result <html> <head> <script src=&quot;../../api?file=uds.js&amp;v=1.0&quot; type=&quot;text/javascript&quot;></script> <script type=&quot;text/javascript&quot;> //<![CDATA[ ...................... (see next slide) //]]> </script> </head> <body> <div id=&quot;searchcontrol&quot;>Loading</div> </body> </html>
  7. 7. Code for Categorized Search Result <script type=&quot;text/javascript&quot;> //<![CDATA[ function OnLoad() { // Create a search control var searchControl = new GSearchControl(); // Add in a full set of searchers var localSearch = new GlocalSearch(); searchControl.addSearcher(localSearch); searchControl.addSearcher(new GwebSearch()); searchControl.addSearcher(new GvideoSearch()); searchControl.addSearcher(new GblogSearch()); searchControl.addSearcher(new GnewsSearch()); searchControl.addSearcher(new GimageSearch()); searchControl.addSearcher(new GbookSearch()); // Set the Local Search center point localSearch.setCenterPoint(&quot;New York, NY&quot;); // tell the searcher to draw itself and tell it where to attach searchControl.draw(document.getElementById(&quot;searchcontrol&quot;)); // execute an inital search searchControl.execute(&quot;VW GTI&quot;); } GSearch.setOnLoadCallback(OnLoad); //]]> </script>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×