16

When searching Google I often want to share a link to my search. (not to a search result, to the current page with the results)

Many years ago Google used to have excellent URLs. For example:

https://google.com/search?q=Tokyo%20Disneyland%20Rides

Nowadays, however, links copied from Google look more like this:

http://www.google.com/search?q=perverted%20stuff!!!!&bav=on.2,or.r_qf.&bvm=bv.49967636,d.d2k,pv.xjs.s.en_US.jOYpRJj4zMA.O&biw=1253&bih=789&safe=active&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&ei=P5b3UaWdE8iO7QbMyIGoDg#um=1&hl=en&tbm=isch&sa=1&q=Tokyo+Disneyland+Rides&oq=Tokyo+Disneyland+Rides&gs_l=img.3..0j0i24l4.1334.1334.0.2188.1.1.0.0.0.0.118.118.0j1.1.0....0.0..1c.1.20.img.2rhtDhNSwrA&bav=on.2,or.r_qf.&bvm=bv.49967636%2Cd.ZGU%2Cpv.xjs.s.en_US.jOYpRJj4zMA.O&fp=47041e3f94e8fa63&biw=1253&bih=789&safe=active

(I started my session by searching for "perverted stuff", moved to image search, and eventually changed the search to "Tokyo Disneyland Rides")

The URL contains 24 query parameters - most of them seem useless. My initial search is also included there, and is almost the first thing you see when looking at the URL.

Is there a quick way of getting a beautiful URL I can share?

I'd rather not create it manually, or use a URL shortener - I need good URLs that are obvious to the viewer.

2

3 Answers 3

5

Well, this must be done manually, but it is so simple that maybe that is OK?

Start by doing a new search, copy the URL and chop off everything from the '&' on. Now you've got something like the URL of old that you hark back to

https://google.com/search?q=Tokyo%20Disneyland%20Rides

Now replace the 'search?q=' with '#q='. In most contexts (though not stackoverflow answers) you can also get rid of the 'https://'.

The '%20' (encoding for a space character) can be replaced with '+' to make it shorter and easier to read.

You can even get rid of an 'o' or 'e' in google.com, but that doesn't seem worth the possible confusion IMO. (This only works if you don't specify HTTPS - do it with the https and let it redirect you to https.)

So, the shortest simple form of your original query - without using a URL shortner - is this:

google.com/#q=Tokyo+Disneyland+Rides (no longer works)

Update

As of ~2021, replacing 'search?q=' with '#q=' no longer works, so we have to switch to '?' instead of '#', and this solution now requires that you press 'enter' twice:

google.com/?q=Tokyo+Disneyland+Rides

So you will probably also want to add back 'search':

google.com/search?q=Tokyo+Disneyland+Rides

1

Probably not possible without using an external service or an extension. "Let me google that for you" is a service which allows you to make such pretty URLs. I'd post the link here, but posting links of that website is not allowed on StackExchange websites!

Edit: Was bored.. Here is some simple code which does it.. Feel free to implement it where you want to: http://jsbin.com/ihomir/4/

0
0

Google Search uses a typical set of URL parameters at the search endpoint.

Quick solution

`http://www.google.com/search?

Example: `http://www.google.com/search?q=QUERY

Details:

If you are familiar with match types you can construct a more sophisticated URL and beef things up a bit

q= normal query

as_epq = advanced search exact phrase query, meaning that you need the words in order as they are shown like a phrase match

as_oq = advanced search open query (I think), meaning one or more of the words

as_eq = advanced search exclude query, cant have any of these words

...

There are more you can find here https://google.com/search?q=google+search+url+parameters

Not the answer you're looking for? Browse other questions tagged or ask your own question.