Loading...
Loading...

Friday, September 22, 2006

Google AJAX Search API in Blogger

The Google AJAX Search API has a number of well documented samples and solutions including the Video Search Solution and the Map Search Control Solution. Both of these solutions are great additions to a blog.

This morning, I modified a blogger template to include both of these solutions, as well as a core search solution. Fell free to take what I have done here and apply it to your blog, modifiy to meet your needs, etc. Just follow these instructions:

  1. Sign up for a Google Ajax Search API Key and capture the key. For my blog, I used a url of http://ajaxsearch.blogspot.com
  2. Download my modified template.
  3. Edit the &key= values in the template where the Google Maps API and Ajax Search API are loaded and replace with your API Key (your key will work for both APIs).
  4. Edit your blogger template, and replace or merge yours with mine. Note, mine is based on minima black.

Once you have got this going in your blog, you can do a few cool things:

  1. Its very easy to include a hyper link in a blog post that results in a search on the map. Just create a the hyperlink as a javascript url that calls doMapSearch('search-term');. e.g., if you look at the resulting <a> element, in "Edit HTML" mode, it will look something like this: <a href="javascript:doMapSearch'sakana');">Sakana</a>. Here is an example: Sakana
  2. Embedding core center column search is just like map searching only the function is doCoreSearch(); Here is an example: Google
  3. Embedding video search links is just like map searching only the function is doVideoSearch(); Here is an example: Jimi Hendrix

Play around with this and let me know what you think.

p.s. - If you are a TypePad user, check out http://ajaxsearch.typepad.com

