Google AJAX API RESTful - Getting the right area

0 views
Skip to first unread message

geoffd...@googlemail.com

unread,
May 12, 2008, 1:00:52 PM5/12/08
to Google AJAX API
Is there anyway I can use the Google Search REST API to search as if I
was visiting UK Google.

If I do the following:-

http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=geoff

I will get results as if I was visiting google.COM

I want to emulate searching as if I was at google.co.uk

Is there a way to do this?

jgeerdes [AJAX APIs "Guru"]

unread,
May 12, 2008, 2:08:23 PM5/12/08
to Google AJAX API
It's not documented, but mhl (a dev team member) recently posted this:

http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/thread/a94bd888544352a8/eed501e003329979?lnk=gst&q=author%3Amhl+geo#eed501e003329979

In theory, using the RESTful approach, your best bet to duplicate
similar functionality would be to append &geo=uk (or something
similar) to the url you're using.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jgee...@mchsi.com

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

geoffd...@googlemail.com

unread,
May 12, 2008, 4:54:22 PM5/12/08
to Google AJAX API
That doesn't seem to make any difference, though you might be on the
right track.

Anybody any ideas what the URL attribute would be to set the
geographical area.

I don't understand why this hasn't been brought up earlier, if you
cannot set the area, then the REST api would be useless for all users
outside the US.


On May 12, 7:08 pm, "jgeerdes [AJAX APIs \"Guru\"]"
<jgeer...@mchsi.com> wrote:
> It's not documented, but mhl (a dev team member) recently posted this:
>
> http://groups.google.com/group/Google-AJAX-Search-API/browse_thread/t...
>
> In theory, using the RESTful approach, your best bet to duplicate
> similar functionality would be to append &geo=uk (or something
> similar) to the url you're using.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> jgeer...@mchsi.com

Ben Lisbakken

unread,
May 12, 2008, 5:04:32 PM5/12/08
to Google-AJAX...@googlegroups.com
Hey Geoff --

I'm sorry, but there is no way to restrict a web search to a specific country's Google engine.  However, you can set the language for your search to make it more accurate if you speak another language -- so the API isn't useless to users outside of the US.

What exactly are you searching for in the UK engine that isn't appearing in our API?  The results might not be in the same order as they are for our UK engine, but generally that only affects developers trying to do SEO which is not the purpose of this API.

Regards,
Ben
Reply all
Reply to author
Forward
0 new messages