IP to Location

Locate and identify website visitors' info (latitude, logintude, connection, currency, timezone etc...) by IP address.
curl --request GET \
--url 'https://api.apilayer.com/ip_to_location/{ip}' \
--header 'apikey: dq2TlGLIDrBh1OHx0o7umAtVyyhNzFrE'
{"city":"Concord","connection":[],"continent_code":"NA","continent_name":"North America","country_code":"US","country_name":"United States of America","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"ip":"165.35.32.89","is_eu":false,"latitude":37.983353,"location":{"calling_codes":["1"],"capital":"Washington, D.C.","flag":"http:\/\/assets.apilayer.com\/flags\/US.svg","native_name":"United States","top_level_domains":[".us"]},"longitude":-122.036591,"region_name":"California","timezones":["UTC-12:00,UTC-11:00,UTC-10:00,UTC-09:00,UTC-08:00,UTC-07:00,UTC-06:00,UTC-05:00,UTC-04:00,UTC+10:00,UTC+12:00"],"type":"ipv4"}

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?

 

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