Where to find IP address to location data?

I'm trying to remotely probe a range of IP addresses. First I need a list of IP addresses for a very small geographic area. I've had a lot of trouble obtaining them. I would like to find a database or something.

Suppose I do get the data. Can I see if that IP address is in use by someone? Can I see if they are online? I've written small client server programs in C++, that use sockets. My knowledge of networking is about 50/50. Is it at all possible to trace an IP address down to an exact location? Its fairly important to me.

Also if anyone know anything about hash tags that would be great. Is it possible to link hash tags with an IP address? i wouldn't think so. Someone puts a hash tag on a website and there ip address is invisible, rite? Oh, i see below something about tags, what is all this tag stuff?

Try the following:

curl ipinfo.io/XXX.XXX.XXX.XXX

Replace X's with IP address.

what does that do? i'm a little surprised by the quick response. Is that a dos command?