How to determine the district for a current IP Address and put it on a map?

Could OpenStreetMap help with this, or would I need to use Google Maps?

-supportbot

District is essentially the same as city. You can also pass the IP address to IPinfo’s API endpoint and get the location information broken down to city, region and country:

  • https://ipinfo.io/8.8.8.8/json => replace 8.8.8.8 with the IP address you want
  • https://ipinfo.io/json => returns geolocation information of your IP address
  • https://ipinfo.io/8.8.8.8/city => get the city or district value of an IP address

For putting the IP address location on a map you don’t need to figure out Openstreet or Google maps. Simply visit: https://ipinfo.io/tools/map and paste in the IP addresses you want to map.

Then you can see where your IP addresses fall on a map.

IPinfo’s map can also be accessed using the IPinfo CLI too. Read the guide here to learn more.