<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using Google Search API from Java</title>
	<atom:link href="http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/</link>
	<description>Mostly about programming, Apple and some random stuff</description>
	<lastBuildDate>Wed, 26 Jan 2011 14:37:13 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: vira</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-13836</link>
		<dc:creator>vira</dc:creator>
		<pubDate>Sat, 06 Feb 2010 22:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-13836</guid>
		<description>hi there!

the code for ajax I provided here is very basic: it just prints Google response to console and query is statically defined :(. I&#039;d recommend you to use my wrapper located &lt;a href=&quot;http://vera.org.ua/blog/projects/oo-wrapper-for-google-ajax-api/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. In that post I placed an example of using &lt;code&gt;Googler&lt;/code&gt; class. Currently, it doesn&#039;t support API key, but this functionality could be easily added - just specify API key as value of &quot;key&quot; HTTP request parameter.

BTW I&#039;m going to add this some other functionality to the Googler in the distant future.</description>
		<content:encoded><![CDATA[<p>hi there!</p>
<p>the code for ajax I provided here is very basic: it just prints Google response to console and query is statically defined <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . I&#8217;d recommend you to use my wrapper located <a href="http://vera.org.ua/blog/projects/oo-wrapper-for-google-ajax-api/" rel="nofollow">here</a>. In that post I placed an example of using <code>Googler</code> class. Currently, it doesn&#8217;t support API key, but this functionality could be easily added &#8211; just specify API key as value of &#8220;key&#8221; HTTP request parameter.</p>
<p>BTW I&#8217;m going to add this some other functionality to the Googler in the distant future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-13816</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Thu, 04 Feb 2010 13:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-13816</guid>
		<description>hi,

can u pls tell me how to run the code for ajax api? i got a ajax api key as required..</description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>can u pls tell me how to run the code for ajax api? i got a ajax api key as required..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevin</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-12592</link>
		<dc:creator>kevin</dc:creator>
		<pubDate>Thu, 05 Nov 2009 16:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-12592</guid>
		<description>How to parse?

I want to get the same search number by using API as the real google search. Is there any java code example?



2 Damian

google ajax api and real google have different results (and mau be different index base).
For example yandex.xml api and yandex.ru have different indexes (index yandex.xml more new).

So, if you whant real google.com result - parse it ;-)</description>
		<content:encoded><![CDATA[<p>How to parse?</p>
<p>I want to get the same search number by using API as the real google search. Is there any java code example?</p>
<p>2 Damian</p>
<p>google ajax api and real google have different results (and mau be different index base).<br />
For example yandex.xml api and yandex.ru have different indexes (index yandex.xml more new).</p>
<p>So, if you whant real google.com result &#8211; parse it <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damian</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10734</link>
		<dc:creator>Damian</dc:creator>
		<pubDate>Wed, 21 Jan 2009 08:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10734</guid>
		<description>Thank you :)</description>
		<content:encoded><![CDATA[<p>Thank you <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vira</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10729</link>
		<dc:creator>vira</dc:creator>
		<pubDate>Tue, 20 Jan 2009 21:03:17 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10729</guid>
		<description>@Damian
You just need to set corresponding system property
e.g. System.setProperty(&quot;http.agent&quot;, &quot;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; ru-ru) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1&quot;);</description>
		<content:encoded><![CDATA[<p>@Damian<br />
You just need to set corresponding system property<br />
e.g. System.setProperty(&#8221;http.agent&#8221;, &#8220;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; ru-ru) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1&#8243;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damian</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10725</link>
		<dc:creator>Damian</dc:creator>
		<pubDate>Tue, 20 Jan 2009 10:24:55 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10725</guid>
		<description>But Google sends back 503 (Forbidden).
I heard that I have to send Http-Agent header, but I don&#039;t know how to send it. Do you?</description>
		<content:encoded><![CDATA[<p>But Google sends back 503 (Forbidden).<br />
I heard that I have to send Http-Agent header, but I don&#8217;t know how to send it. Do you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: @ver</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10719</link>
		<dc:creator>@ver</dc:creator>
		<pubDate>Mon, 19 Jan 2009 15:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10719</guid>
		<description>2 Damian

google ajax api and real google have different results (and mau be different index base).
For example yandex.xml api and yandex.ru have different indexes (index yandex.xml more new).

So, if you whant real google.com result - parse it ;-)</description>
		<content:encoded><![CDATA[<p>2 Damian</p>
<p>google ajax api and real google have different results (and mau be different index base).<br />
For example yandex.xml api and yandex.ru have different indexes (index yandex.xml more new).</p>
<p>So, if you whant real google.com result &#8211; parse it <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damian</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10716</link>
		<dc:creator>Damian</dc:creator>
		<pubDate>Mon, 19 Jan 2009 14:17:48 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10716</guid>
		<description>I get different results using Google.com and your code. Do you know the default preferences of ajax.googleapis.com?
What I want to get is to obtain the same result with your code and google.com search.</description>
		<content:encoded><![CDATA[<p>I get different results using Google.com and your code. Do you know the default preferences of ajax.googleapis.com?<br />
What I want to get is to obtain the same result with your code and google.com search.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vira</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10458</link>
		<dc:creator>vira</dc:creator>
		<pubDate>Mon, 08 Dec 2008 01:12:23 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10458</guid>
		<description>kulpster,

Checked this example again and it doesn&#039;t works anymore :( Try to use this url &quot;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=query_str&quot; . It&#039;s much simpler and works for me. It returns 4 result at a time, to get next 4 use &quot;start&quot; parameter. 

BTW, according to google docs api key is optional for now. If you provide key and some error occurs while searching Google can help work it out :)</description>
		<content:encoded><![CDATA[<p>kulpster,</p>
<p>Checked this example again and it doesn&#8217;t works anymore <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Try to use this url &#8220;http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=query_str&#8221; . It&#8217;s much simpler and works for me. It returns 4 result at a time, to get next 4 use &#8220;start&#8221; parameter. </p>
<p>BTW, according to google docs api key is optional for now. If you provide key and some error occurs while searching Google can help work it out <img src='http://ivira.name/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kulpster</title>
		<link>http://ivira.name/blog/2008/04/25/using-google-search-api-from-java/comment-page-1/#comment-10453</link>
		<dc:creator>kulpster</dc:creator>
		<pubDate>Sun, 07 Dec 2008 21:52:36 +0000</pubDate>
		<guid isPermaLink="false">http://vera.org.ua/blog/2008/04/25/using-google-search-api-from-java/#comment-10453</guid>
		<description>Vira,

Can you explain the endpointURL string? I am trying to use my own google api key in the string but I am getting this back:

{&quot;responseData&quot;: null, &quot;responseDetails&quot;: &quot;invalid version&quot;, &quot;responseStatus&quot;: 400}

thanks.</description>
		<content:encoded><![CDATA[<p>Vira,</p>
<p>Can you explain the endpointURL string? I am trying to use my own google api key in the string but I am getting this back:</p>
<p>{&#8221;responseData&#8221;: null, &#8220;responseDetails&#8221;: &#8220;invalid version&#8221;, &#8220;responseStatus&#8221;: 400}</p>
<p>thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

