top | item 3128665

Google now tells you your IP when you ask it in search

144 points| suivix | 14 years ago |google.com | reply

89 comments

order
[+] user24|14 years ago|reply
This is something that's been going on for a while - Google killing small web apps; Convertors, calculators, movie listings, ip finders, weather stats, stocks. It's not all low-hanging fruit. I'm not saying they shouldn't be doing this, nor that it's intentional. Their goal is to be the best search engine which means connecting searchers with answers as quickly as they can. But even so, it sucks for the web apps who get made redundant by Google.

Also, it's interesting to compare this with, say, Yahoo's approach. Yahoo would have put an "IP" widget and a "weather" widget on their portal homepage. Google waits until the user searches for the info before giving it to them - which keeps their homepage clean and more importantly keeps their message strong "we do search well", while Yahoo's always seemed to be "we do a whole bunch of stuff, some of which you may need". I know Google/Yahoo comparisons aren't really du jour, but still it's interesting.

[+] biot|14 years ago|reply
It sucks, but if the small app someone wrote can be duplicated in 10 seconds of coding then its days were already numbered.
[+] antirez|14 years ago|reply
Actually the only way for a "my IP" application to make some money is be indexed as first result in Google I guess. At least I never remember the domain of one of that 200 trivial apps and search on google. So makes a lot of sense they showing you the result if you search for "ip" or "my ip".
[+] ChrisArchitect|14 years ago|reply
with the more significant things like movie listings, weather..... it's about Google + the world's information. They want it to flow through them/be indexed by them/found and offered up by them
[+] markmccraw|14 years ago|reply
Well, a lot of those webapps fall in the "feature, not a product category" and were pretty clearly living life on the edge.

I await the day I can anagram via the search bar.

[+] keeperofdakeys|14 years ago|reply
What's worse is that they could drop these services in the future, all of a sudden there is nothing capable of performing the function.
[+] lacker|14 years ago|reply
Great, this saves me that agonizing click on whatismyip.com.
[+] billpg|14 years ago|reply
Remember, if the answer is delivered with HTTP, the reported IP may be the IP of your ISP's transparent proxy server. If you want the IP of your NAT box, you need a what-is-my-IP where the response is delivered over HTTPS.
[+] molo_|14 years ago|reply
You can proxy https. See RFC2817 section 5.

-molo

[+] tomkarlo|14 years ago|reply
This seems like a case of some things being features, not applications. Entire web sites build just to report your IP back were probably going to be replaced by one thing or another, eventually.

Both Google and Apple (and most other companies) are smart enough to see that if a simple feature is heavily used and the experience of using it can be improved for their users, they may want to make it a "native" part of their products. Let's face it, this is a better experience for that search, and you can still go to the indie sites if what you need isn't covered by it.

[+] mkr-hn|14 years ago|reply
If your site is so sparse that Google can ruin you just by handling a search query, your business model was broken or non-existent. There must be something they can do with all that traffic data to differentiate. Where's the aggregate statistics?

Any of the bigger ones could spring off into an ISP review site.

[+] noonespecial|14 years ago|reply
Ok, so I have a curl/awk one-liner that can get me my ip in shell scripts that uses checkip.dyndns.org. It's super simple because the results are super simple from checkip.

Anyone want to take a stab at this for google's result page?

[+] fjarlq|14 years ago|reply
This works, but only accidentally:

    curl --silent 'http://www.google.com/search?q=what+is+my+ip' | sed 's/.*Client IP address: //;s/).*//;q'
Google responds with HTTP error 403 (Forbidden), but it just so happens the client IP address is in the error page.
[+] a3_nm|14 years ago|reply
Even simpler:

    curl icanhazip.com
[+] Nick_C|14 years ago|reply
If your use-case is from ssh'ing in a remote box, this may be simpler:

  #!/bin/sh
  # example from `who - u`:
  #nick     pts/0  2011-07-20 20:44 . 7856 (xxxxxxx.xxxxxxxx.internode.on.net)

  who -u | awk 'BEGIN {FS="[p.]"} /internode/ {print gensub("-",".","g",$6); exit}'
You might need to play around with gensub(...). Sometime `who` reports the IP as xxx-xxx-xxx-xxx and sometimes as xxx.xxx.xxx.xxx
[+] ralph|14 years ago|reply
One way:

    wget -Ufoo -qO- 'http://www.google.com/search?q=ip' |
    sed -n '/.*Your public IP address is [^0-9]*\([0-9.]*\).*/{s//\1/p;q;}'
[+] 27182818284|14 years ago|reply
[+] shrikant|14 years ago|reply
For months... what? This is what it shows me, here in my studio apartment in London:

http://i.imgur.com/uXBJk.jpg

Edit: I knew that IP looked familiar - this is likely because of the Modify Headers Firefox add-on. Oh well, still broken.

[+] hieronymusN|14 years ago|reply
Wow, like the IPv6 anf IPv4 breakdown along with ISP information. Wolfram would win, but as usual you can't scrape it with the SED tricks of earlier posts... or can you?
[+] treelovinhippie|14 years ago|reply
And thus one line of code kills a dozen websites.
[+] RyanMcGreal|14 years ago|reply
If there's already a dozen, they can probably handle the competition.
[+] chanux|14 years ago|reply
I recently noticed that searching for dictionary words, using the old define:something trick or queries like "ubuntu release day", "evanscence genre" returns related information or 'best guess'. Nifty.
[+] stewbrew|14 years ago|reply
I'm slightly amazed at how inconsistent these special queries work. For international users (I simply assume it's not just me), this trick only works if I add &hl=en to the URL. Any explanations?
[+] beaumartinez|14 years ago|reply
They haven't yet rolled it out to all the localised versions.
[+] martokus|14 years ago|reply
And yet another search vertical killed by google's own results. At least they are not scraping the result this time, so nothing to blame.
[+] robryan|14 years ago|reply
Now just need something of the form: 1262307721 to date, that and ip are my 2 main lazy uses of Google.
[+] ralph|14 years ago|reply
Do you know of

    date -d @1262307721
[+] _grrr|14 years ago|reply
Google can also do currency conversions for you http://tinyurl.com/6zzoqmt
[+] icebraining|14 years ago|reply
Don't use shortened URLs here, please. People like to know where they're going ;) Especially since trolls use them to get people on goatse pages.
[+] acg|14 years ago|reply
I'm sure "where am I" is next