get
https://www.pelcro.com/api/v1/sdk/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
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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 fieldsSeveral 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
}
}
}
