Visitor location

Return the caller's approximate geolocation (country, region, city, coordinates, timezone), detected from their IP address. Public — no parameters required. Commonly used to pre-select a country or tailor content to the visitor.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Overview

Return the caller's approximate geolocation — country, region, city, coordinates, and timezone — detected from their IP address. No parameters are required.

The endpoint is served from the global edge for fast, low-latency responses, and is commonly used to pre-select a country or tailor content to the visitor.

📘

Duplicate fields

Several fields are returned under more than one name (for example iso_code/countryCode, postalCode/postal_code, latitude/lat) for backward compatibility.

Example:

curl --request GET \
  --url 'https://www.pelcro.com/api/v1/sdk/location'
{
  "data": {
    "location": {
      "ip": "203.0.113.10",
      "iso_code": "US",
      "countryCode": "US",
      "city": "New York",
      "region": "New York",
      "regionCode": "NY",
      "postalCode": "10001",
      "continent": "NA",
      "latitude": "40.71427",
      "longitude": "-74.00597",
      "timezone": "America/New_York",
      "isEUCountry": false
    }
  }
}
Response

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json