GET https://dash.pexi.nl/api/geo
This API provides geographical information based on a specified location (city or country). The endpoint responds with geographical data for the given location.
Parameter | Type | Required | Description |
---|---|---|---|
location | String | Yes | The name of the location (city or country) to query. |
GET https://dash.pexi.nl/api/geo?location=Amsterdam
The API returns a JSON object containing geographical data related to the specified location. Below is a sample response structure:
{
"location": "Amsterdam",
"country": "Netherlands",
"latitude": 52.3676,
"longitude": 4.9041,
"timezone": "Europe/Amsterdam"
}
Field | Type | Description |
---|---|---|
location | String | The name of the requested location (city or country). |
country | String | The country where the location is found. |
latitude | Float | The latitude coordinate of the location. |
longitude | Float | The longitude coordinate of the location. |
timezone | String | The timezone associated with the location. |
location
parameter is missing or invalid.{
"error": "Location not found"
}
location
parameter is URL-encoded if it contains spaces or special characters.This documentation should help users understand how to interact with the Geo Location API effectively.