Updated Local Search Control used in brand new GoogleBar

March 17, 2009

A much requested feature, the Local Search Control now includes ads when a search is performed. Users will benefit from seeing targeted and relevant sponsored results, and you can benefit by sharing in the revenue of including these results on your site. Ads aren't the only thing that's new - there's also a new (and, we hope you agree, better) UI:



This new Local Search Control has been used in a brand new version of the GoogleBar (part of the Maps API). In almost all cases, the GoogleBar provides the ideal way to add searches to Google Maps. The GoogleBar, too, includes advertisements with the results. In order to share in the revenue, you need to supply your AdSense publisher ID. You can use your existing ID or sign up for a new AdSense account. Once you have an account, get your AdSense publisher ID and include it as an option when you set up the GoogleBar:


<script src="/jsapi?key=YOUR_KEY_HERE" type="text/javascript"></script>
<script type="text/javascript">
google.load("maps", "2");
var opts = {

googleBarOptions : {
style : 'new', // This tag is necessary for the first few weeks until the new UI becomes default
adsOptions : {
client : #### // Your Google AdSense publisher ID
}
}
}
map = new GMap2(document.getElementById("map"), opts);
map.setCenter(new GLatLng(33.956461,-118.396225), 13);
map.enableGoogleBar();
</script>


Optionally, you may also specify an AdSense for Search channel (more info on channels), the Ad Safety Level to associate with your advertising, and the language in which to display results. For a full list of options and details on including them, see the GoogleBar documentation. Note: currently ads only appear for results that are inline - this limitation should be removed within a few weeks.


If you'd like to learn more about the new underlying, low-level Local Search Control, the reference documentation and Code Playground examples contain everything you need to know.

For more information, see this recent post on the Maps API blog. Questions or comments? Please visit the AJAX API and Maps API discussion groups.

Experimental Features

March 5, 2009

As part of Tuesday's Google Code Labs announcement, the AJAX Search API became part of the graduating class. We're still working with our lawyerly team members to update our Terms of Use to include a 3-year deprecation policy. If you're curious what that policy will look like, take a look at Section 4.5 of the Visualization API terms -- it will be similar to that.

You'll see that an exception to the deprecation policy will be features marked "experimental." This label is for experimental features that the deprecation policy does not apply to and therefore they can be changed or removed in the future, even if the deprecation policy applies to the rest of the API. You may have seen in the AJAX Search API reference that we have a few such features already, so we wanted to make sure you knew which ones those were.

The current experimental features include all of Book Search and the "image type" restriction of Image Search. We've done our best to clearly mark all of these as experimental in the docs.

As always, please let us know if you have any questions or comments.

Google Code Labs and the SOAP Search API

March 3, 2009

As recently announced, a new program was introduced today for Google Code Labs. We're proud that the AJAX Search API has already graduated from Labs, which demonstrates our long-term commitment to it.

Also part of that announcement was that the SOAP Search API will be retired on August 31st, 2009. It was deprecated in 2006, when we stopped accepting new developers for the API. Since then, it's been steadily declining in usage and we believe the majority of use cases are sufficiently handled by the more comprehensive AJAX Search API.

In many ways, this AJAX API is a superset of the SOAP API, providing access to local, news, image, and video search results, among others, in addition to web search. Therefore, we encourage SOAP developers to explore our documentation and consider migrating their applications.

Please keep in mind that the AJAX APIs exist for the benefit of end-users; several of their features and usage guidelines are designed with them in mind. For instance, each search performed with the API must be the direct result of a user action. Automated searching is strictly prohibited, as is permanently storing any search results. Please refer to the Terms of Use for more detail.

And for developers new to the AJAX Search API, don't forget to check out our discussion group, a good resource if you have questions or need more help. Welcome aboard!