Hack Google (Maps) URLs for Quick Searching
Posted by Kyle Pott at 1:00 AM on December 23, 2007
Frequently using Google Maps for directions? Reader Pham writes in with a simple but interesting way to save time when looking up directions.
Basically, the multi-step process of going to Google [Maps], typing in an address, clicking submit, etc., can be avoided by just putting all your info directly into the URL. For example typing this works:
http://maps.google.com/maps?q=1683 Mass Ave, Cambridge, MA
This simple observation can be coupled with Texter to speed up your searching. This kind of URL hacking isn't specific to Google Maps. You can also roll your own AutoHotkey applications to search Google, Google Maps, or any other site that allows robust URL searching. Hit the jump for the AHK code syntax.
To search Google Maps using an AutoHotkey application (start the application with ALT + 1), use the following code:
!1::
InputBox, OutputVar , Enter your location:,
if ErrorLevel
MsgBox, CANCEL was pressed.
else
Run http://maps.google.com/maps?q=%OutputVar%To search standard Google (start the application with ALT + 2), use the following code:
!2::
InputBox, OutputVar , Enter your search criteria:,
if ErrorLevel
MsgBox, CANCEL was pressed.
else
Run http://www.google.com/search?q=%OutputVar%

Comments (AU Comments · US Comments)
There are currently no AU comments for this post.
MrJR
Posted 6:32 AM 22/12/07
With Firefox, it's as easy as making a keymark - keyboard shortcut bookmark.
Create a bookmark with '[maps.google.com]' as the URL and a short lower case abbreviation, such as 'gm' in the keyword box.
From now on (using the example in the article) type 'gm 1683 Mass Ave, Cambridge, MA' in the URL bar.
MrJR
Jason
Posted 7:28 AM 22/12/07
@MrJR: Just to clarify, you'll want the link in your bookmark to be of the format:
maps dot google dot com/maps?q=%s
In the first post that URL is showing as just maps.google.com (the hyperlink is correct, but what shows is truncated).
Works great!
--Jason
Jason
Jim
Posted 8:21 AM 22/12/07
FARR (Find and Run Robot) has this as a shortcut - simply type "map" and your address and go... great timesaver.
Jim
Agent_9191
Posted 8:21 AM 22/12/07
Actually Launchy 2.0 already has a Weby shortcut to do this. Type in "Maps", TAB, and then the address. Now if there was a way to get Weby to take 2 parameters, getting my driving directions would be a lot easier!
Agent_9191
Mr Handsome B Wonderful
Posted 7:54 AM 22/12/07
I discovered the beauty of this the other day in relation to Launchy - simply save your bookmark as per Jason above, and then the wonderful new shiny Launchy 2.0 will index it, and you simply have to Alt+Space your way into Launchy, type 'gm' press tab, then enter your search term.
This works for most google products, and I find it massively useful for Google Calendar, especially as hitting return in the search box on the webpage (as is instinctive) searches public calendars rather than your calendar, which drives me nuts (hence the workaround.
A Merry Festivus to all.
Mr Handsome B Wonderful
hector7g
Posted 9:47 AM 22/12/07
@Agent_9191: Good call. I forgot about this Weby shortcut.
hector7g
MrJR
Posted 12:14 PM 22/12/07
@Jason: Thanks for the catch - I tripped over the blogware. Some more quick searches:
clb - boston(dot)craigslist(dot)org/search/sss?query=%s
, searches Craigs list's For Sale listings; modify to suit your city.
bz - www(dot)bizrate(dot)com/buy/superfind__SEARCH_GO--Find%20it%21,cat_id--1,keyword--%s,search_box--1,sfsk--0.html
often needs only the model # of a product to find a list of list of retailers by price.
wikip - en(dot_wikipedia(dot)org/wiki/Special:Search?search=%s&go=Goen(.)wikipedia(.)org/wiki/Special:Search?search=%s&go=Go
to look up in Widipedia.
MrJR
Joff (Reading, UK)
Posted 11:48 AM 22/12/07
I took Lifehacker's own advice ages ago and got myself a Yubnub.
Joff (Reading, UK)
dale3h
Posted 11:46 AM 22/12/07
@MrJR: This trick works very well. I remember when this didn't work, but as soon as it did, I was all about it! I used to use this keymark all the time, but since I've moved to Toronto, it's pretty useless.
dale3h
Abelianality
Posted 1:55 PM 22/12/07
I'll second the Firefox comment. Also, Firefox can set up business and direction searches the same way--just enter a common starting address in the first direction or business search box and right-click in the second box to make a quick search like always.
Abelianality
BostonMark
Posted 3:09 PM 22/12/07
I have a Firefox QuickSearch. I just use map as the keyword. Easy peasy japanesey.
BostonMark
PeerBr
Posted 2:17 AM 23/12/07
I currently live in São Paulo/Brazil and have found that searching via the shortcut shows results for the US. When I enter google maps, I start out at my Brazilian home address, and I get different search results when I use the text box (I get local ones which are relevant to me). Does anybody have a work-around for this?
PeerBr
pham
Posted 8:12 PM 23/12/07
@pham: Ack, sorry, the link URLs were clobbered by the commenting software. But you'll get the point when you look at the URLs.
pham
pham
Posted 8:12 PM 23/12/07
I've also found this "web app" called ThnLnk (a semantic URL-shortening service) that works like a proxy to several online services. For example, if I want traffic, then I type in:
[thnlnk.com], MA
And it give me a Google Map with the traffic layer, zoomed in at a manageable level. It also conveniently takes me to the Weather.com hour-by-hour forecast, instead of to the current forecast:
[thnlnk.com]
(It looks like it only does it by zip code now.)
There are other "apps" listed on their blog:
[blog.thnlnk.com]
pham
chaddo
Posted 2:08 PM 23/12/07
A mouse equivalent extension would be the often overlooked Web Search Pro... just high-light the address on the page and Drag-And-Drop it to whichever search engine you configure. Awesome and as simple as can be!!
chaddo
jzting
Posted 9:01 PM 22/12/07
for those iphone users out there, check out iphonesender.com. they have a firefox extension and a bookmarklet that basically lets you quickly email a selected address to your iphone so you can just hit that link to open the google maps app.
jzting
se2131
Posted 3:03 PM 22/12/07
I'll put in a plug for Opera. After creating the search (right-click the text box > Create Search), it's as simple as highlighting the address, and choosing Search With > Google Maps. It'll even give you the directions to the address from your default location without any extra steps.
se2131
hjbarraza
Posted 2:50 PM 22/12/07
- OR -
you can simply use the FF extension rubnub extension to include yubnub directly into your url. tubnub is a command line for internet, for ex.
to achieve the same effect you only have to type:
gm somewhere street 123 (searches for google maps)
gv some video (searches for some video in google video)
gi some image (ok you get the point)
there are hundreds of commands available (flickr, amazon, youtube) and you can add your own.
hjbarraza
bradmont
Posted 11:00 AM 22/12/07
Why not just add a firefox search bar plugin for it?
[mycroft.mozdev.org]
bradmont
posaune
Posted 10:27 AM 22/12/07
To use your browser's search engine box as a command-line, check out YubNub [yubnub.org]. The Google maps command is simply 'gm ADDRESS'. Bonus: YubNub has thousands of other commands and useful online utilities.
posaune
gruvrman
Posted 9:49 AM 31/12/07
oops -- I should have read PHAM's note - the URLS get masked, but you can click to see the full format.
gruvrman
gruvrman
Posted 9:48 AM 31/12/07
Here are a couple more similar quick-search links, if you want to find concerts by location or band:
[gruvr.com]
or as a cleaner URL which still does a query:
[gruvr.com]
If you want the corresponding feed just do this:
[gruvr.com]
gruvrman