Live Demo

API Provider

IpDB
IpDB

Developer links

IP to Location API
IP to Location API

Locate and identify website visitors' info (latitude, logintude, connection, currency, timezone etc...) by IP address.

IP to Location API is a REST API which provides the essential data from any IP address in JSON format over HTTPS such as:

  • Country / City / State / Continent
  • Latitude and Longitude
  • Local currency
  • Internet Service Provider (ISP) lookup
  • Country calling code and Time Zone

See it in Action!

How do I use IP to Location API?

Below is a sample code querying for IP address 182.48.79.85.


curl --location --request \
GET 'https://api.promptapi.com/ip_to_location/182.48.79.85' \
--header 'apikey: YOUR API KEY'

Check out the response below


{
    "ip": "182.48.79.85",
    "type": "ipv4",
    "country_code": "BD",
    "country_name": "Bangladesh",
    "region_name": "Dhaka",
    "city": "Dhaka",
    "latitude": 23.7104,
    "longitude": 90.40744,
    "continent_code": "AS",
    "continent_name": "Asia",
    "is_eu": false,
    "connection": {
        "asn": 58715,
        "isp": "Earth Telecommunication ( pvt ) Limited"
    },
    "location": {
        "capital": "Dhaka",
        "native_name": "Bangladesh",
        "flag": "http://assets.promptapi.com/flags/BD.svg",
        "top_level_domains": [
            ".bd"
        ],
        "calling_codes": [
            "880"
        ]
    },
    "currencies": [
        {
            "name": "Bangladeshi taka",
            "code": "BDT",
            "symbol": "৳"
        }
    ],
    "timezones": [
        "UTC+06:00"
    ]
}

Use cases for IP to Location API

Knowing from where people access you extends your brand’s reach through the market and helps you create a more accurate customer base. You can think of any service to relate with a user’s location information but here are the most popular location-based use cases:

  • For geo-targeting your customers by content personalization
  • For any service that sends location-based push notifications
  • For mapping any social experiences through photos, trips, check-ins etc.
  • For using targeted ads and any other location-based marketing purposes
  • For any kind of services offering solutions for local community needs such as healthcare, municipality, social services, transportation
  • For detecting any abnormal activities within an area worth considering in terms of security concerns
  • For collecting user behavior data on specific purposes such as a new investment for businesses
Ultra fast
Competitive price

Ready to try it out?

We offer a free plan. No credit cards required!


or see documentation

See Also

View All