Google Blogoscoped

Forum

Google Ajax Search API  (View post)

Ken Kuhl [PersonRank 7]

Friday, June 2, 2006
15 years ago11,462 views

This looks really cool! Integration with AdSense would be even cooler! ;-)

Sam Davyson [PersonRank 10]

15 years ago #

That is an amazingly neat search across web/blogs/video. A look at how the main Google site will act in the future?

OREO [PersonRank 10]

15 years ago #

A definitie look at Gogole's future! We are in the AJAX era.

Ramibotros [PersonRank 10]

15 years ago #

This tool would come really useful to google users if it was integrated into gmail. It would be very nice if when reading an email, one could search for a word or when composing one could compose an embedded google result.

Elias KAI [PersonRank 10]

15 years ago #

It is an added value for Google and I think they will offer it to Webmasters in order to reach the Maximum integrated space on each website.

iZeitgeist [PersonRank 10]

15 years ago #

From the Google AJAX Search API FAQ:

4. It looks like the AJAX Search API is in "Version 0.1." What does that mean?

The AJAX Search API is currently an experiment designed to get developer feedback, and may change dramatically over the next several months, so you shouldn't deploy this on your mission-critical website just yet. When we do formally launch Version 1.0, it will likely require code changes to your site, and will also likely contain advertising.

8. Does the AJAX Search API contain advertising?

The current, experimental version of the AJAX Search API does not contain advertising, but Version 1.0 of the API will likely contain advertising results in addition to normal search results.

iZeitgeist [PersonRank 10]

15 years ago #

Version 0.1 already looks great to me, would be interessting to see how v1.0 will look like :-)

dpneal [PersonRank 10]

15 years ago #

Do you think Google's Related Links should be combined into this? It's quite similar, and i don't like having lots and lots of different services/products. I think it can confuse people. (Absolutely love this product by the way!)

Justin Pfister [PersonRank 10]

15 years ago #

can somone post an example?.. I'm at work and can access my webserver.

Michael White [PersonRank 1]

15 years ago #

it would be even nicer if the results updated as the user types...

Niraj Sanghvi [PersonRank 10]

15 years ago #

Michael, that won't happen at least until they resolve this lawsuit: http://blogoscoped.com/archive/2006-05-17-n26.html

Chris Riley [PersonRank 3]

15 years ago #

Its not bad, but you can't tab from the input box to the search button. It just tabs to the top web result instead.

Quite often instead of hitting "enter" I'd hit "tab > space" (I like to see the button being pressed!) Its changing the way a Google search box behaves in a browser, and I'm not sure it should do that.

Otherwise I really like it, I'm a fan of all things AJAX, and this is the logical next step.

dpneal [PersonRank 10]

15 years ago #

Micheal I think that would look ok if there was only one set of results to update, but since they are many (web/video/blog etc) it may not work as good.

Rob Adams [PersonRank 0]

15 years ago #

How many listings do we think will be shown? This could lead to an even more overwhelming need to be at the top in a SERP.

Sam Davyson [PersonRank 10]

15 years ago #

Good point. Result number 4 may no longer be any good.

markl [PersonRank 1]

15 years ago #

sorry for lurking...

On the tab order think, I will look into this. Might be a little more dificult than it appears. If you look REALLY closely, you will notice that the search control's images are all done using image replacement. So that "button" is really a background image on an adjecent div. Why? So that when you plunk this into your site, if you don't want that button, its a simple css override to use one of your own buttons. All of the graphic elements, color scheme, etc. are done this way so that with a very small amount of skill, this think can look right for you, your site, and your visitors.

How many listings: Right now, its 4 or 8. Its under your control from both a UI perspective and from an API perspective. Notice in this sample:

http://www.google.com/uds/samples/places/index.html

Local results are limited to 4, with no ability to grow/shrink, while web results are placed on the other side of the map, always open, but with the ability to grow from 4 to 8? This is all under easy control of whoever is integrating the control on to your site. Its VERY VERY easy. There are tons of samples and documentation to help you.

Also, some of you were looking for search while you type. Try the sample above. It's using a hybrid mode of the control where part of the control updates as you type and it detects "idle", while the local search side is driven of hitting "enter" or clicking on the "button".

And as for version 0.1 vs. 1.0... If enough people like the API as is, we are done. What we are really trying to do here is get feedback from you on what you do and don't like. This is a real beta program where we want to hear what you have to say and where we will address as many issues with the design and interface that we can.

Philipp Lenssen [PersonRank 10]

15 years ago #

Hmmm, this is on the Digg frontpage now. I was quite surprised.

dpneal [PersonRank 10]

15 years ago #

What does UDS stand for????

Philipp Lenssen [PersonRank 10]

15 years ago #

Usage Documentation Samples? Just my guess :D

Mary [PersonRank 0]

15 years ago #

Hi!

Right now my hello world sample + callback handler is putting the video html into a DIV called saved_results. I'd like to put it into a text form field.

Any help?

   function OnLoad() {
   // Create a search control
   var searchControl = new GSearchControl();

   // Add in a full set of searchers
   var localSearch = new GlocalSearch();
   searchControl.addSearcher(new GvideoSearch());
   // Set the Local Search center point
   // localSearch.setCenterPoint("Atlanta, GA");

   // establish a keep callback
   searchControl.setOnKeepCallback(this, MyKeepHandler);

   // tell the searcher to draw itself and tell it where to attach
   searchControl.draw(document.getElementById("searchcontrol"));

   // execute an inital search
   searchControl.execute("Bloc Party");
   }

//mary
   function MyKeepHandler(result) {

   // clone the result html node
   var node = result.html.cloneNode(true);

   // attach it
   var savedResults = document.getElementById("saved_results");
   savedResults.appendChild(node);
   }
//maryend

Mary [PersonRank 0]

15 years ago #

Sorry, I don't mean to double post but I forgot to mention I want the video URL in a form field, not the full video HTML snippeted.

markl [PersonRank 1]

15 years ago #

Mary,

You need to look at the docs a little closer. When your MyKeepHandler is called you are passed a Javascript Result Object.

The first thing you need to do is look at the .GsearchResultClass property and if its a GvideoSearch.RESULT_CLASS then do whatever you want for video results:

if (result.GsearchResultClass == GvideoSearch.RESULT_CLASS) {
   // got a video result
}

Once you are in that block of code below, do whatever makes sense. You are handed the .html property which you already know how to clone and attach, BUT look at what else we gave you:

.title
.titleNoFormatting
.content
.url <-- this is probably what you are looking for
...
.tbUrl

The .html property is a pre-built html micro format styled search result. Easiest thing to do of course is attach it wherever you like and then use CSS to delectivly disable the display of certain pieces.

Look at the MyFavoritePlaces V2 sample to get a feel for how to use CSS to style the search results.

We will be writing more docs on exactly this topic as well as the extensive styling thats possible with the control itself.

Good luck.
http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GvideoResult

Mary [PersonRank 0]

15 years ago #

Thanks for trying to help, but I don't understand DOM and Javascript very well. I kind of understand what I need to do, but I don't understand how to access the GvideoResult() URL.

Mary [PersonRank 0]

15 years ago #

Just a followup, mhl answered this question for us here:
http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/6d2d241aec58b250/

Thanks again.

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!