67 Comments:

  1. Blogger abovo99 said...

    The information you posted are really helpful. Thanks for doing this. Congratulation for blog of notes.

    The Bodytalk

  2. Anonymous Anonymous said...
  3. Anonymous Anonymous said...

    I am sorry sir, I tried many times but failed. According to your code your applied, I made no change in my blog. I dont know why. And then I tried following the code Google gave when I signed up for a Google AJAX Search API key. And failed again. So sad.

  4. Anonymous Anonymous said...

    Dear sir, I tried to explain my trouble here in my blog. It would be very thankful for you to take a look. I manage to make it work in the Page Elements page but not in my index page.

    The post is here with captured images.

    http://gker.blogspot.com/2006/09/something-wrongmistake-with-google-ajax.html

  5. Anonymous Anonymous said...

    hi mark...thanks for the info but i am having trouble with step 3. &key(?)...will continue trying to troubleshoot on my own...btw...i think i saw oasa's sketch on the wall at the post office

  6. Anonymous Anonymous said...

    The wireframes/layout tool in blogger beta has difficulty with entering the code for this. Might have to write a widget for it...

  7. Anonymous Anonymous said...

    Please take a look at:
    http://searchmashups.blogspot.com/

    This is a similar blog, but based on the new blogger beta style templates.

    The key, and the url of your blog must match for key validation to succeed.

    The layout editor will have problems with this code. it will only partially render.

  8. Great and interesting technology.

  9. Anonymous Anonymous said...

    A new interesting feature coming from google, still in an early beta stage though but it might become something promising in the future.

  10. Blogger YouthPlay Staff said...

    If you're interested in this stuff, then you will WOWED! by the stuff at my website. In all honesty it won't make your website look any better, but it will give you plenty of brainpower for content. Most of you don't appear to be doing too well on the technical side of the house.

  11. Blogger David said...

    Worked like a charm. Is there a feature so that visitors can directly add hot spots on the map? (after a search)

    Thanks

  12. Anonymous Anonymous said...

    Yes, Ajax is very cool and all BUT leave this blog open in a tab for awhile and it slows my browser to a crawl.

    I've noticed the same problem with other sites that also use Ajax so I don't see it as being viable until the performance issues have been dealt with.

    Sorry, I wish I had something more positive to say but...

  13. Blogger Meras said...

    Hi Mark,
    Intersting information maybe I'll try that

  14. Anonymous Anonymous said...

    siactually,i meet the same problems as oaso.
    hope someone can help us find the reason.

  15. Blogger andra said...

    This comment has been removed by a blog administrator.

  16. Blogger Gabriel Villa said...

    Great help! and great blog you have.
    The map was OK, but the blogger header was messed-up. (only in Explorer). If you could please help me out, it would be apreciated.
    Thanks!
    Gabriel
    www.donttalkaboutlife.blogspot.com
    gabriel.villa [at] gmail.com

  17. Anonymous Anonymous said...

    Funny you should ad the Apple movies when in fact, Google's Blogger is flat out broke when it comes to using it with a MAC. It's incompatible with the Safari Browser, and hit and miss with Firefox; you get template corruption when switching between compose and html publishing modes.

  18. Blogger Chuck Peters said...

    Mark,

    I worked until my eyes were bleeding trying to get the map search java to function.

    Guess what? You have syntax error in the example you posted. Look at it closely and you will see it.

    Haha, you got me good.

  19. Anonymous Anonymous said...

    Have you noticed, Mark, that the Google Maps are messed up for the location provided on your blog? The streetmap overlay does not match up with the geographical underpinning. You may want to ask the Google Map guys (and gals) to check into this.

    52tease

  20. Anonymous Anonymous said...

    i tried hard to put the video in my blog in blogger beta but it didn't work. May be the code in the example is wrong...

  21. Blogger Chuck Peters said...

    The code works, here is another example: http://stratsdot.blogspot.com

  22. Anonymous Anonymous said...

    yuyuy

  23. Anonymous Anonymous said...

    I was trying to search videos by using the keyword "intelligence" and it failed to load any videos?
    I was able to get results with other words.
    Am I missing anything?

  24. Anonymous Anonymous said...

    nice

  25. Anonymous Anonymous said...

    i have set up a blog, but gave a google email and now would like to change this to another gmail.com email. (always mine)
    can you help?
    thank you

  26. Blogger OzzyGimenez said...

    Wow,great blog,thanx for the info and greetings from Spain

  27. Anonymous Anonymous said...

    The Search API is very promising in the context of AJAX. But I am at a loss as to how to monetize this.
    Ideally, the click ads would be provided as an RSS feed to a search query. This would offer Google the opportunity to expand their 'network' and at the same time offer the customer a chance to monetize the feature.

  28. Anonymous Anonymous said...

    You can find a widgetized version of the AJAX Map Search for Wordpress here

  29. Anonymous Anonymous said...

    JSON/AJAX based Youtube player. You can add it on your Google home or webpage.
    Link

    http://padmanijain.googlepages.com/myexperiment1.html

  30. Blogger TruCoat Painters said...

    proactive solution

    Buy Proactiv Solution here and get 50% off.

  31. Blogger Unknown said...

    Heres a usefull Google Map Application:

    InstantLocalSex

    Well, its rather a naughty (but clean) map, and when one takes note of Google's top searches (http://top-searches.klikhir.com) it is obvious that most of us need this map - especially when traveling alone. Ever noticed when you travel how the yellow pages (in your hotel room) 'Adult Personals' section is always worn out?

    The beauty of searching for local adult personals on www.instantlocalsex.com is that if you don't know the city you are visiting you can plan your entertainment based on your current (Hotel) location. If you had picked up the yellow pages you would have had to call all over the place and figure whether your 'choices' are in proximity to each other. This map solves that problem so you can instantly locate services relative to your location.

  32. Blogger Gürkan Turhan said...

    Search API should be much more basic

  33. Blogger G@bry said...

    prova

  34. Blogger Sphelkazter said...

    Hi. We had a problem regarding the key... I posted in the forum and listed there the steps that I had... please have time to look at it. Thank you very much!!
    Link: http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/c9cd2f5ad5e480bc#

    Regards,
    sphelkazter

  35. Blogger Patty said...

    I'd love it if you could make a post on the SUPER SIMPLE way to use the API to add a plain old boring search your own website tool...
    Like how w the old SOAP API you could limit the search to your own URL and then display the results in your site....

  36. Anonymous Anonymous said...

    These comments have been invaluable to me as is this whole site. I thank you for your comment.

  37. Blogger mercuranium said...

    I cant seem to show it on my blog. =( I'm using e new blogger template, would that be a problem?
    Pls advise, thanks!

  38. Blogger Surfparadise said...

    Hi,
    I have a problem.... I don't know how to insert my ajax code google search in blogger..... Can you help me?...please....

    This is my template: surf80.110mb.com/itheme_3_col.rtf

    This is my ajax search: http://surf80.110mb.com/search%20box.html

    Where I must put the ajax javascript?....and the body section.... I don't know how can integrate this powerful script on my blog.... please help me!
    Blogger draft widget, doesn't work fine for me...like you can see on the test site...

    Thankyou very much in avance
    Surfparadise

  39. Anonymous Anonymous said...

    Hi,

    This article is good and informative.

    Software Development Company

    Free Directory

    Software Jobs India

  40. Blogger . said...

    very veryyy gook.thanx by Türkçe facebook
    thanx by burs
    and 2008 kpss sonuçları

  41. Anonymous Anonymous said...

    I'm new in the business and I have found here what I've been searching. I'd like to implement the google search, but I'm stuck. I'll appreciate any help from you

  42. Anonymous Anonymous said...

    very goodd

  43. Anonymous Anonymous said...
  44. Anonymous Anonymous said...

    Thanks so much, keep the useful information coming!!

  45. Anonymous Anonymous said...

    thx for info

  46. Anonymous Anonymous said...

    very much

  47. Anonymous Anonymous said...

    MSN and Google to place some emphasis of helping move standards forward in collaboration.

  48. Anonymous Anonymous said...

    For assistant you can go to forum and blogs. now a days information is so fast.

  49. Anonymous Anonymous said...

    Very nice and thought provoking article! ‘Group on a Balcony’ is my favourite painting of Goya by the way :) Not so gruesome, but very sharp.

  50. Anonymous Anonymous said...

    Thanks so much, keep the useful information coming!!

  51. Anonymous Anonymous said...

    That's great news... thanks for detailed information...

  52. Anonymous Yusup said...

    Hai, i'm Yusup from indonesia. That's great information for me. I'll try to my blog.

    http://duniacopypaste.blogspot.com

  53. Anonymous Embedded Training said...

    Nice solution by Google... Keep it up!!!

  54. Anonymous travesti said...

    Great and interesting technology.

  55. Anonymous Shakira said...

    thanks for information and tips :)
    happy blogging
    www.uniquelog.info

  56. Blogger rald said...

    i cant put the Video Search Control on my blog ,can you give me some video or any pattern to do that.thanks.

  57. Good POstings.

  58. Anonymous Sites Help said...

    Very Impressive....!
    I just visited a websites which provide support to Google Sites user the is i think Sites Help okay... Is it used Ajax for its funtionality???

  59. Blogger Davenz said...

    Very interesting article...

    Regards
    custom furnitures

  60. Blogger zXc said...

    This comment has been removed by the author.

  61. Blogger Tmd rehabilitasyon said...

    Kadın elbise modelleri dedik ne güzel 1000 + hit yapıyordu o da son zamanlarda 500'lere doğru kaydı, mobilya dekorasyon sitesi açtık tam tuttu, parayı kırdık kırıcağız dedik...

    Yine adsense banı aldı gitti patladı site... Fikirli - fikirsiz iş yapıyoruz heralde ...

    Google adsense hakkında bilgi topluyoruz ve sayfa to oranlarımız %5'lere dayandı . İyi sonuçlar aldık . Tema işe yaradı .
    Kpss 2012 sitemiz çok iyi gidiyor. Bu site iyi değil aslında 100 hit çakıldı. Sabite bağlandı.  kpss 2012 sınav tarihi
    de yanlış olabilir (korkmayın)


    tarihin arka odası sitemizi n'oldu ben de bilmiyorum takip etmiyoruz, zaten bir beklentimizde yok o siteden.

    Son olarak koxp sitesinden birşey beklemiyorum. ne hali varsa görsün. 0.01 cent tık başı veriyor.

  62. Blogger iWEB TECHNOLOGIES said...

    Your blog is Great..@@
    Web Development Company in India

  63. Blogger Unknown said...

    Your thinking toward the respective issue is awesome also the idea behind the blog is very interesting which would bring a new evolution in respective field. Thanks for sharing.browse around here school branding uk

  64. Blogger Dhananjay said...
  65. Blogger Norman Jade said...

    It's such an amazing information, thanks a lot for sharing kind of information. Your blog on ajax gives the best and the most interesting information. Thanks a ton once again

  66. Blogger Unknown said...

Post a Comment

<< Home