How to generate city details based on IP?

Anonymous
2023-01-16T12:07:17.37+00:00

Hi Team

Please can someone suggest to me how we can generate city-based details using the IP address?

Azure Maps
Azure Maps

An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

5 answers

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. rbrundritt 20,451 Reputation points Volunteer Moderator
    2025-12-22T04:26:50.4233333+00:00

    As others have mentioned, Azure Maps only provides country level geolocation details for IP addresses. You would need to use a 3rd party solution for this. If you are looking for something hosted in Azure, here is a solution in the Azure Marketplace: https://marketplace.microsoft.com/en-us/product/saas/fastah.ip_location_api_01?tab=Overview

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. rbrundritt 20,451 Reputation points Volunteer Moderator
    2023-06-06T14:14:36.1266667+00:00

    As noted in some of the comments, Azure Maps Geolocation API only provides IP Address locations to country level at this time. I don't believe there is any Azure service that provides city level accurate IP Address to location information. There are non-Microsoft services available in the Azure Marketplace that do provide this functionality, such as this one: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/fastah.ip_location_api_01?tab=Overview

    Was this answer helpful?

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    6 deleted comments

    Comments have been turned off. Learn more

  5. Sreeju Nair 12,761 Reputation points
    2023-01-16T12:46:37.61+00:00

    Based on my best knowledge, Azure Maps Doesn't offer IP to City mapping. As of now, Azure offers IP-to-country mapping.

    https://learn.microsoft.com/en-us/rest/api/maps/geolocation/get-ip-to-location?tabs=HTTP

    So the IP Address to Location Result shall give the following information

    https://learn.microsoft.com/en-us/rest/api/maps/geolocation/get-ip-to-location?tabs=HTTP#ipaddresstolocationresult

    For IP to City, there are third-party services available. Some of them are given below.

    https://ipinfo.io/

    https://apilayer.com/marketplace/ip_to_location-api

    Hope this helps

    Was this answer helpful?

    2 people found this answer helpful.